public class CmisServiceWrapper<T extends CmisService> extends Object implements CmisService
Modifier and Type | Field and Description |
---|---|
static BigInteger |
MINUS_ONE |
Constructor and Description |
---|
CmisServiceWrapper(T service,
BigInteger defaultTypesMaxItems,
BigInteger defaultTypesDepth,
BigInteger defaultMaxItems,
BigInteger defaultDepth)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addObjectToFolder(String repositoryId,
String objectId,
String folderId,
Boolean allVersions,
ExtensionsData extension)
Adds an existing fileable non-folder object to a folder.
|
void |
appendContentStream(String repositoryId,
Holder<String> objectId,
Holder<String> changeToken,
ContentStream contentStream,
boolean isLastChunk,
ExtensionsData extension)
Appends the content stream to the content of the document.
|
Acl |
applyAcl(String repositoryId,
String objectId,
Acl addAces,
Acl removeAces,
AclPropagation aclPropagation,
ExtensionsData extension)
Adds or removes the given ACEs to or from the ACL of the object.
|
Acl |
applyAcl(String repositoryId,
String objectId,
Acl aces,
AclPropagation aclPropagation)
Applies a new ACL to an object.
|
void |
applyPolicy(String repositoryId,
String policyId,
String objectId,
ExtensionsData extension)
Applies a specified policy to an object.
|
List<BulkUpdateObjectIdAndChangeToken> |
bulkUpdateProperties(String repositoryId,
List<BulkUpdateObjectIdAndChangeToken> objectIdAndChangeToken,
Properties properties,
List<String> addSecondaryTypeIds,
List<String> removeSecondaryTypeIds,
ExtensionsData extension)
Updates properties and secondary types of one or more objects.
|
void |
cancelCheckOut(String repositoryId,
String objectId,
ExtensionsData extension)
Reverses the effect of a check-out.
|
protected void |
checkContentStream(ContentStream content)
Throws an exception if the given content object is
null . |
protected void |
checkHolderId(String name,
Holder<String> holder)
Throws an exception if the given holder or id is
null or
empty. |
protected void |
checkId(String name,
String id)
Throws an exception if the given id is
null or empty. |
protected void |
checkIds(String name,
String... ids)
Throws an exception if the given ids are all
null or empty. |
void |
checkIn(String repositoryId,
Holder<String> objectId,
Boolean major,
Properties properties,
ContentStream contentStream,
String checkinComment,
List<String> policies,
Acl addAces,
Acl removeAces,
ExtensionsData extension)
Checks-in the private working copy (PWC) document.
|
protected void |
checkList(String name,
List<?> list)
Throws an exception if the given list is
null or empty. |
protected void |
checkNullOrPositive(String name,
BigInteger value)
Throws an exception if the given value is negative.
|
void |
checkOut(String repositoryId,
Holder<String> objectId,
ExtensionsData extension,
Holder<Boolean> contentCopied)
Create a private working copy of the document.
|
protected void |
checkPath(String name,
String path)
Throws an exception if the given path is
null or invalid. |
protected void |
checkProperties(Properties properties)
Throws an exception if the given properties set is
null . |
protected void |
checkProperty(Properties properties,
String propertyId,
Class<?> clazz)
Throws an exception if the given property isn't set or of the wrong type.
|
protected void |
checkQueryStatement(String statement)
Throws an exception if the given query statement is
null or
empty. |
protected void |
checkRepositoryId(String repositoryId)
Throws an exception if the repository id is
null or empty. |
protected void |
checkTypeDefinition(TypeDefinition typeDef)
Throws an exception if the given type definition is
null . |
void |
close()
Signals that this object will not be used anymore and resources can
released.
|
String |
create(String repositoryId,
Properties properties,
String folderId,
ContentStream contentStream,
VersioningState versioningState,
List<String> policies,
ExtensionsData extension)
Creates a new document, folder, policy, or item.
|
protected CmisBaseException |
createCmisException(Exception e)
Converts the given exception into a CMIS exception.
|
String |
createDocument(String repositoryId,
Properties properties,
String folderId,
ContentStream contentStream,
VersioningState versioningState,
List<String> policies,
Acl addAces,
Acl removeAces,
ExtensionsData extension)
Creates a document object of the specified type (given by the
cmis:objectTypeId property) in the (optionally) specified location.
|
String |
createDocumentFromSource(String repositoryId,
String sourceId,
Properties properties,
String folderId,
VersioningState versioningState,
List<String> policies,
Acl addAces,
Acl removeAces,
ExtensionsData extension)
Creates a document object as a copy of the given source document in the
(optionally) specified location.
|
String |
createFolder(String repositoryId,
Properties properties,
String folderId,
List<String> policies,
Acl addAces,
Acl removeAces,
ExtensionsData extension)
Creates a folder object of the specified type (given by the
cmis:objectTypeId property) in the specified location.
|
String |
createItem(String repositoryId,
Properties properties,
String folderId,
List<String> policies,
Acl addAces,
Acl removeAces,
ExtensionsData extension)
Creates an item object of the specified type (given by the
cmis:objectTypeId property).
|
String |
createPolicy(String repositoryId,
Properties properties,
String folderId,
List<String> policies,
Acl addAces,
Acl removeAces,
ExtensionsData extension)
Creates a policy object of the specified type (given by the
cmis:objectTypeId property).
|
String |
createRelationship(String repositoryId,
Properties properties,
List<String> policies,
Acl addAces,
Acl removeAces,
ExtensionsData extension)
Creates a relationship object of the specified type (given by the
cmis:objectTypeId property).
|
TypeDefinition |
createType(String repositoryId,
TypeDefinition type,
ExtensionsData extension)
Creates a new type.
|
void |
deleteContentStream(String repositoryId,
Holder<String> objectId,
Holder<String> changeToken,
ExtensionsData extension)
Deletes the content stream for the specified document object.
|
void |
deleteObject(String repositoryId,
String objectId,
Boolean allVersions,
ExtensionsData extension)
Deletes the specified object.
|
void |
deleteObjectOrCancelCheckOut(String repositoryId,
String objectId,
Boolean allVersions,
ExtensionsData extension)
Deletes an object or cancels a check out.
|
FailedToDeleteData |
deleteTree(String repositoryId,
String folderId,
Boolean allVersions,
UnfileObject unfileObjects,
Boolean continueOnFailure,
ExtensionsData extension)
Deletes the specified folder object and all of its child- and
descendant-objects.
|
void |
deleteType(String repositoryId,
String typeId,
ExtensionsData extension)
Deletes a type.
|
Acl |
getAcl(String repositoryId,
String objectId,
Boolean onlyBasicPermissions,
ExtensionsData extension)
Get the ACL currently applied to the specified object.
|
AllowableActions |
getAllowableActions(String repositoryId,
String objectId,
ExtensionsData extension)
Gets the list of allowable actions for an object.
|
List<ObjectData> |
getAllVersions(String repositoryId,
String objectId,
String versionSeriesId,
String filter,
Boolean includeAllowableActions,
ExtensionsData extension)
Returns the list of all document objects in the specified version series,
sorted by the property "cmis:creationDate" descending.
|
List<ObjectData> |
getAppliedPolicies(String repositoryId,
String objectId,
String filter,
ExtensionsData extension)
Gets the list of policies currently applied to the specified object.
|
ObjectList |
getCheckedOutDocs(String repositoryId,
String folderId,
String filter,
String orderBy,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
BigInteger maxItems,
BigInteger skipCount,
ExtensionsData extension)
Gets the list of documents that are checked out that the user has access
to.
|
ObjectInFolderList |
getChildren(String repositoryId,
String folderId,
String filter,
String orderBy,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
Boolean includePathSegment,
BigInteger maxItems,
BigInteger skipCount,
ExtensionsData extension)
Gets the list of child objects contained in the specified folder.
|
ObjectList |
getContentChanges(String repositoryId,
Holder<String> changeLogToken,
Boolean includeProperties,
String filter,
Boolean includePolicyIds,
Boolean includeAcl,
BigInteger maxItems,
ExtensionsData extension)
Gets a list of content changes.
|
ContentStream |
getContentStream(String repositoryId,
String objectId,
String streamId,
BigInteger offset,
BigInteger length,
ExtensionsData extension)
Gets the content stream for the specified document object, or gets a
rendition stream for a specified rendition of a document or folder
object.
|
protected AclPropagation |
getDefault(AclPropagation value)
Returns the
AclPropagation.REPOSITORYDETERMINED if
value is null . |
protected IncludeRelationships |
getDefault(IncludeRelationships value)
Returns the
IncludeRelationships.NONE if value
is null . |
protected RelationshipDirection |
getDefault(RelationshipDirection value)
Returns the
RelationshipDirection.SOURCE if
value is null . |
protected UnfileObject |
getDefault(UnfileObject value)
Returns the
UnfileObjects.DELETE if value is
null . |
protected VersioningState |
getDefault(VersioningState value)
Returns the
VersioningState.MAJOR if value is
null . |
protected Boolean |
getDefaultFalse(Boolean value)
Returns
false if value is null . |
protected String |
getDefaultRenditionFilter(String value)
Returns the
"cmis:none" if value is
null . |
protected Boolean |
getDefaultTrue(Boolean value)
Returns
true if value is null . |
protected BigInteger |
getDepth(BigInteger depth)
Checks the depth parameter if it complies with CMIS specification and
returns the default value if
depth is null . |
List<ObjectInFolderContainer> |
getDescendants(String repositoryId,
String folderId,
BigInteger depth,
String filter,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
Boolean includePathSegment,
ExtensionsData extension)
Gets the set of descendant objects contained in the specified folder or
any of its child folders.
|
ObjectData |
getFolderParent(String repositoryId,
String folderId,
String filter,
ExtensionsData extension)
Gets the parent folder object for the specified folder object.
|
List<ObjectInFolderContainer> |
getFolderTree(String repositoryId,
String folderId,
BigInteger depth,
String filter,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
Boolean includePathSegment,
ExtensionsData extension)
Gets the set of descendant folder objects contained in the specified
folder.
|
protected BigInteger |
getMaxItems(BigInteger maxItems)
Returns the default maxItems if
maxItems ==
null , throws an exception if maxItems < 0,
returns maxItems otherwise. |
ObjectData |
getObject(String repositoryId,
String objectId,
String filter,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
Boolean includePolicyIds,
Boolean includeAcl,
ExtensionsData extension)
Gets the specified information for the object specified by id.
|
ObjectData |
getObjectByPath(String repositoryId,
String path,
String filter,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
Boolean includePolicyIds,
Boolean includeAcl,
ExtensionsData extension)
Gets the specified information for the object specified by path.
|
ObjectInfo |
getObjectInfo(String repositoryId,
String objectId)
Returns the
ObjectInfo of the given object id or
null if no object info exists. |
ObjectData |
getObjectOfLatestVersion(String repositoryId,
String objectId,
String versionSeriesId,
Boolean major,
String filter,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
Boolean includePolicyIds,
Boolean includeAcl,
ExtensionsData extension)
Get the latest document object in the version series.
|
List<ObjectParentData> |
getObjectParents(String repositoryId,
String objectId,
String filter,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
Boolean includeRelativePathSegment,
ExtensionsData extension)
Gets the parent folder(s) for the specified non-folder, fileable object.
|
ObjectList |
getObjectRelationships(String repositoryId,
String objectId,
Boolean includeSubRelationshipTypes,
RelationshipDirection relationshipDirection,
String typeId,
String filter,
Boolean includeAllowableActions,
BigInteger maxItems,
BigInteger skipCount,
ExtensionsData extension)
Gets all or a subset of relationships associated with an independent
object.
|
Properties |
getProperties(String repositoryId,
String objectId,
String filter,
ExtensionsData extension)
Gets the list of properties for an object.
|
Properties |
getPropertiesOfLatestVersion(String repositoryId,
String objectId,
String versionSeriesId,
Boolean major,
String filter,
ExtensionsData extension)
Get a subset of the properties for the latest document object in the
version series.
|
List<RenditionData> |
getRenditions(String repositoryId,
String objectId,
String renditionFilter,
BigInteger maxItems,
BigInteger skipCount,
ExtensionsData extension)
Gets the list of associated renditions for the specified object.
|
RepositoryInfo |
getRepositoryInfo(String repositoryId,
ExtensionsData extension)
Returns information about the CMIS repository, the optional capabilities
it supports and its access control information if applicable.
|
List<RepositoryInfo> |
getRepositoryInfos(ExtensionsData extension)
Returns a list of CMIS repository information available from this CMIS
service endpoint.
|
protected BigInteger |
getSkipCount(BigInteger skipCount)
Returns 0 if
skipCount == null , throws an
exception if skipCount < 0, returns
skipCount otherwise. |
TypeDefinitionList |
getTypeChildren(String repositoryId,
String typeId,
Boolean includePropertyDefinitions,
BigInteger maxItems,
BigInteger skipCount,
ExtensionsData extension)
Returns the list of object types defined for the repository that are
children of the specified type.
|
TypeDefinition |
getTypeDefinition(String repositoryId,
String typeId,
ExtensionsData extension)
Gets the definition of the specified object type.
|
List<TypeDefinitionContainer> |
getTypeDescendants(String repositoryId,
String typeId,
BigInteger depth,
Boolean includePropertyDefinitions,
ExtensionsData extension)
Returns the set of descendant object type defined for the repository
under the specified type.
|
protected BigInteger |
getTypesDepth(BigInteger depth)
Checks the depth parameter if it complies with CMIS specification and
returns the default value if
depth is null . |
protected BigInteger |
getTypesMaxItems(BigInteger maxItems)
Returns the default maxItems if
maxItems ==
null , throws an exception if maxItems < 0,
returns maxItems otherwise. |
T |
getWrappedService() |
void |
moveObject(String repositoryId,
Holder<String> objectId,
String targetFolderId,
String sourceFolderId,
ExtensionsData extension)
Moves the specified file-able object from one folder to another.
|
ObjectList |
query(String repositoryId,
String statement,
Boolean searchAllVersions,
Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
String renditionFilter,
BigInteger maxItems,
BigInteger skipCount,
ExtensionsData extension)
Executes a CMIS query statement against the contents of the repository.
|
void |
removeObjectFromFolder(String repositoryId,
String objectId,
String folderId,
ExtensionsData extension)
Removes an existing fileable non-folder object from a folder.
|
void |
removePolicy(String repositoryId,
String policyId,
String objectId,
ExtensionsData extension)
Removes a specified policy from an object.
|
void |
setContentStream(String repositoryId,
Holder<String> objectId,
Boolean overwriteFlag,
Holder<String> changeToken,
ContentStream contentStream,
ExtensionsData extension)
Sets the content stream for the specified document object.
|
protected void |
setDefaultDepth(BigInteger defaultDepth)
Set the default depth.
|
protected void |
setDefaultMaxItems(BigInteger defaultMaxItems)
Set the default maxItems.
|
protected void |
setDefaultTypesDepth(BigInteger defaultTypesDepth)
Set the default depth.
|
protected void |
setDefaultTypesMaxItems(BigInteger defaultTypesMaxItems)
Set the default maxItems.
|
void |
updateProperties(String repositoryId,
Holder<String> objectId,
Holder<String> changeToken,
Properties properties,
ExtensionsData extension)
Updates properties of the specified object.
|
TypeDefinition |
updateType(String repositoryId,
TypeDefinition type,
ExtensionsData extension)
Updates a type.
|
public static final BigInteger MINUS_ONE
public CmisServiceWrapper(T service, BigInteger defaultTypesMaxItems, BigInteger defaultTypesDepth, BigInteger defaultMaxItems, BigInteger defaultDepth)
protected void setDefaultTypesMaxItems(BigInteger defaultTypesMaxItems)
protected void setDefaultTypesDepth(BigInteger defaultTypesDepth)
protected void setDefaultMaxItems(BigInteger defaultMaxItems)
protected void setDefaultDepth(BigInteger defaultDepth)
protected CmisBaseException createCmisException(Exception e)
protected void checkId(String name, String id)
null
or empty.protected void checkIds(String name, String... ids)
null
or empty.protected void checkHolderId(String name, Holder<String> holder)
null
or
empty.protected void checkRepositoryId(String repositoryId)
null
or empty.protected void checkPath(String name, String path)
null
or invalid.protected void checkProperties(Properties properties)
null
.protected void checkProperty(Properties properties, String propertyId, Class<?> clazz)
protected void checkContentStream(ContentStream content)
null
.protected void checkQueryStatement(String statement)
null
or
empty.protected void checkTypeDefinition(TypeDefinition typeDef)
null
.protected void checkList(String name, List<?> list)
null
or empty.protected IncludeRelationships getDefault(IncludeRelationships value)
IncludeRelationships.NONE
if value
is null
.protected VersioningState getDefault(VersioningState value)
VersioningState.MAJOR
if value
is
null
.protected UnfileObject getDefault(UnfileObject value)
UnfileObjects.DELETE
if value
is
null
.protected AclPropagation getDefault(AclPropagation value)
AclPropagation.REPOSITORYDETERMINED
if
value
is null
.protected RelationshipDirection getDefault(RelationshipDirection value)
RelationshipDirection.SOURCE
if
value
is null
.protected String getDefaultRenditionFilter(String value)
"cmis:none"
if value
is
null
.protected BigInteger getTypesMaxItems(BigInteger maxItems)
maxItems
==
null
, throws an exception if maxItems
< 0,
returns maxItems
otherwise.protected BigInteger getTypesDepth(BigInteger depth)
depth
is null
.protected BigInteger getMaxItems(BigInteger maxItems)
maxItems
==
null
, throws an exception if maxItems
< 0,
returns maxItems
otherwise.protected BigInteger getSkipCount(BigInteger skipCount)
skipCount
== null
, throws an
exception if skipCount
< 0, returns
skipCount
otherwise.protected BigInteger getDepth(BigInteger depth)
depth
is null
.protected void checkNullOrPositive(String name, BigInteger value)
public T getWrappedService()
public ObjectInfo getObjectInfo(String repositoryId, String objectId)
CmisService
ObjectInfo
of the given object id or
null
if no object info exists.
Only AtomPub requests will require object infos.getObjectInfo
in interface CmisService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectpublic void close()
CmisService
close
in interface CmisService
public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension)
RepositoryService
getRepositoryInfo
in interface RepositoryService
repositoryId
- the identifier for the repositorypublic List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension)
RepositoryService
getRepositoryInfos
in interface RepositoryService
public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
RepositoryService
getTypeChildren
in interface RepositoryService
repositoryId
- the identifier for the repositorytypeId
- (optional) the typeId of an object type specified in
the repository (if not specified the repository MUST return
all base object types)includePropertyDefinitions
- (optional) if true
the repository MUST
return the property definitions for each object type returned
(default is false
)maxItems
- (optional) the maximum number of items to return in a
response (default is repository specific)skipCount
- (optional) number of potential results that the
repository MUST skip/page over before returning any results
(default is 0)public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension)
RepositoryService
getTypeDefinition
in interface RepositoryService
repositoryId
- the identifier for the repositorytypeId
- typeId of an object type specified in the repositorypublic List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth, Boolean includePropertyDefinitions, ExtensionsData extension)
RepositoryService
getTypeDescendants
in interface RepositoryService
repositoryId
- the identifier for the repositorytypeId
- (optional) the typeId of an object type specified in
the repository (if not specified the repository MUST return
all types and MUST ignore the value of the depth parameter)depth
- (optional) the number of levels of depth in the type
hierarchy from which to return results (default is repository
specific)includePropertyDefinitions
- (optional) if true
the repository MUST
return the property definitions for each object type returned
(default is false
)public TypeDefinition createType(String repositoryId, TypeDefinition type, ExtensionsData extension)
RepositoryService
createType
in interface RepositoryService
repositoryId
- the identifier for the repositorytype
- the type definitionpublic TypeDefinition updateType(String repositoryId, TypeDefinition type, ExtensionsData extension)
RepositoryService
updateType
in interface RepositoryService
repositoryId
- the identifier for the repositorytype
- the type definitionpublic void deleteType(String repositoryId, String typeId, ExtensionsData extension)
RepositoryService
deleteType
in interface RepositoryService
repositoryId
- the identifier for the repositorytypeId
- typeId of an object type specified in the repositorypublic ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
NavigationService
getCheckedOutDocs
in interface NavigationService
repositoryId
- the identifier for the repositoryfolderId
- the identifier for the folderfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)orderBy
- (optional) a comma-separated list of query names that
define the order of the result set. Each query name must be
followed by the ascending modifier "ASC" or the descending
modifier "DESC" (default is repository specific)includeAllowableActions
- (optional) if true
, then the repository
must return the available actions for each object in the
result set (default is false
)includeRelationships
- (optional) indicates what relationships in which the
objects participate must be returned (default is
IncludeRelationships.NONE
)renditionFilter
- (optional) indicates what set of renditions the
repository must return whose kind matches this filter (default
is "cmis:none"
)maxItems
- (optional) the maximum number of items to return in a
response (default is repository specific)skipCount
- (optional) number of potential results that the
repository MUST skip/page over before returning any results
(default is 0)public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
NavigationService
getChildren
in interface NavigationService
repositoryId
- the identifier for the repositoryfolderId
- the identifier for the folderfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)orderBy
- (optional) a comma-separated list of query names that
define the order of the result set. Each query name must be
followed by the ascending modifier "ASC" or the descending
modifier "DESC" (default is repository specific)includeAllowableActions
- (optional) if true
, then the repository
must return the available actions for each object in the
result set (default is false
)includeRelationships
- (optional) indicates what relationships in which the
objects participate must be returned (default is
IncludeRelationships.NONE
)renditionFilter
- (optional) indicates what set of renditions the
repository must return whose kind matches this filter (default
is "cmis:none"
)includePathSegment
- (optional) if true
, returns a path
segment for each child object for use in constructing that
object's path (default is false
)maxItems
- (optional) the maximum number of items to return in a
response (default is repository specific)skipCount
- (optional) number of potential results that the
repository MUST skip/page over before returning any results
(default is 0)public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePathSegment, ExtensionsData extension)
NavigationService
getDescendants
in interface NavigationService
repositoryId
- the identifier for the repositoryfolderId
- the identifier for the folderdepth
- the number of levels of depth in the folder hierarchy from
which to return resultsfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)includeAllowableActions
- (optional) if true
, then the repository
must return the available actions for each object in the
result set (default is false
)includeRelationships
- (optional) indicates what relationships in which the
objects participate must be returned (default is
IncludeRelationships.NONE
)renditionFilter
- (optional) indicates what set of renditions the
repository must return whose kind matches this filter (default
is "cmis:none"
)includePathSegment
- (optional) if true
, returns a path
segment for each child object for use in constructing that
object's path (default is false
)public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension)
NavigationService
getFolderParent
in interface NavigationService
repositoryId
- the identifier for the repositoryfolderId
- the identifier for the folderfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePathSegment, ExtensionsData extension)
NavigationService
getFolderTree
in interface NavigationService
repositoryId
- the identifier for the repositoryfolderId
- the identifier for the folderdepth
- the number of levels of depth in the folder hierarchy from
which to return resultsfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)includeAllowableActions
- (optional) if true
, then the repository
must return the available actions for each object in the
result set (default is false
)includeRelationships
- (optional) indicates what relationships in which the
objects participate must be returned (default is
IncludeRelationships.NONE
)renditionFilter
- (optional) indicates what set of renditions the
repository must return whose kind matches this filter (default
is "cmis:none"
)includePathSegment
- (optional) if true
, returns a path
segment for each child object for use in constructing that
object's path (default is false
)public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includeRelativePathSegment, ExtensionsData extension)
NavigationService
getObjectParents
in interface NavigationService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)includeAllowableActions
- (optional) if true
, then the repository
must return the available actions for each object in the
result set (default is false
)includeRelationships
- (optional) indicates what relationships in which the
objects participate must be returned (default is
IncludeRelationships.NONE
)renditionFilter
- (optional) indicates what set of renditions the
repository must return whose kind matches this filter (default
is "cmis:none"
)includeRelativePathSegment
- (optional) if true
, returns a relative
path segment for each parent object for use in constructing
that object's path (default is false
)public String create(String repositoryId, Properties properties, String folderId, ContentStream contentStream, VersioningState versioningState, List<String> policies, ExtensionsData extension)
CmisService
create
in interface CmisService
repositoryId
- the identifier for the repositoryproperties
- the property values that MUST be applied to the newly created
objectfolderId
- (optional) if specified, the identifier for the
folder that MUST be the parent folder for the newly created
objectcontentStream
- (optional) if the object to create is a document
object, the content stream that MUST be stored for the newly
created document objectversioningState
- (optional) if the object to create is a document
object, it specifies what the versioning state of the newly
created object MUST be (default is
VersioningState.MAJOR
)policies
- (optional) a list of policy IDs that MUST be applied
to the newly created objectpublic String createDocument(String repositoryId, Properties properties, String folderId, ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
ObjectService
contentStream
is consumed but not closed by
this method.createDocument
in interface ObjectService
repositoryId
- the identifier for the repositoryproperties
- the property values that must be applied to the newly created
document objectfolderId
- (optional) if specified, the identifier for the
folder that must be the parent folder for the newly created
document objectcontentStream
- (optional) the content stream that must be stored for
the newly created document objectversioningState
- (optional) specifies what the versioning state of the
newly created object must be (default is
VersioningState.MAJOR
)policies
- (optional) a list of policy IDs that must be applied
to the newly created document objectaddAces
- (optional) a list of ACEs that must be added to the
newly created document object, either using the ACL from
folderId
if specified, or being applied if no
folderId
is specifiedremoveAces
- (optional) a list of ACEs that must be removed from
the newly created document object, either using the ACL from
folderId
if specified, or being ignored if no
folderId
is specifiedpublic String createDocumentFromSource(String repositoryId, String sourceId, Properties properties, String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
ObjectService
createDocumentFromSource
in interface ObjectService
repositoryId
- the identifier for the repositorysourceId
- the identifier for the source documentproperties
- the property values that must be applied to the newly created
document objectfolderId
- (optional) if specified, the identifier for the
folder that must be the parent folder for the newly created
document objectversioningState
- (optional) specifies what the versioning state of the
newly created object must be (default is
VersioningState.MAJOR
)policies
- (optional) a list of policy IDs that must be applied
to the newly created document objectaddAces
- (optional) a list of ACEs that must be added to the
newly created document object, either using the ACL from
folderId
if specified, or being applied if no
folderId
is specifiedremoveAces
- (optional) a list of ACEs that must be removed from
the newly created document object, either using the ACL from
folderId
if specified, or being ignored if no
folderId
is specifiedpublic String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
ObjectService
createFolder
in interface ObjectService
repositoryId
- the identifier for the repositoryproperties
- the property values that must be applied to the newly created
folder objectfolderId
- the identifier for the parent folderpolicies
- (optional) a list of policy IDs that must be applied
to the newly created folder objectaddAces
- (optional) a list of ACEs that must be added to the
newly created folder object, either using the ACL from
folderId
if specified, or being applied if no
folderId
is specifiedremoveAces
- (optional) a list of ACEs that must be removed from
the newly created folder object, either using the ACL from
folderId
if specified, or being ignored if no
folderId
is specifiedpublic String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
ObjectService
createPolicy
in interface ObjectService
repositoryId
- the identifier for the repositoryproperties
- the property values that must be applied to the newly created
policy objectfolderId
- (optional) if specified, the identifier for the
folder that must be the parent folder for the newly created
policy objectpolicies
- (optional) a list of policy IDs that must be applied
to the newly created policy objectaddAces
- (optional) a list of ACEs that must be added to the
newly created policy object, either using the ACL from
folderId
if specified, or being applied if no
folderId
is specifiedremoveAces
- (optional) a list of ACEs that must be removed from
the newly created policy object, either using the ACL from
folderId
if specified, or being ignored if no
folderId
is specifiedpublic String createItem(String repositoryId, Properties properties, String folderId, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
ObjectService
createItem
in interface ObjectService
repositoryId
- the identifier for the repositoryproperties
- the property values that must be applied to the newly created
policy objectfolderId
- (optional) if specified, the identifier for the
folder that must be the parent folder for the newly created
policy objectpolicies
- (optional) a list of policy IDs that must be applied
to the newly created policy objectaddAces
- (optional) a list of ACEs that must be added to the
newly created policy object, either using the ACL from
folderId
if specified, or being applied if no
folderId
is specifiedremoveAces
- (optional) a list of ACEs that must be removed from
the newly created policy object, either using the ACL from
folderId
if specified, or being ignored if no
folderId
is specifiedpublic String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
ObjectService
createRelationship
in interface ObjectService
repositoryId
- the identifier for the repositoryproperties
- the property values that must be applied to the newly created
relationship objectpolicies
- (optional) a list of policy IDs that must be applied
to the newly created relationship objectaddAces
- (optional) a list of ACEs that must be added to the
newly created relationship object, either using the ACL from
folderId
if specified, or being applied if no
folderId
is specifiedremoveAces
- (optional) a list of ACEs that must be removed from
the newly created relationship object, either using the ACL
from folderId
if specified, or being ignored if
no folderId
is specifiedpublic void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken, ExtensionsData extension)
ObjectService
deleteContentStream
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the object. The repository might return a
different/new object idchangeToken
- (optional) the last change token of this object that
the client received. The repository might return a new change
token (default is null
)public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension)
ObjectService
deleteObject
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectallVersions
- (optional) If true
then delete all
versions of the document, otherwise delete only the document
object specified (default is true
)public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension)
CmisService
deleteObjectOrCancelCheckOut
in interface CmisService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectallVersions
- (optional) If true
then delete all
versions of the document, otherwise delete only the document
object specified (default is true
)public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions, UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension)
ObjectService
deleteTree
in interface ObjectService
repositoryId
- the identifier for the repositoryfolderId
- the identifier for the folderallVersions
- (optional) If true
then delete all
versions of the document, otherwise delete only the document
object specified (default is true
)unfileObjects
- (optional) defines how the repository must process
file-able child- or descendant-objects (default is
UnfileObject.DELETE
)continueOnFailure
- (optional) If true
, then the repository
should continue attempting to perform this operation even if
deletion of a child- or descendant-object in the specified
folder cannot be deleted (default is false
)public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension)
ObjectService
getAllowableActions
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectpublic ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset, BigInteger length, ExtensionsData extension)
ObjectService
getContentStream
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectpublic ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension)
ObjectService
getObject
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)includeAllowableActions
- (optional) if true
, then the repository
must return the allowable actions for the object (default is
false
)includeRelationships
- (optional) indicates what relationships in which the
object participates must be returned (default is
IncludeRelationships.NONE
)renditionFilter
- (optional) indicates what set of renditions the
repository must return whose kind matches this filter (default
is "cmis:none"
)includePolicyIds
- (optional) if true
, then the repository
must return the policy ids for the object (default is
false
)includeAcl
- (optional) if true
, then the repository
must return the ACL for the object (default is
false
)public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension)
ObjectService
getObjectByPath
in interface ObjectService
repositoryId
- the identifier for the repositorypath
- the path to the objectfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)includeAllowableActions
- (optional) if true
, then the repository
must return the allowable actions for the object (default is
false
)includeRelationships
- (optional) indicates what relationships in which the
object participates must be returned (default is
IncludeRelationships.NONE
)renditionFilter
- (optional) indicates what set of renditions the
repository must return whose kind matches this filter (default
is "cmis:none"
)includePolicyIds
- (optional) if true
, then the repository
must return the policy ids for the object (default is
false
)includeAcl
- (optional) if true
, then the repository
must return the ACL for the object (default is
false
)public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension)
ObjectService
getProperties
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
ObjectService
getRenditions
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectrenditionFilter
- (optional) indicates what set of renditions the
repository must return whose kind matches this filter (default
is "cmis:none"
)maxItems
- (optional) the maximum number of items to return in a
response (default is repository specific)skipCount
- (optional) number of potential results that the
repository must skip/page over before returning any results
(default is 0)public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId, ExtensionsData extension)
ObjectService
moveObject
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the object. The repository might return a
different/new object idtargetFolderId
- the identifier for the target foldersourceFolderId
- the identifier for the source folderpublic void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag, Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension)
ObjectService
contentStream
is consumed but not closed by
this method.setContentStream
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the object. The repository might return a
different/new object idoverwriteFlag
- (optional) If true
, then the repository
must replace the existing content stream for the object (if
any) with the input content stream. If If false
,
then the repository must only set the input content stream for
the object if the object currently does not have a content
stream (default is true
)changeToken
- (optional) the last change token of this object that
the client received. The repository might return a new change
token (default is null
)contentStream
- the content streampublic void appendContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken, ContentStream contentStream, boolean isLastChunk, ExtensionsData extension)
ObjectService
appendContentStream
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the object. The repository might return a
different/new object idchangeToken
- (optional) the last change token of this object that
the client received. The repository might return a new change
token (default is null
)contentStream
- the content stream to appendisLastChunk
- indicates if this content stream is the last chunkpublic void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken, Properties properties, ExtensionsData extension)
ObjectService
updateProperties
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the object. The repository might return a
different/new object idchangeToken
- (optional) the last change token of this object that
the client received. The repository might return a new change
token (default is null
)properties
- the updated property values that must be applied to the objectpublic List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(String repositoryId, List<BulkUpdateObjectIdAndChangeToken> objectIdAndChangeToken, Properties properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds, ExtensionsData extension)
ObjectService
bulkUpdateProperties
in interface ObjectService
repositoryId
- the identifier for the repositoryobjectIdAndChangeToken
- the ids and change tokens of the objects to updateproperties
- the properties to setaddSecondaryTypeIds
- the secondary types to applyremoveSecondaryTypeIds
- the secondary types to removepublic void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension)
VersioningService
cancelCheckOut
in interface VersioningService
repositoryId
- the identifier for the repositorypublic void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties, ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
VersioningService
contentStream
is consumed but not closed by
this method.checkIn
in interface VersioningService
repositoryId
- the identifier for the repositorypublic void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension, Holder<Boolean> contentCopied)
VersioningService
checkOut
in interface VersioningService
repositoryId
- the identifier for the repositorypublic ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId, Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension)
VersioningService
getObjectOfLatestVersion
in interface VersioningService
repositoryId
- the identifier for the repositorypublic Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId, Boolean major, String filter, ExtensionsData extension)
VersioningService
getPropertiesOfLatestVersion
in interface VersioningService
repositoryId
- the identifier for the repositorypublic List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter, Boolean includeAllowableActions, ExtensionsData extension)
VersioningService
objectId
or the versionSeriesId
parameter must be set.getAllVersions
in interface VersioningService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectversionSeriesId
- the identifier for the objectfilter
- (optional) a comma-separated list of query names that
defines which properties must be returned by the repository
(default is repository specific)includeAllowableActions
- (optional) if true
, then the repository
must return the allowable actions for the objects (default is
false
)public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties, String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension)
DiscoveryService
getContentChanges
in interface DiscoveryService
public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
DiscoveryService
query
in interface DiscoveryService
public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions, ExtensionsData extension)
MultiFilingService
addObjectToFolder
in interface MultiFilingService
public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension)
MultiFilingService
removeObjectFromFolder
in interface MultiFilingService
public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
RelationshipService
getObjectRelationships
in interface RelationshipService
public Acl applyAcl(String repositoryId, String objectId, Acl aces, AclPropagation aclPropagation)
CmisService
applyAcl
in interface CmisService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectaces
- the ACEs that should replace the current ACL of the objectaclPropagation
- (optional) specifies how ACEs should be handled
(default is AclPropagation.REPOSITORYDETERMINED
)public Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces, AclPropagation aclPropagation, ExtensionsData extension)
AclService
applyAcl
in interface AclService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectaddAces
- (optional) the ACEs to be addedremoveAces
- (optional) the ACEs to be removedaclPropagation
- (optional) specifies how ACEs should be handled
(default is AclPropagation.REPOSITORYDETERMINED
)public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension)
AclService
getAcl
in interface AclService
repositoryId
- the identifier for the repositoryobjectId
- the identifier for the objectonlyBasicPermissions
- (optional) an indicator if only basic permissions
should be returned (default is true
)public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension)
PolicyService
applyPolicy
in interface PolicyService
public List<ObjectData> getAppliedPolicies(String repositoryId, String objectId, String filter, ExtensionsData extension)
PolicyService
getAppliedPolicies
in interface PolicyService
public void removePolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension)
PolicyService
removePolicy
in interface PolicyService
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.