org.apache.chemistry.opencmis.commons.spi
Interface ObjectService

All Known Subinterfaces:
CmisService
All Known Implementing Classes:
org.apache.chemistry.opencmis.commons.impl.server.AbstractCmisService, CmisServiceWrapper, JcrService

public interface ObjectService

Object Service interface.

See CMIS 1.0 specification for details on the operations, parameters, exceptions and the domain model.


Method Summary
 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.
 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.
 AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension)
          Gets the list of allowable actions for an object.
 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.
 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.
 Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension)
          Gets the list of properties for an object.
 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.
 void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId, ExtensionsData extension)
          Moves the specified file-able object from one folder to another.
 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.
 void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken, Properties properties, ExtensionsData extension)
          Updates properties of the specified object.
 

Method Detail

createDocument

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.

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

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.

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

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.

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

createRelationship

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).

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

createPolicy

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).

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

getAllowableActions

AllowableActions getAllowableActions(String repositoryId,
                                     String objectId,
                                     ExtensionsData extension)
Gets the list of allowable actions for an object.

Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object

getObject

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.

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)

getProperties

Properties getProperties(String repositoryId,
                         String objectId,
                         String filter,
                         ExtensionsData extension)
Gets the list of properties for an object.

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

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. Only rendition attributes are returned, not rendition stream.

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)

getObjectByPath

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.

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)

getContentStream

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.

Parameters:
repositoryId - the identifier for the repository
objectId - the identifier for the object

updateProperties

void updateProperties(String repositoryId,
                      Holder<String> objectId,
                      Holder<String> changeToken,
                      Properties properties,
                      ExtensionsData extension)
Updates properties of the specified object.

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

moveObject

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

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

deleteObject

void deleteObject(String repositoryId,
                  String objectId,
                  Boolean allVersions,
                  ExtensionsData extension)
Deletes the specified object.

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

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.

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)

setContentStream

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.

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

deleteContentStream

void deleteContentStream(String repositoryId,
                         Holder<String> objectId,
                         Holder<String> changeToken,
                         ExtensionsData extension)
Deletes the content stream for the specified document object.

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)


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