Package org.silverpeas.core.cmis.model
Class CmisObject
- 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
 
 
 
- 
- 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
 - Direct Known Subclasses:
- CmisFile
 
 public abstract class CmisObject extends org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImplAn object in the CMIS model that is mapped to a resource in Silverpeas. It can be a collaborative space, an application, a category of a gallery, a folder of an EDM, a classification onto the PdC, or simply a contribution (publication, attachment, images, ...). ACmisObjectclass defines the properties that are expected for a given CMIS object, with some of them peculiar to its type. It is a way to map the properties of a Silverpeas resource to those of a CMIS object and then, from them, to generalize the build of CMIS data done by a CMIS repository. Because Silverpeas objects are localized, then a CMIS object mapped to such an object is always localized to the locale setting of the current user behind the CMIS request.All the objects in CMIS must satisfy the following properties: unique identifier, name, description, creation and last modification date, creator's name, last updater's name, ACL, and allowable actions. - Author:
- mmoquillon
- See Also:
- Serialized Form
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T extends CmisObject>
 TaddACEs(User user)Adds the ACEs relative to the specified user and regarding to this CMIS object in the ACL of the objet.org.apache.chemistry.opencmis.commons.data.AclgetAcl()Gets the ACL of this CMIS object.org.apache.chemistry.opencmis.commons.data.AllowableActionsgetAllowableActions()Gets all the actions that are allowable on this CMIS object, whatever the permissions a user in Silverpeas can have in performing those actions.protected abstract Supplier<Set<org.apache.chemistry.opencmis.commons.enums.Action>>getAllowableActionsSupplier()Gets a supplier of the actions allowable on this CMIS object.abstract org.apache.chemistry.opencmis.commons.enums.BaseTypeIdgetBaseTypeId()Gets the identifier of the base type from which the type of the CMIS object is derived.longgetCreationDate()Gets the date at which this CMIS object was created.StringgetCreator()Gets the full name of the user that has authored this CMIS object.StringgetDescription()Gets a description of this CMIS object.StringgetId()Gets the unique identifier of the object in the CMIS objects tree.StringgetLabel()Gets the label, localized for the user behind the request, to display to the user as name of this CMIS object.StringgetLanguage()Gets the language in which some of the object's attributes are localized.longgetLastModificationDate()Gets the date at which this CMIS object was lastly modified.StringgetLastModifier()Gets the full name of the user that has lastly modified this CMIS object.StringgetName()Gets the name, localized for the user behind the request, of this CMIS object.abstract StringgetSymbol()Gets the possible UTF-8 symbol representing the type of this CMIS object.abstract TypeIdgetTypeId()Gets the identifier of the type of this CMIS object.booleanisDocument()Is this CMIS object a document in the CMIS objects tree?abstract booleanisFileable()Is this CMIS object file-able into the CMIS objects tree?<T extends CmisObject>
 TsetAcesSupplier(Function<User,List<org.apache.chemistry.opencmis.commons.data.Ace>> supplier)Sets a supplier of an ACL to apply on this CMIS object.voidsetAcl(org.apache.chemistry.opencmis.commons.data.Acl acl)Overrides the ACL of this CMIS object with this new one.<T extends CmisObject>
 TsetAllowableActions()Sets all the actions allowable on this CMIS object, whatever the permissions a user in Silverpeas can have in performing those actions, by using the supplier of the actions predefined for this object.<T extends CmisObject>
 TsetCreationDate(long creationDate)Sets the date at which this CMIS object was created.<T extends CmisObject>
 TsetCreator(String creator)Sets the full name of the user that has created this CMIS object.<T extends CmisObject>
 TsetDescription(String description)Sets a description about this CMIS object.voidsetIsExactAcl(Boolean isExactACL)This method does nothing.<T extends CmisObject>
 TsetLastModificationDate(long lastModificationDate)<T extends CmisObject>
 TsetLastModifier(String lastModifier)Sets the full name of the user that has modified this CMIS object.protected Set<org.apache.chemistry.opencmis.commons.enums.Action>theCommonActions()- 
Methods inherited from class org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImplgetChangeEventInfo, getPolicyIds, getProperties, getRelationships, getRenditions, isExactAcl, setAllowableActions, setChangeEventInfo, setPolicyIds, setProperties, setRelationships, setRenditions, toString
 - 
