org.xcmis.spi
Interface FolderData

All Superinterfaces:
ObjectData

public interface FolderData
extends ObjectData

Version:
$Id: $
Author:
Andrey Parfonov

Method Summary
 void addObject(ObjectData object)
          Add existed fileable object in this folder.
 ItemsIterator<ObjectData> getChildren(String orderBy)
          Get children of current folder.
 String getPath()
          Get absolute path to folder.
 boolean hasChildren()
           
 boolean isAllowedChildType(String typeId)
          Check is specified type in list of allowed child object types.
 boolean isRoot()
           
 void removeObject(ObjectData object)
          Remove fileable object from current folder.
 
Methods inherited from interface org.xcmis.spi.ObjectData
accept, applyPolicy, getACL, getBaseType, getChangeToken, getContentStream, getCreatedBy, getCreationDate, getLastModificationDate, getLastModifiedBy, getName, getObjectId, getParent, getParents, getPolicies, getProperties, getProperties, getProperty, getRelationships, getTypeDefinition, getTypeId, removePolicy, setACL, setProperties, setProperty
 

Method Detail

getPath

String getPath()
Get absolute path to folder. Path to root folder is '/'. This method is shortcut to property 'cmis:path'.

Returns:
path to this folder

getChildren

ItemsIterator<ObjectData> getChildren(String orderBy)
Get children of current folder. Implementation Compatibility: SHOULD be implemented if the implementation supports hierarchical view (capabilityGetDescendants, capabilityGetFolderTree). Otherwise empty ItemsIterator should be returned.

Parameters:
orderBy - comma-separated list of query names and the ascending modifier 'ASC' or the descending modifier 'DESC' for each query name. This parameter may be ignored if implementation has not possibility to sort items
Returns:
children iterator. If folder does not contains any children then empty ItemsIterator must be returned, never null.

hasChildren

boolean hasChildren()
Returns:
true if current folder has children and otherwise

addObject

void addObject(ObjectData object)
               throws ConstraintException
Add existed fileable object in this folder. 2.2.5.1 addObjectToFolder Implementation Compatibility: SHOULD be implemented if the implementation supports multifiling capability (capabilityMultifiling). Otherwise NotSupportedException should be thrown.

Parameters:
object - the object to be added
Throws:
ConstraintException - if object has type that is unsupported by current folder. See CMIS#ALLOWED_CHILD_OBJECT_TYPE_IDS
NotSupportedException - if multifiling capability is not supported

removeObject

void removeObject(ObjectData object)
Remove fileable object from current folder. This method don't remove object just unsigned it as child of this folder. Implementation Compatibility: SHOULD be implemented if the implementation supports unfiling capability (capabilityUnfiling). Otherwise NotSupportedException should be thrown.

Parameters:
object - object to be removed from current folder
Throws:
NotSupportedException - if unfiling capability is not supported

isAllowedChildType

boolean isAllowedChildType(String typeId)
Check is specified type in list of allowed child object types. Info about allowed child object types may be provided by property . Empty or null property minds there is no any constrains about child type for this folder and any fileable objects may be created or added (if multifiling supported) in this folder.

Parameters:
typeId - type to be checked
Returns:
true if type allowed as child and false otherwise

isRoot

boolean isRoot()
Returns:
true if current folder is root folder and otherwise


Copyright © 2010 eXo Platform SAS. All Rights Reserved.