org.apache.chemistry.opencmis.server.support
Class CmisServiceWrapper<T extends CmisService>

java.lang.Object
  extended by org.apache.chemistry.opencmis.server.support.CmisServiceWrapper<T>
All Implemented Interfaces:
CmisService, AclService, DiscoveryService, MultiFilingService, NavigationService, ObjectService, PolicyService, RelationshipService, RepositoryService, VersioningService

public class CmisServiceWrapper<T extends CmisService>
extends Object
implements CmisService

Service wrapper.


Field Summary
static BigInteger MINUS_ONE
           
 
Constructor Summary
CmisServiceWrapper(T service, BigInteger defaultTypesMaxItems, BigInteger defaultTypesDepth, BigInteger defaultMaxItems, BigInteger defaultDepth)
          Constructor.
 
Method Summary
 void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions, ExtensionsData extension)
          Adds an existing fileable non-folder object to a folder.
 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.
 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 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.
 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 or policy.
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 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).
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINUS_ONE

public static final BigInteger MINUS_ONE
Constructor Detail

CmisServiceWrapper

public CmisServiceWrapper(T service,
                          BigInteger defaultTypesMaxItems,
                          BigInteger defaultTypesDepth,
                          BigInteger defaultMaxItems,
                          BigInteger defaultDepth)
Constructor.

Method Detail

setDefaultTypesMaxItems

protected void setDefaultTypesMaxItems(BigInteger defaultTypesMaxItems)
Set the default maxItems.


setDefaultTypesDepth

protected void setDefaultTypesDepth(BigInteger defaultTypesDepth)
Set the default depth.


setDefaultMaxItems

protected void setDefaultMaxItems(BigInteger defaultMaxItems)
Set the default maxItems.


setDefaultDepth

protected void setDefaultDepth(BigInteger defaultDepth)
Set the default depth.


createCmisException

protected CmisBaseException createCmisException(Exception e)
Converts the given exception into a CMIS exception.


checkId

protected void checkId(String name,
                       String id)
Throws an exception if the given id is null or empty.


checkIds

protected void checkIds(String name,
                        String... ids)
Throws an exception if the given ids are all null or empty.


checkHolderId

protected void checkHolderId(String name,
                             Holder<String> holder)
Throws an exception if the given holder or id is null or empty.


checkRepositoryId

protected void checkRepositoryId(String repositoryId)
Throws an exception if the repository id is null or empty.


checkPath

protected void checkPath(String name,
                         String path)
Throws an exception if the given path is null or invalid.


checkProperties

protected void checkProperties(Properties properties)
Throws an exception if the given properties set is null.


checkProperty

protected void checkProperty(Properties properties,
                             String propertyId,
                             Class<?> clazz)
Throws an exception if the given property isn't set or of the wrong type.


checkContentStream

protected void checkContentStream(ContentStream content)
Throws an exception if the given content object is null.


checkQueryStatement

protected void checkQueryStatement(String statement)
Throws an exception if the given query statement is null or empty.


getDefaultTrue

protected Boolean getDefaultTrue(Boolean value)
Returns true if value is null.


getDefaultFalse

protected Boolean getDefaultFalse(Boolean value)
Returns false if value is null.


getDefault

protected IncludeRelationships getDefault(IncludeRelationships value)
Returns the IncludeRelationships.NONE if value is null.


getDefault

protected VersioningState getDefault(VersioningState value)
Returns the VersioningState.MAJOR if value is null.


getDefault

protected UnfileObject getDefault(UnfileObject value)
Returns the UnfileObjects.DELETE if value is null.


getDefault

protected AclPropagation getDefault(AclPropagation value)
Returns the AclPropagation.REPOSITORYDETERMINED if value is null.


getDefault

protected RelationshipDirection getDefault(RelationshipDirection value)
Returns the RelationshipDirection.SOURCE if value is null .


getDefaultRenditionFilter

protected String getDefaultRenditionFilter(String value)
Returns the "cmis:none" if value is null.


getTypesMaxItems

protected BigInteger getTypesMaxItems(BigInteger maxItems)
Returns the default maxItems if maxItems == null, throws an exception if maxItems < 0, returns maxItems otherwise.


getTypesDepth

protected BigInteger getTypesDepth(BigInteger depth)
Checks the depth parameter if it complies with CMIS specification and returns the default value if depth is null.


getMaxItems

