Class CmsCmisResourceHelper

java.lang.Object
org.opencms.cmis.CmsCmisResourceHelper
All Implemented Interfaces:
I_CmsCmisObjectHelper

public class CmsCmisResourceHelper extends Object implements I_CmsCmisObjectHelper
Helper class for CRUD operations on resources.

  • Constructor Details

  • Method Details

    • deleteObject

      public void deleteObject(CmsCmisCallContext context, String objectId, boolean allVersions)
      Deletes a CMIS object.

      Specified by:
      deleteObject in interface I_CmsCmisObjectHelper
      Parameters:
      context - the call context
      objectId - the id of the object to delete
      allVersions - 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 interface I_CmsCmisObjectHelper
      Parameters:
      context - the call context
      objectId - the object id
      onlyBasicPermissions - 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 interface I_CmsCmisObjectHelper
      Parameters:
      context - the call context
      objectId - 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 interface I_CmsCmisObjectHelper
      Parameters:
      context - the CMIS call context
      objectId - the id of the object
      filter - the property filter
      includeAllowableActions - flag to include allowable actions
      includeRelationships - flag to include relationships
      renditionFilter - the rendition filter string
      includePolicyIds - flag to include policy ids
      includeAcl - 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 context
      resource - the resource for which to collect the ACLs
      onlyBasic - 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 context
      file - 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 context
      cms - the CMS context
      resource - the resource for which we want the ObjectData
      filter - the property filter
      renditionFilter - the rendition filter string
      includeAllowableActions - true if the allowable actions should be included
      includeAcl - true if the ACL entries should be included
      includeRelationships - 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 context
      resource - the file for which we want the properties
      orgfilter - the property filter
      objectInfo - 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 context
      resource - the resource for which we want the renditions
      renditionFilterString - the filter string for the renditions
      objectInfo - the object info in which the renditions should be saved
      Returns:
      the rendition data for the given resource