Methods inherited from class org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractExtensionDatagetExtensions, setExtensions
 
- 
 
- 
- 
- 
Method Detail- 
getIdpublic String getId() Gets the unique identifier of the object in the CMIS objects tree.- Specified by:
- getIdin interface- org.apache.chemistry.opencmis.commons.data.ObjectData
- Overrides:
- getIdin class- org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl
- Returns:
- the unique identifier of this CMIS object.
 
 - 
getSymbolpublic abstract String getSymbol() Gets the possible UTF-8 symbol representing the type of this CMIS object. It acts as an icon but instead of being a regular image the icon is encoded in UTF-8. Its goal is to mark the concrete type of the CMIS object upon its basic CMIS one (that is folder, document, ...)- Returns:
- the UTF-8 symbol representing the type of this object or an empty String if no symbol is defined.
 
 - 
isFileablepublic abstract boolean isFileable() Is this CMIS object file-able into the CMIS objects tree?- Returns:
- true if the object can be put in the CMIS objects tree as a node or a leaf of that tree. False otherwise
 
 - 
isDocumentpublic boolean isDocument() Is this CMIS object a document in the CMIS objects tree? A document is a file-able object that doesn't have any children (it is a leaf in the CMIS objects tree) and that has a content stream (beside any rendition content streams). Such objects must have as base type identifierBaseTypeId.CMIS_DOCUMENT.- Returns:
- true if this object is a document. False otherwise.
 
 - 
getNamepublic String getName() Gets the name, localized for the user behind the request, of this CMIS object.- Returns:
- the localized name of the object.
 
 - 
getLabelpublic String getLabel() Gets the label, localized for the user behind the request, to display to the user as name of this CMIS object.- Returns:
- the concatenation of the symbol and the name of this object. If no symbol is defined for this CMIS object, then the name is returned.
 
 - 
getLanguagepublic String getLanguage() Gets the language in which some of the object's attributes are localized.- Returns:
- an ISO 639-1 language code corresponding to the language of the user behind the request.
 
 - 
getBaseTypeIdpublic abstract org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId() Gets the identifier of the base type from which the type of the CMIS object is derived.- Specified by:
- getBaseTypeIdin interface- org.apache.chemistry.opencmis.commons.data.ObjectData
- Overrides:
- getBaseTypeIdin class- org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl
 
 - 
getTypeIdpublic abstract TypeId getTypeId() Gets the identifier of the type of this CMIS object.- Returns:
- a TypeIdenumeration value.
 
 - 
getDescriptionpublic String getDescription() Gets a description of this CMIS object.- Returns:
- a short description about it.
 
 - 
setDescriptionpublic <T extends CmisObject> T setDescription(String description) Sets a description about this CMIS object.- Type Parameters:
- T- the concrete Java type of this CMIS object.
- Parameters:
- description- a short text to set.
- Returns:
- itself.
 
 - 
getCreatorpublic String getCreator() Gets the full name of the user that has authored this CMIS object.- Returns:
- the full name of the creator.
 
 - 
setCreatorpublic <T extends CmisObject> T setCreator(String creator) Sets the full name of the user that has created this CMIS object.- Type Parameters:
- T- the concrete Java type of this CMIS object.
- Parameters:
- creator- the full name of a user in Silverpeas.
- Returns:
- itself.
 
 - 
getLastModifierpublic String getLastModifier() Gets the full name of the user that has lastly modified this CMIS object. By default, the first modifier is the creator of this object.- Returns:
- the full name of the last modifier.
 
 - 
setLastModifierpublic <T extends CmisObject> T setLastModifier(String lastModifier) Sets the full name of the user that has modified this CMIS object.- Type Parameters:
- T- the concrete Java type of this CMIS object.
- Parameters:
- lastModifier- the full name of a user in Silverpeas.
- Returns:
- itself.
 
 - 
getCreationDatepublic long getCreationDate() Gets the date at which this CMIS object was created.- Returns:
- the number of milliseconds since the EPOCH January 1, 1970, 00:00:00 GMT
 
 - 
setCreationDatepublic <T extends CmisObject> T setCreationDate(long creationDate) Sets the date at which this CMIS object was created.- Type Parameters:
- T- the concrete Java type of this CMIS object.
- Parameters:
- creationDate- a number of milliseconds since the EPOCH January 1, 1970, 00:00:00 GMT
- Returns:
- itself.
 
 - 
getLastModificationDatepublic long getLastModificationDate() Gets the date at which this CMIS object was lastly modified. By default, the first modification date is the date at which this object has been created.- Returns:
- the number of milliseconds since the EPOCH January 1, 1970, 00:00:00 GMT
 
 - 
setLastModificationDatepublic <T extends CmisObject> T setLastModificationDate(long lastModificationDate) 
 - 
addACEspublic <T extends CmisObject> T addACEs(User user) Adds the ACEs relative to the specified user and regarding to this CMIS object in the ACL of the objet. The ACEs are supplied by the function that was passed with thesetAcesSupplier(Function)function.- Returns:
- itself.
 
 - 
setAclpublic void setAcl(org.apache.chemistry.opencmis.commons.data.Acl acl) Overrides the ACL of this CMIS object with this new one. All the previous ACE that were set are then lost.- Specified by:
- setAclin interface- org.apache.chemistry.opencmis.commons.data.MutableObjectData
- Overrides:
- setAclin class- org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl
- Parameters:
- acl- the new ACL to set explicitly.
 
 - 
setIsExactAclpublic void setIsExactAcl(Boolean isExactACL) This method does nothing. The exactitude of the ACL regarding the permissions defined in the CMIS repository is centralized and controlled.- Specified by:
- setIsExactAclin interface- org.apache.chemistry.opencmis.commons.data.MutableObjectData
- Overrides:
- setIsExactAclin class- org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl
- Parameters:
- isExactACL- a boolean.
 
 - 
setAcesSupplierpublic <T extends CmisObject> T setAcesSupplier(Function<User,List<org.apache.chemistry.opencmis.commons.data.Ace>> supplier) Sets a supplier of an ACL to apply on this CMIS object.- Type Parameters:
- T- the concrete Java type of this CMIS object.
- Parameters:
- supplier- a function that supplies on demand a list of ACEs to apply on this object.
- Returns:
- itself.
 
 - 
getAclpublic org.apache.chemistry.opencmis.commons.data.Acl getAcl() Gets the ACL of this CMIS object. The ACL contains a list of ACEs that define for one or more users in Silverpeas the permissions they have regarding this object. Each permission authorizes or forbids the related user to perform one or more of the actions that are allowable on this CMIS object. For more information about the ACL and the allowable actions on CMIS objects, see CMIS specification- Specified by:
- getAclin interface- org.apache.chemistry.opencmis.commons.data.ObjectData
- Overrides:
- getAclin class- org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl
- Returns:
- an Aclobject.
- See Also:
- getAllowableActions()
 
 - 
getAllowableActionspublic org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions() Gets all the actions that are allowable on this CMIS object, whatever the permissions a user in Silverpeas can have in performing those actions. The actions are set only and only if thesetAllowableActions()was previously invoked. Indeed, in CMIS the allowable actions are requested on demand. For more information about the ACL and the allowable actions on CMIS objects, see CMIS specification- Specified by:
- getAllowableActionsin interface- org.apache.chemistry.opencmis.commons.data.ObjectData
- Overrides:
- getAllowableActionsin class- org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl
- Returns:
- a AllowableActionsobject.
 
 - 
setAllowableActionspublic <T extends CmisObject> T setAllowableActions() Sets all the actions allowable on this CMIS object, whatever the permissions a user in Silverpeas can have in performing those actions, by using the supplier of the actions predefined for this object. The goal of the supplier is to set the allowable actions in this object on the demand. In some circumstances, the allowable actions aren't requested and therefore don't need to be set. For more information about the ACL and the allowable actions on CMIS objects, see CMIS specification- Type Parameters:
- T- the concrete Java type of this CMIS object.
- Returns:
- itself.
 
 - 
getAllowableActionsSupplierprotected abstract Supplier<Set<org.apache.chemistry.opencmis.commons.enums.Action>> getAllowableActionsSupplier() Gets a supplier of the actions allowable on this CMIS object. The supplier is only invoked when thesetAllowableActions()is invoked.- Returns:
 
 - 
theCommonActionsprotected Set<org.apache.chemistry.opencmis.commons.enums.Action> theCommonActions() 
 
- 
 
-