|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.beans.LibraryObject | +--oracle.ifs.beans.TieLibraryObject | +--oracle.ifs.beans.PublicObject | +--oracle.ifs.beans.TiePublicObject | +--oracle.ifs.beans.Folder
The Folder class represents Folders in the iFS server. A Folder can contain references to any PublicObjects.
To access PublicObjects in a folder use either the Java Beans
compliant getItems()
methods, or the cursor based
openItems(), nextItem(), closeItems()
methods.
Once the items have been fetched they will be cached locally.
The local cache can be cleared by a call to resetItems
.
The following code fragment shows how to access a folder's items:
//get the home folder
Folder f = sess.getHomeFolder();
//sort on 'NAME'
String[] sort_attributes = {"NAME"};
//sort will be ascending
boolean [] sort_orders = {true};
SortSpecificiation sort = new SortSpecification(sort_attributes, sort_orders);
f.setSortSpecification(sort);
//get the items
PublicObject items[] = f.getItems();
Field Summary | |
static java.lang.String |
CLASS_NAME
This class name for this class. |
static int |
SYSTEMOPTIONVALUE_FOLDER_DEPTH_DEEPEST
FolderDepth option for Folder.delete(def). |
static int |
SYSTEMOPTIONVALUE_FOLDER_DEPTH_MUST_BE_EMPTY
FolderDepth option for Folder.delete(def). |
static int |
SYSTEMOPTIONVALUE_FOLDER_DEPTH_NONE
FolderDepth option for Folder.delete(def). |
Method Summary | |
void |
addItem(PublicObject item)
Adds an item to the folder. |
void |
addItem(PublicObject item,
FolderRelationshipDefinition def)
Adds an item to the folder. |
void |
addItems(PublicObject[] objs)
Adds an array of PublicObjects to this Folder. |
boolean |
checkExistenceOfPublicObjectByPath(java.lang.String path)
Determines whether an item exists at the specified path relative to this Folder. |
PublicObject |
findPublicObjectByPath(java.lang.String path)
Finds an item descending from a Folder, as specified by a file-system style path. |
int |
getItemCount()
Gets the number of items in this Folder, including both documents and subfolders. |
PublicObject[] |
getItems()
Gets an array containing this Folder's items. |
SortSpecification |
getSortSpecification()
Gets the SortSpecification used for getting items from this folder. |
int |
getSubfolderCount()
Gets the count of subfolders in this folder. |
void |
handleEvent(IfsEvent event)
Handles the specified event. |
boolean |
hasSubfolders()
Gets indication as to whether this folder has any subfolders in it. |
void |
moveItems(PublicObject[] objs,
Folder addToFolder)
Moves the specified array of PublicObjects from this Folder to the passed Folder. |
void |
removeItem(PublicObject item)
Removes the first reference to an item from this Folder without altering the item. |
void |
removeItem(PublicObject item,
PublicObjectDefinition def)
Removes the first reference to an item from this Folder without altering the item. |
void |
removeItems(PublicObject[] objs)
Removes the passed array of PublicObjects from this Folder. |
void |
resetItems()
Clears locally cached items, including any open cursor. |
void |
setSortSpecification(SortSpecification spec)
Sets the SortSpecification used for getting items from this folder. |
Methods inherited from class oracle.ifs.beans.LibraryObject |
equals, free, free, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getClassId, getClassObject, getDefinition, getId, getLabel, getName, getSession, invokeServerMethod, isInstanceOf, isTraced, lookupInstanceLabel, postEvent, postEvent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setName, toString, trace, update |
Methods inherited from interface oracle.ifs.common.LibraryObjectInterface |
getId |
Methods inherited from interface oracle.ifs.common.Traceable |
getTraceLogger, isTraced, trace |
Field Detail |
public static final java.lang.String CLASS_NAME
public static final int SYSTEMOPTIONVALUE_FOLDER_DEPTH_NONE
public static final int SYSTEMOPTIONVALUE_FOLDER_DEPTH_DEEPEST
public static final int SYSTEMOPTIONVALUE_FOLDER_DEPTH_MUST_BE_EMPTY
Method Detail |
public void resetItems() throws IfsException
getItems
will re-fetch
items from the server.IfsException
- if closing the folder cursor fails.public SortSpecification getSortSpecification() throws IfsException
IfsException
- if operation fails.public void setSortSpecification(SortSpecification spec) throws IfsException
spec
- this Folder's SortSpecificationIfsException
- if operation fails.public PublicObject findPublicObjectByPath(java.lang.String path) throws IfsException
path
- the folder path to the desired item.IfsException
- if the operation fails.public boolean checkExistenceOfPublicObjectByPath(java.lang.String path) throws IfsException
path
- the folder path to the desired item.IfsException
- if the operation fails.public int getItemCount() throws IfsException
If this method is called before any calls to getItems(), the item count will be calculated via a call to the server. If this method is called after a call to getItems(), the item count is calculated from the local cache size.
IfsException
- if operation fails.public int getSubfolderCount() throws IfsException
IfsException
- if operation fails.hasSubfolders()
public boolean hasSubfolders() throws IfsException
IfsException
- if operation fails.public PublicObject[] getItems() throws IfsException
IfsException
- if the operation fails.public void addItem(PublicObject item) throws IfsException
item
- the item to be added.IfsException
- if the operation fails.public void addItem(PublicObject item, FolderRelationshipDefinition def) throws IfsException
item
- the item to be added.def
- the FolderRelationshipDefinition.IfsException
- if the operation fails.public void removeItem(PublicObject item) throws IfsException
item
- the item to be removed from the folder.IfsException
- if the operation fails.public void removeItem(PublicObject item, PublicObjectDefinition def) throws IfsException
item
- the item to be removed from the folder.def
- the options to be used in this operation.IfsException
- if the operation fails.public void addItems(PublicObject[] objs) throws IfsException
Note that if any of the items fail to be added due to security reasons etc. the entire operation is rolled back and none of the changes take effect.
objs
- PublicObjects to be added.IfsException
- if the operation fails.public void removeItems(PublicObject[] objs) throws IfsException
If any of the items fail to be removed due to security reasons etc. this method will rollback all operations and none of the changes take effect
objs
- PublicObjects to be removed.IfsException
- if the operation fails.public void moveItems(PublicObject[] objs, Folder addToFolder) throws IfsException
If any of the items fail to be moved due to security reasons etc. this method will throw an exception and roll back
objs
- PublicObjects to be moved.addToFolder
- destination FolderIfsException
- if the operation fails.public void handleEvent(IfsEvent event) throws IfsException
handleEvent
in class PublicObject
event
- the eventIfsException
- if the operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |