Package org.silverpeas.core.cmis.model
Class CmisFolder
- java.lang.Object
-
- org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractExtensionData
-
- org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl
-
- org.silverpeas.core.cmis.model.CmisObject
-
- org.silverpeas.core.cmis.model.CmisFile
-
- org.silverpeas.core.cmis.model.CmisFolder
-
- All Implemented Interfaces:
Serializable
,org.apache.chemistry.opencmis.commons.data.ExtensionsData
,org.apache.chemistry.opencmis.commons.data.MutableObjectData
,org.apache.chemistry.opencmis.commons.data.ObjectData
,Fileable
,Folding
- Direct Known Subclasses:
Application
,ContributionFolder
,Publication
,Space
public abstract class CmisFolder extends CmisFile implements Folding
The abstract representation of a Silverpeas resource as a CMIS folder. In CMIS, a Folder is a file-able CMIS object that can contain others file-ables CMIS objects. In Silverpeas, a space, a component instance (aka application), a topic in an EDM, a gallery in a media library, ... are all a container of other objects and hence they can be represented by a CMIS folder.- Author:
- mmoquillon
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<org.apache.chemistry.opencmis.commons.enums.Action>
completeWithFolderActions(Set<org.apache.chemistry.opencmis.commons.enums.Action> actions)
protected Supplier<Set<org.apache.chemistry.opencmis.commons.enums.Action>>
getAllowableActionsSupplier()
Gets a supplier of the actions allowable on this CMIS object.static List<TypeId>
getAllowedChildrenType()
Gets the types of the objects this type of folder accept as children.boolean
isFolding()
Is this file has folding capabilities?boolean
isOrphaned()
A folder cannot be orphaned.CmisFolder
setParentId(String parentId)
Sets the unique identifier of the parent to this folder if any.-
Methods inherited from class org.silverpeas.core.cmis.model.CmisFile
completeWithFileActions, getParentId, getPath, isFileable
-
Methods inherited from class org.silverpeas.core.cmis.model.CmisObject
addACEs, getAcl, getAllowableActions, getBaseTypeId, getCreationDate, getCreator, getDescription, getId, getLabel, getLanguage, getLastModificationDate, getLastModifier, getName, getSymbol, getTypeId, isDocument, setAcesSupplier, setAcl, setAllowableActions, setCreationDate, setCreator, setDescription, setIsExactAcl, setLastModificationDate, setLastModifier, theCommonActions
-
Methods inherited from class org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl
getChangeEventInfo, getPolicyIds, getProperties, getRelationships, getRenditions, isExactAcl, setAllowableActions, setChangeEventInfo, setPolicyIds, setProperties, setRelationships, setRenditions, toString
-
Methods inherited from class org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractExtensionData
getExtensions, setExtensions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.chemistry.opencmis.commons.data.ExtensionsData
getExtensions, setExtensions
-
Methods inherited from interface org.silverpeas.core.cmis.model.Folding
getAllowedChildrenTypes, getParentId, isRoot
-
-
-
-
Method Detail
-
getAllowedChildrenType
public static List<TypeId> getAllowedChildrenType()
Gets the types of the objects this type of folder accept as children. This method returns an empty list by default and requires to be overridden by the children classes in the case theCmisFolder
is a CMIS Folder. Otherwise, nothing is returned.- Returns:
- a list with all the
TypeId
that can be a children of such a folder type. If it isn't a folder, then returns an empty list. By default, this implementation returns an empty list.
-
setParentId
public CmisFolder setParentId(String parentId)
Sets the unique identifier of the parent to this folder if any. If null, then this folder is a root one in the CMIS objects tree. Otherwise, the identifier must be the one of another CMIS folder; a folder cannot be orphaned.- Overrides:
setParentId
in classCmisFile
- Parameters:
parentId
- the unique identifier of the parent folder.- Returns:
- either the unique identifier of a folder, parent of it, or null if this folder is a root one in the CMIS objects tree.
-
isOrphaned
public boolean isOrphaned()
A folder cannot be orphaned.- Specified by:
isOrphaned
in interfaceFileable
- Returns:
- false.
-
isFolding
public boolean isFolding()
Description copied from class:CmisFile
Is this file has folding capabilities? A file has such capabilities when it can wrap others file-able objects.
-
getAllowableActionsSupplier
protected Supplier<Set<org.apache.chemistry.opencmis.commons.enums.Action>> getAllowableActionsSupplier()
Description copied from class:CmisObject
Gets a supplier of the actions allowable on this CMIS object. The supplier is only invoked when theCmisObject.setAllowableActions()
is invoked.- Specified by:
getAllowableActionsSupplier
in classCmisObject
- Returns:
-
-