protected BigInteger getMaxItems(BigInteger maxItems)
Returns the default maxItems if maxItems == null, throws an exception if maxItems < 0, returns maxItems otherwise.


getSkipCount

protected BigInteger getSkipCount(BigInteger skipCount)
Returns 0 if skipCount == null, throws an exception if skipCount < 0, returns skipCount otherwise.


getDepth

protected BigInteger getDepth(BigInteger depth)
Checks the depth parameter if it complies with CMIS specification and returns the default value if depth is null.


checkNullOrPositive

protected void checkNullOrPositive(String name,
                                   BigInteger value)
Throws an exception if the given value is negative.


getWrappedService

public T getWrappedService()

getObjectInfo

public ObjectInfo getObjectInfo(String repositoryId,
                                String objectId)
Description copied from interface: CmisService
Returns the ObjectInfo of the given object id or null if no object info exists. Only AtomPub requests will require object infos.

Specified by:
getObjectInfo in interface CmisService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object

close

public void close()
Description copied from interface: CmisService
Signals that this object will not be used anymore and resources can released.

Specified by:
close in interface CmisService

getRepositoryInfo

public RepositoryInfo getRepositoryInfo(String repositoryId,
                                        ExtensionsData extension)
Description copied from interface: RepositoryService
Returns information about the CMIS repository, the optional capabilities it supports and its access control information if applicable.

Specified by:
getRepositoryInfo in interface RepositoryService
Parameters:
repositoryId - the identifier for the repository

getRepositoryInfos

public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension)
Description copied from interface: RepositoryService
Returns a list of CMIS repository information available from this CMIS service endpoint. In contrast to the CMIS specification this method returns repository infos not only repository ids.

Specified by:
getRepositoryInfos in interface RepositoryService

getTypeChildren

public TypeDefinitionList getTypeChildren(String repositoryId,
                                          String typeId,
                                          Boolean includePropertyDefinitions,
                                          BigInteger maxItems,
                                          BigInteger skipCount,
                                          ExtensionsData extension)
Description copied from interface: RepositoryService
Returns the list of object types defined for the repository that are children of the specified type.

Specified by:
getTypeChildren in interface RepositoryService
Parameters:
repositoryId - the identifier for the repository
typeId - (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)

getTypeDefinition

public TypeDefinition getTypeDefinition(String repositoryId,
                                        String typeId,
                                        ExtensionsData extension)
Description copied from interface: RepositoryService
Gets the definition of the specified object type.

Specified by:
getTypeDefinition in interface RepositoryService
Parameters:
repositoryId - the identifier for the repository
typeId - typeId of an object type specified in the repository

getTypeDescendants

public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId,
                                                        String typeId,
                                                        BigInteger depth,
                                                        Boolean includePropertyDefinitions,
                                                        ExtensionsData extension)
Description copied from interface: RepositoryService
Returns the set of descendant object type defined for the repository under the specified type.

Specified by:
getTypeDescendants in interface RepositoryService
Parameters:
repositoryId - the identifier for the repository
typeId - (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)

getCheckedOutDocs

public ObjectList getCheckedOutDocs(String repositoryId,
                                    String folderId,
                                    String filter,
                                    String orderBy,
                                    Boolean includeAllowableActions,
                                    IncludeRelationships includeRelationships,
                                    String renditionFilter,
                                    BigInteger maxItems,
                                    BigInteger skipCount,
                                    ExtensionsData extension)
Description copied from interface: NavigationService
Gets the list of documents that are checked out that the user has access to.

Specified by:
getCheckedOutDocs in interface NavigationService
Parameters:
repositoryId - the identifier for the repository
folderId - the identifier for the folder
filter - (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)

getChildren

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)
Description copied from interface: NavigationService
Gets the list of child objects contained in the specified folder.

Specified by:
getChildren in interface NavigationService
Parameters:
repositoryId - the identifier for the repository
folderId - the identifier for the folder
filter - (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)

getDescendants

public List<ObjectInFolderContainer> getDescendants(String repositoryId,
                                                    String folderId,
                                                    BigInteger depth,
                                                    String filter,
                                                    Boolean includeAllowableActions,
                                                    IncludeRelationships includeRelationships,
                                                    String renditionFilter,
                                                    Boolean includePathSegment,
                                                    ExtensionsData extension)
Description copied from interface: NavigationService
Gets the set of descendant objects contained in the specified folder or any of its child folders.

