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 aNuxeoSession
and aNuxeoObjectData
which is backed by a Nuxeo document.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<org.apache.chemistry.opencmis.client.api.ObjectType>
allTypes
type + secondaryTypesNuxeoObjectData
data
protected NuxeoCmisService
nuxeoCmisService
protected NuxeoObjectFactory
objectFactory
protected List<org.apache.chemistry.opencmis.client.api.SecondaryType>
secondaryTypes
protected org.apache.chemistry.opencmis.commons.server.CmisService
service
protected NuxeoSession
session
protected org.apache.chemistry.opencmis.client.api.ObjectType
type
protected static Set<org.apache.chemistry.opencmis.commons.enums.Updatability>
UPDATABILITY_READWRITE
-
Constructor Summary
Constructors Constructor Description NuxeoObject(NuxeoSession session, NuxeoObjectData data, org.apache.chemistry.opencmis.client.api.ObjectType type, List<org.apache.chemistry.opencmis.client.api.SecondaryType> secondaryTypes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
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)
void
applyPolicy(org.apache.chemistry.opencmis.client.api.ObjectId... policyIds)
void
applyPolicy(org.apache.chemistry.opencmis.client.api.ObjectId policyId, boolean refresh)
static NuxeoObject
construct(NuxeoSession session, NuxeoObjectData data, org.apache.chemistry.opencmis.client.api.ObjectType type, List<org.apache.chemistry.opencmis.client.api.SecondaryType> secondaryTypes)
void
delete()
void
delete(boolean allVersions)
List<org.apache.chemistry.opencmis.client.api.ObjectType>
findObjectType(String id)
org.apache.chemistry.opencmis.commons.data.Acl
getAcl()
<T> T
getAdapter(Class<T> adapterInterface)
org.apache.chemistry.opencmis.commons.data.AllowableActions
getAllowableActions()
org.apache.chemistry.opencmis.client.api.ObjectType
getBaseType()
org.apache.chemistry.opencmis.commons.enums.BaseTypeId
getBaseTypeId()
String
getChangeToken()
String
getCreatedBy()
GregorianCalendar
getCreationDate()
String
getDescription()
List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement>
getExtensions(org.apache.chemistry.opencmis.commons.enums.ExtensionLevel level)
String
getId()
GregorianCalendar
getLastModificationDate()
String
getLastModifiedBy()
String
getName()
Set<String>
getPermissionsForPrincipal(String principalId)
List<org.apache.chemistry.opencmis.client.api.Policy>
getPolicies()
List<org.apache.chemistry.opencmis.client.api.ObjectId>
getPolicyIds()
List<org.apache.chemistry.opencmis.client.api.Property<?>>
getProperties()
<T> org.apache.chemistry.opencmis.client.api.Property<T>
getProperty(String id)
<T> T
getPropertyValue(String id)
long
getRefreshTimestamp()
List<org.apache.chemistry.opencmis.client.api.Relationship>
getRelationships()
List<org.apache.chemistry.opencmis.client.api.Rendition>
getRenditions()
String
getRepositoryId()
List<org.apache.chemistry.opencmis.client.api.SecondaryType>
getSecondaryTypes()
org.apache.chemistry.opencmis.client.api.ObjectType
getType()
boolean
hasAllowableAction(org.apache.chemistry.opencmis.commons.enums.Action action)
void
refresh()
void
refreshIfOld(long durationInMillis)
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)
void
removePolicy(org.apache.chemistry.opencmis.client.api.ObjectId... policyIds)
void
removePolicy(org.apache.chemistry.opencmis.client.api.ObjectId policyId, boolean refresh)
org.apache.chemistry.opencmis.client.api.CmisObject
rename(String newName)
org.apache.chemistry.opencmis.client.api.ObjectId
rename(String newName, boolean refresh)
org.apache.chemistry.opencmis.commons.data.Acl
setAcl(List<org.apache.chemistry.opencmis.commons.data.Ace> aces)
org.apache.chemistry.opencmis.client.api.CmisObject
updateProperties(Map<String,?> properties)
org.apache.chemistry.opencmis.client.api.ObjectId
updateProperties(Map<String,?> properties, boolean refresh)
org.apache.chemistry.opencmis.client.api.CmisObject
updateProperties(Map<String,?> properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds)
org.apache.chemistry.opencmis.client.api.ObjectId
updateProperties(Map<String,?> properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds, boolean refresh)
-
-
-
Field Detail
-
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 Detail
-
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 Detail
-
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 interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getRepositoryId
public String getRepositoryId()
-
getId
public String getId()
- Specified by:
getId
in interfaceorg.apache.chemistry.opencmis.client.api.ObjectId
-
getType
public org.apache.chemistry.opencmis.client.api.ObjectType getType()
- Specified by:
getType
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getBaseTypeId
public org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId()
- Specified by:
getBaseTypeId
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getBaseType
public org.apache.chemistry.opencmis.client.api.ObjectType getBaseType()
- Specified by:
getBaseType
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getSecondaryTypes
public List<org.apache.chemistry.opencmis.client.api.SecondaryType> getSecondaryTypes()
- Specified by:
getSecondaryTypes
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
findObjectType
public List<org.apache.chemistry.opencmis.client.api.ObjectType> findObjectType(String id)
- Specified by:
findObjectType
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getChangeToken
public String getChangeToken()
- Specified by:
getChangeToken
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getCreatedBy
public String getCreatedBy()
- Specified by:
getCreatedBy
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getCreationDate
public GregorianCalendar getCreationDate()
- Specified by:
getCreationDate
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getLastModificationDate
public GregorianCalendar getLastModificationDate()
- Specified by:
getLastModificationDate
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getLastModifiedBy
public String getLastModifiedBy()
- Specified by:
getLastModifiedBy
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
delete
public void delete(boolean allVersions)
- Specified by:
delete
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
delete
public void delete()
- Specified by:
delete
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
updateProperties
public org.apache.chemistry.opencmis.client.api.CmisObject updateProperties(Map<String,?> properties)
- Specified by:
updateProperties
in interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
rename
public org.apache.chemistry.opencmis.client.api.CmisObject rename(String newName)
- Specified by:
rename
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
rename
public org.apache.chemistry.opencmis.client.api.ObjectId rename(String newName, boolean refresh)
- Specified by:
rename
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getPropertyValue
public <T> T getPropertyValue(String id)
- Specified by:
getPropertyValue
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getProperty
public <T> org.apache.chemistry.opencmis.client.api.Property<T> getProperty(String id)
- Specified by:
getProperty
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObjectProperties
-
getProperties
public List<org.apache.chemistry.opencmis.client.api.Property<?>> getProperties()
- Specified by:
getProperties
in interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getAcl
public org.apache.chemistry.opencmis.commons.data.Acl getAcl()
- Specified by:
getAcl
in interfaceorg.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 interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getAllowableActions
public org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions()
- Specified by:
getAllowableActions
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getPolicies
public List<org.apache.chemistry.opencmis.client.api.Policy> getPolicies()
- Specified by:
getPolicies
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
applyPolicy
public void applyPolicy(org.apache.chemistry.opencmis.client.api.ObjectId... policyIds)
- Specified by:
applyPolicy
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
removePolicy
public void removePolicy(org.apache.chemistry.opencmis.client.api.ObjectId... policyIds)
- Specified by:
removePolicy
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getRelationships
public List<org.apache.chemistry.opencmis.client.api.Relationship> getRelationships()
- Specified by:
getRelationships
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getRenditions
public List<org.apache.chemistry.opencmis.client.api.Rendition> getRenditions()
- Specified by:
getRenditions
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
refresh
public void refresh()
- Specified by:
refresh
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
refreshIfOld
public void refreshIfOld(long durationInMillis)
- Specified by:
refreshIfOld
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getRefreshTimestamp
public long getRefreshTimestamp()
- Specified by:
getRefreshTimestamp
in interfaceorg.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 interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
hasAllowableAction
public boolean hasAllowableAction(org.apache.chemistry.opencmis.commons.enums.Action action)
- Specified by:
hasAllowableAction
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getPermissionsForPrincipal
public Set<String> getPermissionsForPrincipal(String principalId)
- Specified by:
getPermissionsForPrincipal
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
applyPolicy
public void applyPolicy(org.apache.chemistry.opencmis.client.api.ObjectId policyId, boolean refresh)
- Specified by:
applyPolicy
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
removePolicy
public void removePolicy(org.apache.chemistry.opencmis.client.api.ObjectId policyId, boolean refresh)
- Specified by:
removePolicy
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
getPolicyIds
public List<org.apache.chemistry.opencmis.client.api.ObjectId> getPolicyIds()
- Specified by:
getPolicyIds
in interfaceorg.apache.chemistry.opencmis.client.api.CmisObject
-
-