Class NuxeoObject

java.lang.Object
org.nuxeo.ecm.core.opencmis.impl.client.NuxeoObject
All Implemented Interfaces:
org.apache.chemistry.opencmis.client.api.CmisObject, org.apache.chemistry.opencmis.client.api.CmisObjectProperties, org.apache.chemistry.opencmis.client.api.ObjectId
Direct Known Subclasses:
NuxeoFileableObject, NuxeoRelationship

public abstract class NuxeoObject extends Object implements org.apache.chemistry.opencmis.client.api.CmisObject
Base abstract live local CMIS Object, wrapping a NuxeoSession and a NuxeoObjectData which is backed by a Nuxeo document.
  • Field Details

    • UPDATABILITY_READWRITE

      protected static final Set<org.apache.chemistry.opencmis.commons.enums.Updatability> UPDATABILITY_READWRITE
    • session

      protected final NuxeoSession session
    • service

      protected final org.apache.chemistry.opencmis.commons.server.CmisService service
    • nuxeoCmisService

      protected final NuxeoCmisService nuxeoCmisService
    • objectFactory

      protected final NuxeoObjectFactory objectFactory
    • data

      public final NuxeoObjectData data
    • type

      protected final org.apache.chemistry.opencmis.client.api.ObjectType type
    • secondaryTypes

      protected final List<org.apache.chemistry.opencmis.client.api.SecondaryType> secondaryTypes
    • allTypes

      protected final List<org.apache.chemistry.opencmis.client.api.ObjectType> allTypes
      type + secondaryTypes
  • Constructor Details

    • NuxeoObject

      public NuxeoObject(NuxeoSession session, NuxeoObjectData data, org.apache.chemistry.opencmis.client.api.ObjectType type, List<org.apache.chemistry.opencmis.client.api.SecondaryType> secondaryTypes)
  • Method Details

    • construct

      public static NuxeoObject construct(NuxeoSession session, NuxeoObjectData data, org.apache.chemistry.opencmis.client.api.ObjectType type, List<org.apache.chemistry.opencmis.client.api.SecondaryType> secondaryTypes)
    • getAdapter

      public <T> T getAdapter(Class<T> adapterInterface)
      Specified by:
      getAdapter in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getRepositoryId

      public String getRepositoryId()
    • getId

      public String getId()
      Specified by:
      getId in interface org.apache.chemistry.opencmis.client.api.ObjectId
    • getType

      public org.apache.chemistry.opencmis.client.api.ObjectType getType()
      Specified by:
      getType in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getBaseTypeId

      public org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId()
      Specified by:
      getBaseTypeId in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getBaseType

      public org.apache.chemistry.opencmis.client.api.ObjectType getBaseType()
      Specified by:
      getBaseType in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getSecondaryTypes

      public List<org.apache.chemistry.opencmis.client.api.SecondaryType> getSecondaryTypes()
      Specified by:
      getSecondaryTypes in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • findObjectType

      public List<org.apache.chemistry.opencmis.client.api.ObjectType> findObjectType(String id)
      Specified by:
      findObjectType in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getName

      public String getName()
      Specified by:
      getName in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getChangeToken

      public String getChangeToken()
      Specified by:
      getChangeToken in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getCreatedBy

      public String getCreatedBy()
      Specified by:
      getCreatedBy in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getCreationDate

      public GregorianCalendar getCreationDate()
      Specified by:
      getCreationDate in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getLastModificationDate

      public GregorianCalendar getLastModificationDate()
      Specified by:
      getLastModificationDate in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getLastModifiedBy

      public String getLastModifiedBy()
      Specified by:
      getLastModifiedBy in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • delete

      public void delete(boolean allVersions)
      Specified by:
      delete in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • delete

      public void delete()
      Specified by:
      delete in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • updateProperties

      public org.apache.chemistry.opencmis.client.api.CmisObject updateProperties(Map<String,?> properties)
      Specified by:
      updateProperties in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • updateProperties

      public org.apache.chemistry.opencmis.client.api.ObjectId updateProperties(Map<String,?> properties, boolean refresh)
      Specified by:
      updateProperties in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • updateProperties

      public org.apache.chemistry.opencmis.client.api.CmisObject updateProperties(Map<String,?> properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds)
      Specified by:
      updateProperties in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • updateProperties

      public org.apache.chemistry.opencmis.client.api.ObjectId updateProperties(Map<String,?> properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds, boolean refresh)
      Specified by:
      updateProperties in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • rename

      public org.apache.chemistry.opencmis.client.api.CmisObject rename(String newName)
      Specified by:
      rename in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • rename

      public org.apache.chemistry.opencmis.client.api.ObjectId rename(String newName, boolean refresh)
      Specified by:
      rename in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getPropertyValue

      public <T> T getPropertyValue(String id)
      Specified by:
      getPropertyValue in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getProperty

      public <T> org.apache.chemistry.opencmis.client.api.Property<T> getProperty(String id)
      Specified by:
      getProperty in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • getProperties

      public List<org.apache.chemistry.opencmis.client.api.Property<?>> getProperties()
      Specified by:
      getProperties in interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
    • addAcl

      public org.apache.chemistry.opencmis.commons.data.Acl addAcl(List<org.apache.chemistry.opencmis.commons.data.Ace> addAces, org.apache.chemistry.opencmis.commons.enums.AclPropagation aclPropagation)
      Specified by:
      addAcl in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • applyAcl

      public org.apache.chemistry.opencmis.commons.data.Acl applyAcl(List<org.apache.chemistry.opencmis.commons.data.Ace> addAces, List<org.apache.chemistry.opencmis.commons.data.Ace> removeAces, org.apache.chemistry.opencmis.commons.enums.AclPropagation aclPropagation)
      Specified by:
      applyAcl in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • setAcl

      public org.apache.chemistry.opencmis.commons.data.Acl setAcl(List<org.apache.chemistry.opencmis.commons.data.Ace> aces)
      Specified by:
      setAcl in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getAcl

      public org.apache.chemistry.opencmis.commons.data.Acl getAcl()
      Specified by:
      getAcl in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • removeAcl

      public org.apache.chemistry.opencmis.commons.data.Acl removeAcl(List<org.apache.chemistry.opencmis.commons.data.Ace> removeAces, org.apache.chemistry.opencmis.commons.enums.AclPropagation aclPropagation)
      Specified by:
      removeAcl in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getAllowableActions

      public org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions()
      Specified by:
      getAllowableActions in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getPolicies

      public List<org.apache.chemistry.opencmis.client.api.Policy> getPolicies()
      Specified by:
      getPolicies in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • applyPolicy

      public void applyPolicy(org.apache.chemistry.opencmis.client.api.ObjectId... policyIds)
      Specified by:
      applyPolicy in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • removePolicy

      public void removePolicy(org.apache.chemistry.opencmis.client.api.ObjectId... policyIds)
      Specified by:
      removePolicy in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getRelationships

      public List<org.apache.chemistry.opencmis.client.api.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getRenditions

      public List<org.apache.chemistry.opencmis.client.api.Rendition> getRenditions()
      Specified by:
      getRenditions in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • refresh

      public void refresh()
      Specified by:
      refresh in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • refreshIfOld

      public void refreshIfOld(long durationInMillis)
      Specified by:
      refreshIfOld in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getRefreshTimestamp

      public long getRefreshTimestamp()
      Specified by:
      getRefreshTimestamp in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getExtensions

      public List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> getExtensions(org.apache.chemistry.opencmis.commons.enums.ExtensionLevel level)
      Specified by:
      getExtensions in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • hasAllowableAction

      public boolean hasAllowableAction(org.apache.chemistry.opencmis.commons.enums.Action action)
      Specified by:
      hasAllowableAction in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getPermissionsForPrincipal

      public Set<String> getPermissionsForPrincipal(String principalId)
      Specified by:
      getPermissionsForPrincipal in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • applyPolicy

      public void applyPolicy(org.apache.chemistry.opencmis.client.api.ObjectId policyId, boolean refresh)
      Specified by:
      applyPolicy in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • removePolicy

      public void removePolicy(org.apache.chemistry.opencmis.client.api.ObjectId policyId, boolean refresh)
      Specified by:
      removePolicy in interface org.apache.chemistry.opencmis.client.api.CmisObject
    • getPolicyIds

      public List<org.apache.chemistry.opencmis.client.api.ObjectId> getPolicyIds()
      Specified by:
      getPolicyIds in interface org.apache.chemistry.opencmis.client.api.CmisObject