Package org.opencms.cmis
Class CmsCmisResourceHelper
java.lang.Object
org.opencms.cmis.CmsCmisResourceHelper
- All Implemented Interfaces:
I_CmsCmisObjectHelper
Helper class for CRUD operations on resources.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.chemistry.opencmis.commons.data.Acl
collectAcl
(CmsObject cms, CmsResource resource, boolean onlyBasic) Compiles the ACL for a file or folder.protected org.apache.chemistry.opencmis.commons.data.AllowableActions
collectAllowableActions
(CmsObject cms, CmsResource file) Compiles the allowable actions for a file or folder.protected org.apache.chemistry.opencmis.commons.data.ObjectData
collectObjectData
(CmsCmisCallContext context, CmsObject cms, CmsResource resource, Set<String> filter, String renditionFilter, boolean includeAllowableActions, boolean includeAcl, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships) Fills in an ObjectData record.protected org.apache.chemistry.opencmis.commons.data.Properties
collectProperties
(CmsObject cms, CmsResource resource, Set<String> orgfilter, org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl objectInfo) Gathers all base properties of a file or folder.protected List<org.apache.chemistry.opencmis.commons.data.RenditionData>
collectRenditions
(CmsObject cms, CmsResource resource, String renditionFilterString, org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl objectInfo) Collects renditions for a resource.void
deleteObject
(CmsCmisCallContext context, String objectId, boolean allVersions) Deletes a CMIS object.org.apache.chemistry.opencmis.commons.data.Acl
getAcl
(CmsCmisCallContext context, String objectId, boolean onlyBasicPermissions) Gets the ACL for an object.org.apache.chemistry.opencmis.commons.data.AllowableActions
getAllowableActions
(CmsCmisCallContext context, String objectId) Gets the allowable actions for an object.org.apache.chemistry.opencmis.commons.data.ObjectData
getObject
(CmsCmisCallContext context, String objectId, String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds, boolean includeAcl) Gets the data for a CMIS object.
-
Constructor Details
-
CmsCmisResourceHelper
Creates a new instance.- Parameters:
repository
- the underlying repository
-
-
Method Details
-
deleteObject
Deletes a CMIS object.- Specified by:
deleteObject
in interfaceI_CmsCmisObjectHelper
- Parameters:
context
- the call contextobjectId
- the id of the object to deleteallVersions
- flag to delete all version
-
getAcl
public org.apache.chemistry.opencmis.commons.data.Acl getAcl(CmsCmisCallContext context, String objectId, boolean onlyBasicPermissions) Gets the ACL for an object.- Specified by:
getAcl
in interfaceI_CmsCmisObjectHelper
- Parameters:
context
- the call contextobjectId
- the object idonlyBasicPermissions
- flag to only get basic permissions- Returns:
- the ACL for the object
-
getAllowableActions
public org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions(CmsCmisCallContext context, String objectId) Gets the allowable actions for an object.- Specified by:
getAllowableActions
in interfaceI_CmsCmisObjectHelper
- Parameters:
context
- the call contextobjectId
- the object id- Returns:
- the allowable actions
-
getObject
public org.apache.chemistry.opencmis.commons.data.ObjectData getObject(CmsCmisCallContext context, String objectId, String filter, boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds, boolean includeAcl) Gets the data for a CMIS object.- Specified by:
getObject
in interfaceI_CmsCmisObjectHelper
- Parameters:
context
- the CMIS call contextobjectId
- the id of the objectfilter
- the property filterincludeAllowableActions
- flag to include allowable actionsincludeRelationships
- flag to include relationshipsrenditionFilter
- the rendition filter stringincludePolicyIds
- flag to include policy idsincludeAcl
- flag to include ACLs- Returns:
- the CMIS object data
-
collectAcl
protected org.apache.chemistry.opencmis.commons.data.Acl collectAcl(CmsObject cms, CmsResource resource, boolean onlyBasic) throws CmsException Compiles the ACL for a file or folder.- Parameters:
cms
- the CMS contextresource
- the resource for which to collect the ACLsonlyBasic
- flag to only include basic ACEs- Returns:
- the ACL for the resource
- Throws:
CmsException
- if something goes wrong
-
collectAllowableActions
protected org.apache.chemistry.opencmis.commons.data.AllowableActions collectAllowableActions(CmsObject cms, CmsResource file) Compiles the allowable actions for a file or folder.- Parameters:
cms
- the current CMS contextfile
- the resource for which we want the allowable actions- Returns:
- the allowable actions for the given resource
-
collectObjectData
protected org.apache.chemistry.opencmis.commons.data.ObjectData collectObjectData(CmsCmisCallContext context, CmsObject cms, CmsResource resource, Set<String> filter, String renditionFilter, boolean includeAllowableActions, boolean includeAcl, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships) throws CmsException Fills in an ObjectData record.- Parameters:
context
- the call contextcms
- the CMS contextresource
- the resource for which we want the ObjectDatafilter
- the property filterrenditionFilter
- the rendition filter stringincludeAllowableActions
- true if the allowable actions should be includedincludeAcl
- true if the ACL entries should be includedincludeRelationships
- true if relationships should be included- Returns:
- the object data
- Throws:
CmsException
- if something goes wrong
-
collectProperties
protected org.apache.chemistry.opencmis.commons.data.Properties collectProperties(CmsObject cms, CmsResource resource, Set<String> orgfilter, org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl objectInfo) Gathers all base properties of a file or folder.- Parameters:
cms
- the current CMS contextresource
- the file for which we want the propertiesorgfilter
- the property filterobjectInfo
- the object info handler- Returns:
- the properties for the given resource
-
collectRenditions
protected List<org.apache.chemistry.opencmis.commons.data.RenditionData> collectRenditions(CmsObject cms, CmsResource resource, String renditionFilterString, org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl objectInfo) Collects renditions for a resource.- Parameters:
cms
- the CMS contextresource
- the resource for which we want the renditionsrenditionFilterString
- the filter string for the renditionsobjectInfo
- the object info in which the renditions should be saved- Returns:
- the rendition data for the given resource
-