Specified by:
getDescendants in interface NavigationService
Parameters:
repositoryId - the identifier for the repository
folderId - the identifier for the folder
depth - the number of levels of depth in the folder hierarchy from which to return results
filter - (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)

getFolderParent

public ObjectData getFolderParent(String repositoryId,
                                  String folderId,
                                  String filter,
                                  ExtensionsData extension)
Description copied from interface: NavigationService
Gets the parent folder object for the specified folder object.

Specified by:
getFolderParent in interface NavigationService
Parameters:
repositoryId - the identifier for the repository
folderId - the identifier for the folder
filter - (optional) a comma-separated list of query names that defines which properties must be returned by the repository (default is repository specific)

getFolderTree

public List<ObjectInFolderContainer> getFolderTree(String repositoryId,
                                                   String folderId,
                                                   BigInteger depth,
                                                   String filter,
                                                   Boolean includeAllowableActions,
                                                   IncludeRelationships includeRelationships,
                                                   String renditionFilter,
                                                   Boolean includePathSegment,
                                                   ExtensionsData extension)
Description copied from interface: NavigationService
Gets the set of descendant folder objects contained in the specified folder.

Specified by:
getFolderTree in interface NavigationService
Parameters:
repositoryId - the identifier for the repository
folderId - the identifier for the folder
depth - the number of levels of depth in the folder hierarchy from which to return results
filter - (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)

getObjectParents

public List<ObjectParentData> getObjectParents(String repositoryId,
                                               String objectId,
                                               String filter,
                                               Boolean includeAllowableActions,
                                               IncludeRelationships includeRelationships,
                                               String renditionFilter,
                                               Boolean includeRelativePathSegment,
                                               ExtensionsData extension)
Description copied from interface: NavigationService
Gets the parent folder(s) for the specified non-folder, fileable object.

Specified by:
getObjectParents in interface NavigationService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
filter - (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)

create

public String create(String repositoryId,
                     Properties properties,
                     String folderId,
                     ContentStream contentStream,
                     VersioningState versioningState,
                     List<String> policies,
                     ExtensionsData extension)
Description copied from interface: CmisService
Creates a new document, folder or policy. The property "cmis:objectTypeId" defines the type and implicitly the base type.

