public interface CmisObject extends ObjectId, CmisObjectProperties
Modifier and Type | Method and Description |
---|---|
Acl |
addAcl(List<Ace> addAces,
AclPropagation aclPropagation)
Adds ACEs to the object and refreshes this object afterwards.
|
Acl |
applyAcl(List<Ace> addAces,
List<Ace> removeAces,
AclPropagation aclPropagation)
Adds and removes ACEs to the object and refreshes this object afterwards.
|
void |
applyPolicy(ObjectId... policyIds)
Applies the provided policies and refreshes this object afterwards.
|
void |
applyPolicy(ObjectId policyId,
boolean refresh)
Applies the provided policy.
|
void |
delete()
Deletes this object.
|
void |
delete(boolean allVersions)
Deletes this object.
|
Acl |
getAcl()
Returns the ACL if it has been fetched for this object.
|
<T> T |
getAdapter(Class<T> adapterInterface)
Returns an adapter based on the given interface.
|
AllowableActions |
getAllowableActions()
Returns the allowable actions if they have been fetched for this object.
|
List<CmisExtensionElement> |
getExtensions(ExtensionLevel level)
Returns the extensions for the given level.
|
Set<String> |
getPermissionsForPrincipal(String principalId)
Returns all permissions for the given principal from the ACL.
|
List<Policy> |
getPolicies()
Returns the applied policies if they have been fetched for this object.
|
List<ObjectId> |
getPolicyIds()
Returns the applied policy IDs if they have been fetched for this object.
|
long |
getRefreshTimestamp()
Returns the timestamp of the last refresh.
|
List<Relationship> |
getRelationships()
Returns the relationships if they have been fetched for this object.
|
List<Rendition> |
getRenditions()
Returns the renditions if they have been fetched for this object.
|
boolean |
hasAllowableAction(Action action)
Returns if a given action in the Allowable Actions.
|
void |
refresh()
Reloads this object from the repository.
|
void |
refreshIfOld(long durationInMillis)
Reloads the data from the repository if the last refresh did not occur
within
durationInMillis . |
Acl |
removeAcl(List<Ace> removeAces,
AclPropagation aclPropagation)
Removes ACEs to the object and refreshes this object afterwards.
|
void |
removePolicy(ObjectId... policyIds)
Removes the provided policies and refreshes this object afterwards.
|
void |
removePolicy(ObjectId policyId,
boolean refresh)
Removes the provided policy.
|
CmisObject |
rename(String newName)
Renames this object (changes the value of
cmis:name ). |
ObjectId |
rename(String newName,
boolean refresh)
Renames this object (changes the value of
cmis:name ). |
Acl |
setAcl(List<Ace> aces)
Removes the direct ACE of this object, sets the provided ACEs to the
object and refreshes this object afterwards.
|
CmisObject |
updateProperties(Map<String,?> properties)
Updates the provided properties and refreshes this object afterwards.
|
ObjectId |
updateProperties(Map<String,?> properties,
boolean refresh)
Updates the provided properties.
|
CmisObject |
updateProperties(Map<String,?> properties,
List<String> addSecondaryTypeIds,
List<String> removeSecondaryTypeIds)
Updates the provided properties and refreshes this object afterwards.
|
ObjectId |
updateProperties(Map<String,?> properties,
List<String> addSecondaryTypeIds,
List<String> removeSecondaryTypeIds,
boolean refresh)
Updates the provided properties.
|
findObjectType, getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getDescription, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getSecondaryTypes, getType
AllowableActions getAllowableActions()
null
if the allowable actions
have not been requested or no allowable actions are returned by
the repositoryboolean hasAllowableAction(Action action)
action
- the action to test, must not be null
true
if the action was found in the Allowable Actions,
false
if the action was not found in the Allowable
ActionsIllegalStateException
- if the Allowable Actions haven't been fetched or provided by
the repositoryList<Relationship> getRelationships()
null
if the
relationships have not been requested or no relationships are
returned by the repositoryAcl getAcl()
Set<String> getPermissionsForPrincipal(String principalId)
principalId
- the principal ID, must not be null
IllegalStateException
- if the ACL hasn't been fetched or provided by the repositoryvoid delete()
void delete(boolean allVersions)
allVersions
- if this object is a document this parameter defines whether
only this version (false
) or all versions
(true
) should be deleted, the parameter is ignored
for all other object typesCmisObject updateProperties(Map<String,?> properties)
properties
- the properties to updateObjectId updateProperties(Map<String,?> properties, boolean refresh)
properties
- the properties to updaterefresh
- true
if this object should be refreshed after the
update, false
if notCmisObject updateProperties(Map<String,?> properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds)
properties
- the properties to updateaddSecondaryTypeIds
- list of secondary type IDs that should be added, may be
null
removeSecondaryTypeIds
- list of secondary type IDs that should be removed, may be
null
ObjectId updateProperties(Map<String,?> properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds, boolean refresh)
properties
- the properties to updateaddSecondaryTypeIds
- list of secondary type IDs that should be added, may be
null
removeSecondaryTypeIds
- list of secondary type IDs that should be removed, may be
null
refresh
- true
if this object should be refreshed after the
update, false
if notCmisObject rename(String newName)
cmis:name
). If the
repository created a new object, for example a new version, this new
object is returned. Otherwise the current object is returned.newName
- the new name, not null
or emptyObjectId rename(String newName, boolean refresh)
cmis:name
). If the
repository created a new object, for example a new version, the object id
of the new object is returned. Otherwise the object id of the current
object is returned.newName
- the new name, not null
or emptyrefresh
- true
if this object should be refreshed after the
update, false
if notList<Rendition> getRenditions()
null
if the renditions
have not been requested or no renditions exist for this objectvoid applyPolicy(ObjectId... policyIds)
policyIds
- the IDs of the policies to be appliedvoid applyPolicy(ObjectId policyId, boolean refresh)
policyId
- the ID of the policy to be appliedrefresh
- true
if this object should be refreshed after the
update, false
if notvoid removePolicy(ObjectId... policyIds)
policyIds
- the IDs of the policies to be removedvoid removePolicy(ObjectId policyId, boolean refresh)
policyId
- the ID of the policy to be removedrefresh
- true
if this object should be refreshed after the
update, false
if notList<Policy> getPolicies()
null
if
the policies have not been requested or no policies are applied
to this objectgetPolicyIds()
List<ObjectId> getPolicyIds()
null
if the
policies have not been requested or no policies are applied to
this objectgetPolicies()
Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation)
Acl addAcl(List<Ace> addAces, AclPropagation aclPropagation)
Acl removeAcl(List<Ace> removeAces, AclPropagation aclPropagation)
Acl setAcl(List<Ace> aces)
List<CmisExtensionElement> getExtensions(ExtensionLevel level)
level
- the levelnull
if there no
extensions<T> T getAdapter(Class<T> adapterInterface)
null
if no adapter object could be
createdlong getRefreshTimestamp()
void refresh()
CmisObjectNotFoundException
- if the object doesn't exist anymore in the repositoryvoid refreshIfOld(long durationInMillis)
durationInMillis
.CmisObjectNotFoundException
- if the object doesn't exist anymore in the repositoryCopyright © 2009–2017 The Apache Software Foundation. All rights reserved.