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 |
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.
|
Set<String> |
getPermissonsForPrincipal(String principalId)
Deprecated.
use
getPermissionsForPrincipal(String) instead. |
List<Policy> |
getPolicies()
Returns the applied policies 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.
|
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.
|
findObjectType, getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getDescription, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getSecondaryTypes, getType
AllowableActions getAllowableActions()
boolean 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()
Acl 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 repository@Deprecated Set<String> getPermissonsForPrincipal(String principalId)
getPermissionsForPrincipal(String)
instead.void 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 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()
void applyPolicy(ObjectId... policyIds)
policyIds
- the IDs of the policies to be appliedvoid removePolicy(ObjectId... policyIds)
policyIds
- the IDs of the policies to be removedList<Policy> getPolicies()
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-2015 The Apache Software Foundation. All Rights Reserved.