org.apache.chemistry.opencmis.client.bindings.spi.local
Class ObjectServiceImpl

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.bindings.spi.local.AbstractLocalService
      extended by org.apache.chemistry.opencmis.client.bindings.spi.local.ObjectServiceImpl
All Implemented Interfaces:
ObjectService

public class ObjectServiceImpl
extends AbstractLocalService
implements ObjectService


Constructor Summary
ObjectServiceImpl(BindingSession session, CmisServiceFactory factory)
          Constructor.
 
Method Summary
 java.lang.String createDocument(java.lang.String repositoryId, Properties properties, java.lang.String folderId, ContentStream contentStream, VersioningState versioningState, java.util.List<java.lang.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.
 java.lang.String createDocumentFromSource(java.lang.String repositoryId, java.lang.String sourceId, Properties properties, java.lang.String folderId, VersioningState versioningState, java.util.List<java.lang.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.
 java.lang.String createFolder(java.lang.String repositoryId, Properties properties, java.lang.String folderId, java.util.List<java.lang.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.
 java.lang.String createPolicy(java.lang.String repositoryId, Properties properties, java.lang.String folderId, java.util.List<java.lang.String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
          Creates a policy object of the specified type (given by the cmis:objectTypeId property).
 java.lang.String createRelationship(java.lang.String repositoryId, Properties properties, java.util.List<java.lang.String> policies, Acl addAces, Acl removeAces, ExtensionsData extension)
          Creates a relationship object of the specified type (given by the cmis:objectTypeId property).
 void deleteContentStream(java.lang.String repositoryId, Holder<java.lang.String> objectId, Holder<java.lang.String> changeToken, ExtensionsData extension)
          Deletes the content stream for the specified document object.
 void deleteObject(java.lang.String repositoryId, java.lang.String objectId, java.lang.Boolean allVersions, ExtensionsData extension)
          Deletes the specified object.
 FailedToDeleteData deleteTree(java.lang.String repositoryId, java.lang.String folderId, java.lang.Boolean allVersions, UnfileObject unfileObjects, java.lang.Boolean continueOnFailure, ExtensionsData extension)
          Deletes the specified folder object and all of its child- and descendant-objects.
 AllowableActions getAllowableActions(java.lang.String repositoryId, java.lang.String objectId, ExtensionsData extension)
          Gets the list of allowable actions for an object.
 ContentStream getContentStream(java.lang.String repositoryId, java.lang.String objectId, java.lang.String streamId, java.math.BigInteger offset, java.math.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.
 ObjectData getObject(java.lang.String repositoryId, java.lang.String objectId, java.lang.String filter, java.lang.Boolean includeAllowableActions, IncludeRelationships includeRelationships, java.lang.String renditionFilter, java.lang.Boolean includePolicyIds, java.lang.Boolean includeAcl, ExtensionsData extension)
          Gets the specified information for the object specified by id.
 ObjectData getObjectByPath(java.lang.String repositoryId, java.lang.String path, java.lang.String filter, java.lang.Boolean includeAllowableActions, IncludeRelationships includeRelationships, java.lang.String renditionFilter, java.lang.Boolean includePolicyIds, java.lang.Boolean includeAcl, ExtensionsData extension)
          Gets the specified information for the object specified by path.
 Properties getProperties(java.lang.String repositoryId, java.lang.String objectId, java.lang.String filter, ExtensionsData extension)
          Gets the list of properties for an object.
 java.util.List<RenditionData> getRenditions(java.lang.String repositoryId, java.lang.String objectId, java.lang.String renditionFilter, java.math.BigInteger maxItems, java.math.BigInteger skipCount, ExtensionsData extension)
          Gets the list of associated renditions for the specified object.
 void moveObject(java.lang.String repositoryId, Holder<java.lang.String> objectId, java.lang.String targetFolderId, java.lang.String sourceFolderId, ExtensionsData extension)
          Moves the specified file-able object from one folder to another.
 void setContentStream(java.lang.String repositoryId, Holder<java.lang.String> objectId, java.lang.Boolean overwriteFlag, Holder<java.lang.String> changeToken, ContentStream contentStream, ExtensionsData extension)
          Sets the content stream for the specified document object.
 void updateProperties(java.lang.String repositoryId, Holder<java.lang.String> objectId, Holder<java.lang.String> changeToken, Properties properties, ExtensionsData extension)
          Updates properties of the specified object.
 
Methods inherited from class org.apache.chemistry.opencmis.client.bindings.spi.local.AbstractLocalService
createCallContext, getService, getServiceFactory, getSession, setServiceFactory, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectServiceImpl

public ObjectServiceImpl(BindingSession session,
                         CmisServiceFactory factory)
Constructor.

Method Detail

createDocument

public java.lang.String createDocument(java.lang.String repositoryId,
                                       Properties properties,
                                       java.lang.String folderId,
                                       ContentStream contentStream,
                                       VersioningState versioningState,
                                       java.util.List<java.lang.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 java.lang.String createDocumentFromSource(java.lang.String repositoryId,
                                                 java.lang.String sourceId,
                                                 Properties properties,
                                                 java.lang.String folderId,
                                                 VersioningState versioningState,
                                                 java.util.List<java.lang.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 java.lang.String createFolder(java.lang.String repositoryId,
                                     Properties properties,
                                     java.lang.String folderId,
                                     java.util.List<java.lang.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 java.lang.String createPolicy(java.lang.String repositoryId,
                                     Properties properties,
                                     java.lang.String folderId,
                                     java.util.List<java.lang.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 java.lang.String createRelationship(java.lang.String repositoryId,
                                           Properties properties,
                                           java.util.List<java.lang.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(java.lang.String repositoryId,
                                Holder<java.lang.String> objectId,
                                Holder<java.lang.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(java.lang.String repositoryId,
                         java.lang.String objectId,
                         java.lang.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)

deleteTree

public FailedToDeleteData deleteTree(java.lang.String repositoryId,
                                     java.lang.String folderId,
                                     java.lang.Boolean allVersions,
                                     UnfileObject unfileObjects,
                                     java.lang.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(java.lang.String repositoryId,
                                            java.lang.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(java.lang.String repositoryId,
                                      java.lang.String objectId,
                                      java.lang.String streamId,
                                      java.math.BigInteger offset,
                                      java.math.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(java.lang.String repositoryId,
                            java.lang.String objectId,
                            java.lang.String filter,
                            java.lang.Boolean includeAllowableActions,
                            IncludeRelationships includeRelationships,
                            java.lang.String renditionFilter,
                            java.lang.Boolean includePolicyIds,
                            java.lang.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(java.lang.String repositoryId,
                                  java.lang.String path,
                                  java.lang.String filter,
                                  java.lang.Boolean includeAllowableActions,
                                  IncludeRelationships includeRelationships,
                                  java.lang.String renditionFilter,
                                  java.lang.Boolean includePolicyIds,
                                  java.lang.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(java.lang.String repositoryId,
                                java.lang.String objectId,
                                java.lang.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 java.util.List<RenditionData> getRenditions(java.lang.String repositoryId,
                                                   java.lang.String objectId,
                                                   java.lang.String renditionFilter,
                                                   java.math.BigInteger maxItems,
                                                   java.math.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(java.lang.String repositoryId,
                       Holder<java.lang.String> objectId,
                       java.lang.String targetFolderId,
                       java.lang.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(java.lang.String repositoryId,
                             Holder<java.lang.String> objectId,
                             java.lang.Boolean overwriteFlag,
                             Holder<java.lang.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(java.lang.String repositoryId,
                             Holder<java.lang.String> objectId,
                             Holder<java.lang.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


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