org.apache.chemistry.opencmis.commons.server
Interface CmisService

All Superinterfaces:
AclService, DiscoveryService, MultiFilingService, NavigationService, ObjectService, PolicyService, RelationshipService, RepositoryService, VersioningService
All Known Implementing Classes:
CmisServiceWrapper

public interface CmisService
extends RepositoryService, NavigationService, ObjectService, VersioningService, DiscoveryService, MultiFilingService, RelationshipService, AclService, PolicyService

OpenCMIS server interface.

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

This interface adds a few more operations to the operation set defined by CMIS to address binding specific requirements.


Method Summary
 Acl applyAcl(String repositoryId, String objectId, Acl aces, AclPropagation aclPropagation)
          Applies a new ACL to an object.
 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.
 void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension)
          Deletes an object or cancels a check out.
 ObjectInfo getObjectInfo(String repositoryId, String objectId)
          Returns the ObjectInfo of the given object id or null if no object info exists.
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.RepositoryService
getRepositoryInfo, getRepositoryInfos, getTypeChildren, getTypeDefinition, getTypeDescendants
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.NavigationService
getCheckedOutDocs, getChildren, getDescendants, getFolderParent, getFolderTree, getObjectParents
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.ObjectService
createDocument, createDocumentFromSource, createFolder, createPolicy, createRelationship, deleteContentStream, deleteObject, deleteTree, getAllowableActions, getContentStream, getObject, getObjectByPath, getProperties, getRenditions, moveObject, setContentStream, updateProperties
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.VersioningService
cancelCheckOut, checkIn, checkOut, getAllVersions, getObjectOfLatestVersion, getPropertiesOfLatestVersion
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.DiscoveryService
getContentChanges, query
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.MultiFilingService
addObjectToFolder, removeObjectFromFolder
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.RelationshipService
getObjectRelationships
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.AclService
applyAcl, getAcl
 
Methods inherited from interface org.apache.chemistry.opencmis.commons.spi.PolicyService
applyPolicy, getAppliedPolicies, removePolicy
 

Method Detail

create

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

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
addAces - (optional) a list of ACEs that MUST be added to the newly created 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 object, either using the ACL from folderId if specified, or being ignored if no folderId is specified

deleteObjectOrCancelCheckOut

void deleteObjectOrCancelCheckOut(String repositoryId,
                                  String objectId,
                                  Boolean allVersions,
                                  ExtensionsData extension)
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.

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)

applyAcl

Acl applyAcl(String repositoryId,
             String objectId,
             Acl aces,
             AclPropagation aclPropagation)
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.

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)

getObjectInfo

ObjectInfo getObjectInfo(String repositoryId,
                         String objectId)
Returns the ObjectInfo of the given object id or null if no object info exists. Only AtomPub requests will require object infos.

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

close

void close()
Signals that this object will not be used anymore and resources can released.



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