Specified by:
create in interface CmisService
Parameters:
repositoryId - the identifier for the repository
properties - the property values that MUST be applied to the newly created object
folderId - (optional) if specified, the identifier for the folder that MUST be the parent folder for the newly created object
contentStream - (optional) if the object to create is a document object, the content stream that MUST be stored for the newly created document object
versioningState - (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 object

createDocument

public String createDocument(String repositoryId,
                             Properties properties,
                             String folderId,
                             ContentStream contentStream,
                             VersioningState versioningState,
                             List<String> policies,
                             Acl addAces,
                             Acl removeAces,
                             ExtensionsData extension)
Description copied from interface: ObjectService
Creates a document object of the specified type (given by the cmis:objectTypeId property) in the (optionally) specified location.

Specified by:
createDocument in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
properties - the property values that must be applied to the newly created document object
folderId - (optional) if specified, the identifier for the folder that must be the parent folder for the newly created document object
contentStream - (optional) the content stream that must be stored for the newly created document object
versioningState - (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 object
addAces - (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 specified
removeAces - (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 specified

createDocumentFromSource

public String createDocumentFromSource(String repositoryId,
                                       String sourceId,
                                       Properties properties,
                                       String folderId,
                                       VersioningState versioningState,
                                       List<String> policies,
                                       Acl addAces,
                                       Acl removeAces,
                                       ExtensionsData extension)
Description copied from interface: ObjectService
Creates a document object as a copy of the given source document in the (optionally) specified location.

Specified by:
createDocumentFromSource in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
sourceId - the identifier for the source document
properties - the property values that must be applied to the newly created document object
folderId - (optional) if specified, the identifier for the folder that must be the parent folder for the newly created document object
versioningState - (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 object
addAces - (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 specified
removeAces - (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 specified

createFolder

public String createFolder(String repositoryId,
                           Properties properties,
                           String folderId,
                           List<String> policies,
                           Acl addAces,
                           Acl removeAces,
                           ExtensionsData extension)
Description copied from interface: ObjectService
Creates a folder object of the specified type (given by the cmis:objectTypeId property) in the specified location.

Specified by:
createFolder in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
properties - the property values that must be applied to the newly created folder object
folderId - the identifier for the parent folder
policies - (optional) a list of policy IDs that must be applied to the newly created folder object
addAces - (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 specified
removeAces - (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 specified

createPolicy

public String createPolicy(String repositoryId,
                           Properties properties,
                           String folderId,
                           List<String> policies,
                           Acl addAces,
                           Acl removeAces,
                           ExtensionsData extension)
Description copied from interface: ObjectService
Creates a policy object of the specified type (given by the cmis:objectTypeId property).

Specified by:
createPolicy in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
properties - the property values that must be applied to the newly created policy object
folderId - (optional) if specified, the identifier for the folder that must be the parent folder for the newly created policy object
policies - (optional) a list of policy IDs that must be applied to the newly created policy object
addAces - (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 specified
removeAces - (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 specified

createRelationship

public String createRelationship(String repositoryId,
                                 Properties properties,
                                 List<String> policies,
                                 Acl addAces,
                                 Acl removeAces,
                                 ExtensionsData extension)
Description copied from interface: ObjectService
Creates a relationship object of the specified type (given by the cmis:objectTypeId property).

Specified by:
createRelationship in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
properties - the property values that must be applied to the newly created relationship object
policies - (optional) a list of policy IDs that must be applied to the newly created relationship object
addAces - (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 specified
removeAces - (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 specified

deleteContentStream

public void deleteContentStream(String repositoryId,
                                Holder<String> objectId,
                                Holder<String> changeToken,
                                ExtensionsData extension)
Description copied from interface: ObjectService
Deletes the content stream for the specified document object.

Specified by:
deleteContentStream in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object. The repository might return a different/new object id
changeToken - (optional) the last change token of this object that the client received. The repository might return a new change token (default is null)

deleteObject

public void deleteObject(String repositoryId,
                         String objectId,
                         Boolean allVersions,
                         ExtensionsData extension)
Description copied from interface: ObjectService
Deletes the specified object.

Specified by:
deleteObject in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
allVersions - (optional) If true then delete all versions of the document, otherwise delete only the document object specified (default is true)

deleteObjectOrCancelCheckOut

public void deleteObjectOrCancelCheckOut(String repositoryId,
                                         String objectId,
                                         Boolean allVersions,
                                         ExtensionsData extension)
Description copied from interface: CmisService
Deletes an object or cancels a check out. For the Web Services binding this is always an object deletion. For the AtomPub it depends on the referenced object. If it is a checked out document then the check out must be canceled. If the object is not a checked out document then the object must be deleted.

Specified by:
deleteObjectOrCancelCheckOut in interface CmisService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
allVersions - (optional) If true then delete all versions of the document, otherwise delete only the document object specified (default is true)

deleteTree

public FailedToDeleteData deleteTree(String repositoryId,
                                     String folderId,
                                     Boolean allVersions,
                                     UnfileObject unfileObjects,
                                     Boolean continueOnFailure,
                                     ExtensionsData extension)
Description copied from interface: ObjectService
Deletes the specified folder object and all of its child- and descendant-objects.

Specified by:
deleteTree in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
folderId - the identifier for the folder
allVersions - (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)

getAllowableActions

public AllowableActions getAllowableActions(String repositoryId,
                                            String objectId,
                                            ExtensionsData extension)
Description copied from interface: ObjectService
Gets the list of allowable actions for an object.

Specified by:
getAllowableActions in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object

getContentStream

public ContentStream getContentStream(String repositoryId,
                                      String objectId,
                                      String streamId,
                                      BigInteger offset,
                                      BigInteger length,
                                      ExtensionsData extension)
Description copied from interface: ObjectService
Gets the content stream for the specified document object, or gets a rendition stream for a specified rendition of a document or folder object.

Specified by:
getContentStream in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object

getObject

public ObjectData getObject(String repositoryId,
                            String objectId,
                            String filter,
                            Boolean includeAllowableActions,
                            IncludeRelationships includeRelationships,
                            String renditionFilter,
                            Boolean includePolicyIds,
                            Boolean includeAcl,
                            ExtensionsData extension)
Description copied from interface: ObjectService
Gets the specified information for the object specified by id.

Specified by:
getObject in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
filter - (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 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)

getObjectByPath

public ObjectData getObjectByPath(String repositoryId,
                                  String path,
                                  String filter,
                                  Boolean includeAllowableActions,
                                  IncludeRelationships includeRelationships,
                                  String renditionFilter,
                                  Boolean includePolicyIds,
                                  Boolean includeAcl,
                                  ExtensionsData extension)
Description copied from interface: ObjectService
Gets the specified information for the object specified by path.

Specified by:
getObjectByPath in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
path - the path to the object
filter - (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 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)

getProperties

public Properties getProperties(String repositoryId,
                                String objectId,
                                String filter,
                                ExtensionsData extension)
Description copied from interface: ObjectService
Gets the list of properties for an object.

Specified by:
getProperties in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
filter - (optional) a comma-separated list of query names that defines which properties must be returned by the repository (default is repository specific)

getRenditions

public List<RenditionData> getRenditions(String repositoryId,
                                         String objectId,
                                         String renditionFilter,
                                         BigInteger maxItems,
                                         BigInteger skipCount,
                                         ExtensionsData extension)
Description copied from interface: ObjectService
Gets the list of associated renditions for the specified object. Only rendition attributes are returned, not rendition stream.

Specified by:
getRenditions in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
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)

moveObject

public void moveObject(String repositoryId,
                       Holder<String> objectId,
                       String targetFolderId,
                       String sourceFolderId,
                       ExtensionsData extension)
Description copied from interface: ObjectService
Moves the specified file-able object from one folder to another.

Specified by:
moveObject in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object. The repository might return a different/new object id
targetFolderId - the identifier for the target folder
sourceFolderId - the identifier for the source folder

setContentStream

public void setContentStream(String repositoryId,
                             Holder<String> objectId,
                             Boolean overwriteFlag,
                             Holder<String> changeToken,
                             ContentStream contentStream,
                             ExtensionsData extension)
Description copied from interface: ObjectService
Sets the content stream for the specified document object.

Specified by:
setContentStream in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object. The repository might return a different/new object id
overwriteFlag - (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 stream

updateProperties

public void updateProperties(String repositoryId,
                             Holder<String> objectId,
                             Holder<String> changeToken,
                             Properties properties,
                             ExtensionsData extension)
Description copied from interface: ObjectService
Updates properties of the specified object.

Specified by:
updateProperties in interface ObjectService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object. The repository might return a different/new object id
changeToken - (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 object

cancelCheckOut

public void cancelCheckOut(String repositoryId,
                           String objectId,
                           ExtensionsData extension)
Description copied from interface: VersioningService
Reverses the effect of a check-out.

Specified by:
cancelCheckOut in interface VersioningService

checkIn

public void checkIn(String repositoryId,
                    Holder<String> objectId,
                    Boolean major,
                    Properties properties,
                    ContentStream contentStream,
                    String checkinComment,
                    List<String> policies,
                    Acl addAces,
                    Acl removeAces,
                    ExtensionsData extension)
Description copied from interface: VersioningService
Checks-in the private working copy (PWC) document.

Specified by:
checkIn in interface VersioningService

checkOut

public void checkOut(String repositoryId,
                     Holder<String> objectId,
                     ExtensionsData extension,
                     Holder<Boolean> contentCopied)
Description copied from interface: VersioningService
Create a private working copy of the document.

Specified by:
checkOut in interface VersioningService

getObjectOfLatestVersion

public ObjectData getObjectOfLatestVersion(String repositoryId,
                                           String objectId,
                                           String versionSeriesId,
                                           Boolean major,
                                           String filter,
                                           Boolean includeAllowableActions,
                                           IncludeRelationships includeRelationships,
                                           String renditionFilter,
                                           Boolean includePolicyIds,
                                           Boolean includeAcl,
                                           ExtensionsData extension)
Description copied from interface: VersioningService
Get the latest document object in the version series.

Specified by:
getObjectOfLatestVersion in interface VersioningService

getPropertiesOfLatestVersion

public Properties getPropertiesOfLatestVersion(String repositoryId,
                                               String objectId,
                                               String versionSeriesId,
                                               Boolean major,
                                               String filter,
                                               ExtensionsData extension)
Description copied from interface: VersioningService
Get a subset of the properties for the latest document object in the version series.

Specified by:
getPropertiesOfLatestVersion in interface VersioningService

getAllVersions

public List<ObjectData> getAllVersions(String repositoryId,
                                       String objectId,
                                       String versionSeriesId,
                                       String filter,
                                       Boolean includeAllowableActions,
                                       ExtensionsData extension)
Description copied from interface: VersioningService
Returns the list of all document objects in the specified version series, sorted by the property "cmis:creationDate" descending.

Specified by:
getAllVersions in interface VersioningService

getContentChanges

public ObjectList getContentChanges(String repositoryId,
                                    Holder<String> changeLogToken,
                                    Boolean includeProperties,
                                    String filter,
                                    Boolean includePolicyIds,
                                    Boolean includeAcl,
                                    BigInteger maxItems,
                                    ExtensionsData extension)
Description copied from interface: DiscoveryService
Gets a list of content changes.

Specified by:
getContentChanges in interface DiscoveryService

query

public ObjectList query(String repositoryId,
                        String statement,
                        Boolean searchAllVersions,
                        Boolean includeAllowableActions,
                        IncludeRelationships includeRelationships,
                        String renditionFilter,
                        BigInteger maxItems,
                        BigInteger skipCount,
                        ExtensionsData extension)
Description copied from interface: DiscoveryService
Executes a CMIS query statement against the contents of the repository.

Specified by:
query in interface DiscoveryService

addObjectToFolder

public void addObjectToFolder(String repositoryId,
                              String objectId,
                              String folderId,
                              Boolean allVersions,
                              ExtensionsData extension)
Description copied from interface: MultiFilingService
Adds an existing fileable non-folder object to a folder.

Specified by:
addObjectToFolder in interface MultiFilingService

removeObjectFromFolder

public void removeObjectFromFolder(String repositoryId,
                                   String objectId,
                                   String folderId,
                                   ExtensionsData extension)
Description copied from interface: MultiFilingService
Removes an existing fileable non-folder object from a folder.

Specified by:
removeObjectFromFolder in interface MultiFilingService

getObjectRelationships

public ObjectList getObjectRelationships(String repositoryId,
                                         String objectId,
                                         Boolean includeSubRelationshipTypes,
                                         RelationshipDirection relationshipDirection,
                                         String typeId,
                                         String filter,
                                         Boolean includeAllowableActions,
                                         BigInteger maxItems,
                                         BigInteger skipCount,
                                         ExtensionsData extension)
Description copied from interface: RelationshipService
Gets all or a subset of relationships associated with an independent object.

Specified by:
getObjectRelationships in interface RelationshipService

applyAcl

public Acl applyAcl(String repositoryId,
                    String objectId,
                    Acl aces,
                    AclPropagation aclPropagation)
Description copied from interface: CmisService
Applies a new ACL to an object. Since it is not possible to transmit an "add ACL" and a "remove ACL" via AtomPub, the merging has to be done the client side. The ACEs provided here is supposed to the new complete ACL.

Specified by:
applyAcl in interface CmisService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
aces - the ACEs that should replace the current ACL of the object
aclPropagation - (optional) specifies how ACEs should be handled (default is AclPropagation.REPOSITORYDETERMINED)

applyAcl

public Acl applyAcl(String repositoryId,
                    String objectId,
                    Acl addAces,
                    Acl removeAces,
                    AclPropagation aclPropagation,
                    ExtensionsData extension)
Description copied from interface: AclService
Adds or removes the given ACEs to or from the ACL of the object.

Specified by:
applyAcl in interface AclService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
addAces - (optional) the ACEs to be added
removeAces - (optional) the ACEs to be removed
aclPropagation - (optional) specifies how ACEs should be handled (default is AclPropagation.REPOSITORYDETERMINED)

getAcl

public Acl getAcl(String repositoryId,
                  String objectId,
                  Boolean onlyBasicPermissions,
                  ExtensionsData extension)
Description copied from interface: AclService
Get the ACL currently applied to the specified object.

Specified by:
getAcl in interface AclService
Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object
onlyBasicPermissions - (optional) an indicator if only basic permissions should be returned (default is true)

applyPolicy

public void applyPolicy(String repositoryId,
                        String policyId,
                        String objectId,
                        ExtensionsData extension)
Description copied from interface: PolicyService
Applies a specified policy to an object.

Specified by:
applyPolicy in interface PolicyService

getAppliedPolicies

public List<ObjectData> getAppliedPolicies(String repositoryId,
                                           String objectId,
                                           String filter,
                                           ExtensionsData extension)
Description copied from interface: PolicyService
Gets the list of policies currently applied to the specified object.

Specified by:
getAppliedPolicies in interface PolicyService

removePolicy

public void removePolicy(String repositoryId,
                         String policyId,
                         String objectId,
                         ExtensionsData extension)
Description copied from interface: PolicyService
Removes a specified policy from an object.

Specified by:
removePolicy in interface PolicyService


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.