{ } }
Tree PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.workplace.wcm.api
Interface Folder
- All Superinterfaces:
- Document, Editable, EditableItem, Hierarchical, Item, Localized, WCMApiObject, WorkflowedDocument
public interface Folder- extends Editable, WorkflowedDocument, Hierarchical
Defining a folder object which can hold various items including child folders.
- Since:
- 7.0
Method Summary boolean accept(DocumentId id)
Tests the DocumentType of the given document id against this folder's one.boolean accept(Item item)
Tests the DocumentType of the given document against this folder's one.void addDocument(Document document, boolean refreshDoc)
Add a document into this folder.ResultIterator<Folder> getChildFolders()
Obtain only child folders under this folder.ResultIterator<Item> getChildren()
Obtain items and folders under this folder.FolderDocumentType[] getDocumentTypes()
Document type of this folder.Item getParent()
Get the parent folder.boolean isEmpty()
Indicates if this folder contains any childrenboolean isPresetFolder()
Returns true if this folder is a preset foldervoid setDocumentTypes(FolderDocumentType[] types)
Set the DocumentType of this folder.
Methods inherited from interface com.ibm.workplace.wcm.api.Item getCreationDate, getDescription, getIdentity, getModifiedDate, getName, getTitle
Methods inherited from interface com.ibm.portal.Localized getLocales
Methods inherited from interface com.ibm.workplace.wcm.api.EditableItem setDescription, setName, setTitle
Methods inherited from interface com.ibm.workplace.wcm.api.Hierarchical getParentId
Method Detail getDocumentTypes
FolderDocumentType[] getDocumentTypes()
- Document type of this folder. Only documents of the same type, or folders with the same DocumentType can be added to this folder. If no type is assigned yet, returns null.
- Returns:
- folder document types for this folder. null if no type is assigned.
setDocumentTypes
void setDocumentTypes(FolderDocumentType[] types) throws IllegalDocumentTypeException
- Set the DocumentType of this folder. Once set, folders can only be modified if the folder is empty, or cleared (via a null or empty type list). If cleared, the folder will have its DocumentTypes reset to its parent folders DocumentTypes on save
- Parameters:
- types - folder document types for this folder
- Throws:
- IllegalDocumentTypeException - if an attempt is made to alter the type (other than clear) and the folder isn't empty.
accept
boolean accept(Item item)
- Tests the DocumentType of the given document against this folder's one.
- Parameters:
- item - to check if acceptable
- Returns:
- true if this folder accepts the given document.
accept
boolean accept(DocumentId id) throws AuthorizationException, DocumentRetrievalException
- Tests the DocumentType of the given document id against this folder's one.
- Parameters:
- id - to check if acceptable
- Returns:
- true if this folder accepts the given document id.
- Throws:
- AuthorizationException
- DocumentRetrievalException
getChildren
ResultIterator<Item> getChildren() throws QueryServiceException
- Obtain items and folders under this folder.
- Returns:
- child items and folders as a ResultIterator.
- Throws:
- QueryServiceException
getChildFolders
ResultIterator<Folder> getChildFolders() throws QueryServiceException
- Obtain only child folders under this folder.
- Returns:
- folders under this folder as a ResultIterator.
- Throws:
- QueryServiceException
isEmpty
boolean isEmpty()
- Indicates if this folder contains any children
- Returns:
- true if this folder contains any children, false otherwise
isPresetFolder
boolean isPresetFolder()
- Returns true if this folder is a preset folder
- Returns:
- true if this folder is a preset folder, false otherwise
getParent
Item getParent()
- Get the parent folder. For top level folders that are directly under a preset folder, this will return the preset folder. If this folder is itself a preset folder null will be returned.
- Returns:
- parent folder as Item.
addDocument
void addDocument(Document document, boolean refreshDoc) throws IllegalDocumentTypeException, AuthorizationException, FolderException
- Add a document into this folder. The document type must be the correct type for this folder, that is, folders, authoring templates, presentation templates, or library components. This method can be called for both unsaved (i.e. new) and saved documents. In the case of unsaved documents, this method saves the new document under this folder. In the case of saved documents, this method moves the document into this folder and saves it in that location.
- Parameters:
- document - The document to add to this folder.
- refreshDoc - Indicates whether to refresh the properties of the added document. If not done, the properties of the document will not be correct.
- Throws:
- IllegalDocumentTypeException - The document type is not allowed
- AuthorizationException - The user is not authorized
- FolderException - An exception occurred executing the action
Tree PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD