Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisObjectService.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisObjectService.java?rev=936938&r1=936937&r2=936938&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisObjectService.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisObjectService.java Thu Apr 22 16:27:57 2010 @@ -44,194 +44,194 @@ import org.apache.chemistry.opencmis.com */ public interface CmisObjectService { - /** - * Creates new document. - * - * <p> - * Bindings: Web Services - * </p> - */ - String createDocument(CallContext context, String repositoryId, Properties properties, String folderId, - ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces, - Acl removeAces, ExtensionsData extension); - - /** - * Copies a document. - * - * <p> - * Bindings: Web Services - * </p> - */ - String createDocumentFromSource(CallContext context, String repositoryId, String sourceId, Properties properties, - String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces, - ExtensionsData extension); - - /** - * Creates a new folder. - * - * <p> - * Bindings: Web Services - * </p> - */ - String createFolder(CallContext context, String repositoryId, Properties properties, String folderId, - List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension); - - /** - * Create a new relationship. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - String createRelationship(CallContext context, String repositoryId, Properties properties, List<String> policies, - Acl addAces, Acl removeAces, ExtensionsData extension); - - /** - * Creates a new policy. - * - * <p> - * Bindings: Web Services - * </p> - */ - String createPolicy(CallContext context, String repositoryId, Properties properties, String folderId, - List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension); - - /** - * Creates a new document, folder or policy. The property - * "cmis:objectTypeId" defines the type and implicitly the base type. - * - * <p> - * Bindings: AtomPub - * </p> - */ - ObjectData create(CallContext context, String repositoryId, Properties properties, String folderId, - ContentStream contentStream, VersioningState versioningState, List<String> policies, - ExtensionsData extension, ObjectInfoHolder objectInfos); - - /** - * Gets the allowable actions. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - AllowableActions getAllowableActions(CallContext context, String repositoryId, String objectId, - ExtensionsData extension); - - /** - * Gets an object by id. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - ObjectData getObject(CallContext context, String repositoryId, String objectId, String filter, - Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, - Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, ObjectInfoHolder objectInfos); - - /** - * Gets the properties of an object. - * - * <p> - * Bindings: Web Services - * </p> - */ - Properties getProperties(CallContext context, String repositoryId, String objectId, String filter, - ExtensionsData extension); - - /** - * Gets the renditions of an object. - * - * <p> - * Bindings: Web Services - * </p> - */ - List<RenditionData> getRenditions(CallContext context, String repositoryId, String objectId, - String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension); - - /** - * Gets an object by path. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - ObjectData getObjectByPath(CallContext context, String repositoryId, String path, String filter, - Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, - Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, ObjectInfoHolder objectInfos); - - /** - * Gets the content of a document. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - ContentStream getContentStream(CallContext context, String repositoryId, String objectId, String streamId, - BigInteger offset, BigInteger length, ExtensionsData extension); - - /** - * Updates the properties of an object. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - ObjectData updateProperties(CallContext context, String repositoryId, Holder<String> objectId, - Holder<String> changeToken, Properties properties, Acl acl, ExtensionsData extension, - ObjectInfoHolder objectInfos); - - /** - * Moves an object. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - ObjectData moveObject(CallContext context, String repositoryId, Holder<String> objectId, String targetFolderId, - String sourceFolderId, ExtensionsData extension, ObjectInfoHolder objectInfos); - - /** - * 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. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - void deleteObjectOrCancelCheckOut(CallContext context, String repositoryId, String objectId, Boolean allVersions, - ExtensionsData extension); - - /** - * Deletes a folder tree. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - FailedToDeleteData deleteTree(CallContext context, String repositoryId, String folderId, Boolean allVersions, - UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension); - - /** - * Sets a new content. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - void setContentStream(CallContext context, String repositoryId, Holder<String> objectId, Boolean overwriteFlag, - Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension); - - /** - * Deletes a content. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - void deleteContentStream(CallContext context, String repositoryId, Holder<String> objectId, - Holder<String> changeToken, ExtensionsData extension); + /** + * Creates new document. + * + * <p> + * Bindings: Web Services + * </p> + */ + String createDocument(CallContext context, String repositoryId, Properties properties, String folderId, + ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces, + Acl removeAces, ExtensionsData extension); + + /** + * Copies a document. + * + * <p> + * Bindings: Web Services + * </p> + */ + String createDocumentFromSource(CallContext context, String repositoryId, String sourceId, Properties properties, + String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces, + ExtensionsData extension); + + /** + * Creates a new folder. + * + * <p> + * Bindings: Web Services + * </p> + */ + String createFolder(CallContext context, String repositoryId, Properties properties, String folderId, + List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension); + + /** + * Create a new relationship. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + String createRelationship(CallContext context, String repositoryId, Properties properties, List<String> policies, + Acl addAces, Acl removeAces, ExtensionsData extension); + + /** + * Creates a new policy. + * + * <p> + * Bindings: Web Services + * </p> + */ + String createPolicy(CallContext context, String repositoryId, Properties properties, String folderId, + List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension); + + /** + * Creates a new document, folder or policy. The property + * "cmis:objectTypeId" defines the type and implicitly the base type. + * + * <p> + * Bindings: AtomPub + * </p> + */ + ObjectData create(CallContext context, String repositoryId, Properties properties, String folderId, + ContentStream contentStream, VersioningState versioningState, List<String> policies, + ExtensionsData extension, ObjectInfoHolder objectInfos); + + /** + * Gets the allowable actions. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + AllowableActions getAllowableActions(CallContext context, String repositoryId, String objectId, + ExtensionsData extension); + + /** + * Gets an object by id. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + ObjectData getObject(CallContext context, String repositoryId, String objectId, String filter, + Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, + Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, ObjectInfoHolder objectInfos); + + /** + * Gets the properties of an object. + * + * <p> + * Bindings: Web Services + * </p> + */ + Properties getProperties(CallContext context, String repositoryId, String objectId, String filter, + ExtensionsData extension); + + /** + * Gets the renditions of an object. + * + * <p> + * Bindings: Web Services + * </p> + */ + List<RenditionData> getRenditions(CallContext context, String repositoryId, String objectId, + String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension); + + /** + * Gets an object by path. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + ObjectData getObjectByPath(CallContext context, String repositoryId, String path, String filter, + Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, + Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, ObjectInfoHolder objectInfos); + + /** + * Gets the content of a document. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + ContentStream getContentStream(CallContext context, String repositoryId, String objectId, String streamId, + BigInteger offset, BigInteger length, ExtensionsData extension); + + /** + * Updates the properties of an object. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + ObjectData updateProperties(CallContext context, String repositoryId, Holder<String> objectId, + Holder<String> changeToken, Properties properties, Acl acl, ExtensionsData extension, + ObjectInfoHolder objectInfos); + + /** + * Moves an object. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + ObjectData moveObject(CallContext context, String repositoryId, Holder<String> objectId, String targetFolderId, + String sourceFolderId, ExtensionsData extension, ObjectInfoHolder objectInfos); + + /** + * 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. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + void deleteObjectOrCancelCheckOut(CallContext context, String repositoryId, String objectId, Boolean allVersions, + ExtensionsData extension); + + /** + * Deletes a folder tree. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + FailedToDeleteData deleteTree(CallContext context, String repositoryId, String folderId, Boolean allVersions, + UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension); + + /** + * Sets a new content. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + void setContentStream(CallContext context, String repositoryId, Holder<String> objectId, Boolean overwriteFlag, + Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension); + + /** + * Deletes a content. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + void deleteContentStream(CallContext context, String repositoryId, Holder<String> objectId, + Holder<String> changeToken, ExtensionsData extension); }
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisPolicyService.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisPolicyService.java?rev=936938&r1=936937&r2=936938&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisPolicyService.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisPolicyService.java Thu Apr 22 16:27:57 2010 @@ -33,34 +33,34 @@ import org.apache.chemistry.opencmis.com */ public interface CmisPolicyService { - /** - * Applies a policy to an object. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - public ObjectData applyPolicy(CallContext context, String repositoryId, String policyId, String objectId, - ExtensionsData extension, ObjectInfoHolder objectInfos); + /** + * Applies a policy to an object. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + public ObjectData applyPolicy(CallContext context, String repositoryId, String policyId, String objectId, + ExtensionsData extension, ObjectInfoHolder objectInfos); - /** - * Removes a policy to an object. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - public void removePolicy(CallContext context, String repositoryId, String policyId, String objectId, - ExtensionsData extension); + /** + * Removes a policy to an object. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + public void removePolicy(CallContext context, String repositoryId, String policyId, String objectId, + ExtensionsData extension); - /** - * Get all applied policies of an object. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - public List<ObjectData> getAppliedPolicies(CallContext context, String repositoryId, String objectId, - String filter, ExtensionsData extension, ObjectInfoHolder objectInfos); + /** + * Get all applied policies of an object. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + public List<ObjectData> getAppliedPolicies(CallContext context, String repositoryId, String objectId, + String filter, ExtensionsData extension, ObjectInfoHolder objectInfos); } Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisRelationshipService.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisRelationshipService.java?rev=936938&r1=936937&r2=936938&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisRelationshipService.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisRelationshipService.java Thu Apr 22 16:27:57 2010 @@ -34,16 +34,16 @@ import org.apache.chemistry.opencmis.com */ public interface CmisRelationshipService { - /** - * Gets the relationships of an object. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - public ObjectList getObjectRelationships(CallContext context, String repositoryId, String objectId, - Boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, String typeId, - String filter, Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount, - ExtensionsData extension, ObjectInfoHolder objectInfos); + /** + * Gets the relationships of an object. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + public ObjectList getObjectRelationships(CallContext context, String repositoryId, String objectId, + Boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, String typeId, + String filter, Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount, + ExtensionsData extension, ObjectInfoHolder objectInfos); } Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisRepositoryService.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisRepositoryService.java?rev=936938&r1=936937&r2=936938&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisRepositoryService.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisRepositoryService.java Thu Apr 22 16:27:57 2010 @@ -37,51 +37,51 @@ import org.apache.chemistry.opencmis.com */ public interface CmisRepositoryService { - /** - * Gets all repository infos. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - List<RepositoryInfo> getRepositoryInfos(CallContext context, ExtensionsData extension); + /** + * Gets all repository infos. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + List<RepositoryInfo> getRepositoryInfos(CallContext context, ExtensionsData extension); - /** - * Gets the repository info of the specified repository. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - RepositoryInfo getRepositoryInfo(CallContext context, String repositoryId, ExtensionsData extension); + /** + * Gets the repository info of the specified repository. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + RepositoryInfo getRepositoryInfo(CallContext context, String repositoryId, ExtensionsData extension); - /** - * Gets the children of the given type. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - TypeDefinitionList getTypeChildren(CallContext context, String repositoryId, String typeId, - Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension); + /** + * Gets the children of the given type. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + TypeDefinitionList getTypeChildren(CallContext context, String repositoryId, String typeId, + Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension); - /** - * Gets the descendants of the given type. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - List<TypeDefinitionContainer> getTypeDescendants(CallContext context, String repositoryId, String typeId, - BigInteger depth, Boolean includePropertyDefinitions, ExtensionsData extension); + /** + * Gets the descendants of the given type. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + List<TypeDefinitionContainer> getTypeDescendants(CallContext context, String repositoryId, String typeId, + BigInteger depth, Boolean includePropertyDefinitions, ExtensionsData extension); - /** - * Gets the type definition of the given type. It must return a valid type - * or throw an exception. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - TypeDefinition getTypeDefinition(CallContext context, String repositoryId, String typeId, ExtensionsData extension); + /** + * Gets the type definition of the given type. It must return a valid type + * or throw an exception. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + TypeDefinition getTypeDefinition(CallContext context, String repositoryId, String typeId, ExtensionsData extension); } Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisVersioningService.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisVersioningService.java?rev=936938&r1=936937&r2=936938&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisVersioningService.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/CmisVersioningService.java Thu Apr 22 16:27:57 2010 @@ -38,61 +38,61 @@ import org.apache.chemistry.opencmis.com */ public interface CmisVersioningService { - /** - * Checks out a document. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - public ObjectData checkOut(CallContext context, String repositoryId, Holder<String> objectId, - ExtensionsData extension, Holder<Boolean> contentCopied, ObjectInfoHolder objectInfos); - - /** - * Cancels a check out. - * - * <p> - * Bindings: Web Services - * </p> - * - * @see CmisObjectService#deleteObjectOrCancelCheckOut(CallContext, String, - * String, Boolean, ExtensionsData) - */ - public void cancelCheckOut(CallContext context, String repositoryId, String objectId, ExtensionsData extension); - - public ObjectData checkIn(CallContext context, String repositoryId, Holder<String> objectId, Boolean major, - Properties properties, ContentStream contentStream, String checkinComment, List<String> policies, - Acl addAces, Acl removeAces, ExtensionsData extension, ObjectInfoHolder objectInfos); - - /** - * Gets the latest version an object. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - public ObjectData getObjectOfLatestVersion(CallContext context, String repositoryId, String versionSeriesId, - Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, - String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, - ObjectInfoHolder objectInfos); - - /** - * Gets the properties of latest version an object. - * - * <p> - * Bindings: Web Services - * </p> - */ - public Properties getPropertiesOfLatestVersion(CallContext context, String repositoryId, String versionSeriesId, - Boolean major, String filter, ExtensionsData extension); - - /** - * Gets the list of all versions of a document. - * - * <p> - * Bindings: AtomPub, Web Services - * </p> - */ - public List<ObjectData> getAllVersions(CallContext context, String repositoryId, String versionSeriesId, - String filter, Boolean includeAllowableActions, ExtensionsData extension, ObjectInfoHolder objectInfos); + /** + * Checks out a document. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + public ObjectData checkOut(CallContext context, String repositoryId, Holder<String> objectId, + ExtensionsData extension, Holder<Boolean> contentCopied, ObjectInfoHolder objectInfos); + + /** + * Cancels a check out. + * + * <p> + * Bindings: Web Services + * </p> + * + * @see CmisObjectService#deleteObjectOrCancelCheckOut(CallContext, String, + * String, Boolean, ExtensionsData) + */ + public void cancelCheckOut(CallContext context, String repositoryId, String objectId, ExtensionsData extension); + + public ObjectData checkIn(CallContext context, String repositoryId, Holder<String> objectId, Boolean major, + Properties properties, ContentStream contentStream, String checkinComment, List<String> policies, + Acl addAces, Acl removeAces, ExtensionsData extension, ObjectInfoHolder objectInfos); + + /** + * Gets the latest version an object. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + public ObjectData getObjectOfLatestVersion(CallContext context, String repositoryId, String versionSeriesId, + Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, + String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, + ObjectInfoHolder objectInfos); + + /** + * Gets the properties of latest version an object. + * + * <p> + * Bindings: Web Services + * </p> + */ + public Properties getPropertiesOfLatestVersion(CallContext context, String repositoryId, String versionSeriesId, + Boolean major, String filter, ExtensionsData extension); + + /** + * Gets the list of all versions of a document. + * + * <p> + * Bindings: AtomPub, Web Services + * </p> + */ + public List<ObjectData> getAllVersions(CallContext context, String repositoryId, String versionSeriesId, + String filter, Boolean includeAllowableActions, ExtensionsData extension, ObjectInfoHolder objectInfos); } Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/ObjectInfoHolder.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/ObjectInfoHolder.java?rev=936938&r1=936937&r2=936938&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/ObjectInfoHolder.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/ObjectInfoHolder.java Thu Apr 22 16:27:57 2010 @@ -29,13 +29,13 @@ import org.apache.chemistry.opencmis.com */ public interface ObjectInfoHolder { - /** - * Adds an object info. - */ - void addObjectInfo(ObjectInfo info); + /** + * Adds an object info. + */ + void addObjectInfo(ObjectInfo info); - /** - * Retrieves an object info. - */ - ObjectInfo getObjectInfo(String id); + /** + * Retrieves an object info. + */ + ObjectInfo getObjectInfo(String id); } Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AbstractServiceWrapper.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AbstractServiceWrapper.java?rev=936938&r1=936937&r2=936938&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AbstractServiceWrapper.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AbstractServiceWrapper.java Thu Apr 22 16:27:57 2010 @@ -42,288 +42,288 @@ import org.apache.commons.logging.LogFac */ public abstract class AbstractServiceWrapper { - private static final BigInteger MINUS_ONE = BigInteger.valueOf(-1); + private static final BigInteger MINUS_ONE = BigInteger.valueOf(-1); - private static final Log log = LogFactory.getLog(AbstractServiceWrapper.class); + private static final Log log = LogFactory.getLog(AbstractServiceWrapper.class); - private BigInteger fDefaultMaxItems = null; - private BigInteger fDefaultDepth = MINUS_ONE; + private BigInteger fDefaultMaxItems = null; + private BigInteger fDefaultDepth = MINUS_ONE; - /** - * Set the default maxItems. - */ - protected void setDefaultMaxItems(BigInteger defaultMaxItems) { - fDefaultMaxItems = defaultMaxItems; - } - - /** - * Set the default depth. - */ - protected void setDefaultDepth(BigInteger defaultDepth) { - fDefaultDepth = defaultDepth; - } - - /** - * Converts the given exception into a CMIS exception. - */ - protected CmisBaseException createCmisException(Exception e) { - if (e == null) { - // should never happen - // if it happens its the fault of the framework... - - return new CmisRuntimeException("Unknown exception!"); - } else if (e instanceof CmisBaseException) { - return (CmisBaseException) e; - } else { - // should not happen if the connector works correctly - // it's alarming enough to log the exception - log.warn(e); - - return new CmisRuntimeException(e.getMessage(), e); - } - } - - /** - * Throws an exception if the given id is <code>null</code> or empty. - */ - protected void checkId(String name, String id) { - if (id == null) { - throw new CmisInvalidArgumentException(name + " must be set!"); - } - - if (id.length() == 0) { - throw new CmisInvalidArgumentException(name + " must not be empty!"); - } - } - - /** - * Throws an exception if the given holder or id is <code>null</code> or - * empty. - */ - protected void checkHolderId(String name, Holder<String> holder) { - if (holder == null) { - throw new CmisInvalidArgumentException(name + " must be set!"); - } - - checkId(name, holder.getValue()); - } - - /** - * Throws an exception if the repository id is <code>null</code> or empty. - */ - protected void checkRepositoryId(String repositoryId) { - checkId("Repository Id", repositoryId); - } - - /** - * Throws an exception if the given path is <code>null</code> or invalid. - */ - protected void checkPath(String name, String path) { - if (path == null) { - throw new CmisInvalidArgumentException(name + " must be set!"); - } - - if (path.length() == 0) { - throw new CmisInvalidArgumentException(name + " must not be empty!"); - } - - if (path.charAt(0) != '/') { - throw new CmisInvalidArgumentException(name + " must start with '/'!"); - } - } - - /** - * Throws an exception if the given properties set is <code>null</code>. - */ - protected void checkProperties(Properties properties) { - if (properties == null) { - throw new CmisInvalidArgumentException("Properties must be set!"); - } - } - - /** - * Throws an exception if the given content object is <code>null</code>. - */ - protected void checkContentStream(ContentStream content) { - if (content == null) { - throw new CmisInvalidArgumentException("Content must be set!"); - } - } - - /** - * Throws an exception if the given query statement is <code>null</code> or - * empty. - */ - protected void checkQueryStatement(String statement) { - if (statement == null) { - throw new CmisInvalidArgumentException("Statement must be set!"); - } - - if (statement.length() == 0) { - throw new CmisInvalidArgumentException("Statement must not be empty!"); - } - } - - /** - * Returns <code>true<code> if <code>value</code> is <code>null</code>. - */ - protected Boolean getDefaultTrue(Boolean value) { - if (value == null) { - return Boolean.TRUE; - } - - return value; - } - - /** - * Returns <code>false<code> if <code>value</code> is <code>null</code>. - */ - protected Boolean getDefaultFalse(Boolean value) { - if (value == null) { - return Boolean.FALSE; - } - - return value; - } - - /** - * Returns the <code>IncludeRelationships.NONE<code> if <code>value</code> - * is <code>null</code>. - */ - protected IncludeRelationships getDefault(IncludeRelationships value) { - if (value == null) { - return IncludeRelationships.NONE; - } - - return value; - } - - /** - * Returns the <code>VersioningState.MAJOR<code> if <code>value</code> is - * <code>null</code>. - */ - protected VersioningState getDefault(VersioningState value) { - if (value == null) { - return VersioningState.MAJOR; - } - - return value; - } - - /** - * Returns the <code>UnfileObjects.DELETE<code> if <code>value</code> is - * <code>null</code>. - */ - protected UnfileObject getDefault(UnfileObject value) { - if (value == null) { - return UnfileObject.DELETE; - } - - return value; - } - - /** - * Returns the - * <code>AclPropagation.REPOSITORYDETERMINED<code> if <code>value</code> is - * <code>null</code>. - */ - protected AclPropagation getDefault(AclPropagation value) { - if (value == null) { - return AclPropagation.REPOSITORYDETERMINED; - } - - return value; - } - - /** - * Returns the - * <code>RelationshipDirection.SOURCE<code> if <code>value</code> is - * <code>null</code> . - */ - protected RelationshipDirection getDefault(RelationshipDirection value) { - if (value == null) { - return RelationshipDirection.SOURCE; - } - - return value; - } - - /** - * Returns the <code>"cmis:none"<code> if <code>value</code> is - * <code>null</code>. - */ - protected String getDefaultRenditionFilter(String value) { - if ((value == null) || (value.length() == 0)) { - return "cmis:none"; - } - - return value; - } - - /** - * Returns the default maxItems if <code>maxItems</code> == - * <code>null</code>, throws an exception if <code>maxItems</code> < 0, - * returns <code>maxItems</code> otherwise. - */ - protected BigInteger getMaxItems(BigInteger maxItems) { - if (maxItems == null) { - return fDefaultMaxItems; - } - - if (maxItems.compareTo(BigInteger.ZERO) == -1) { - throw new CmisInvalidArgumentException("maxItems must not be negative!"); - } - - return maxItems; - } - - /** - * Returns 0 if <code>skipCount</code> == <code>null</code>, throws an - * exception if <code>skipCount</code> < 0, returns - * <code>skipCount</code> otherwise. - */ - protected BigInteger getSkipCount(BigInteger skipCount) { - if (skipCount == null) { - return BigInteger.ZERO; - } - - if (skipCount.compareTo(BigInteger.ZERO) == -1) { - throw new CmisInvalidArgumentException("skipCount must not be negative!"); - } - - return skipCount; - } - - /** - * Checks the depth parameter if it complies with CMIS specification and - * returns the default value if <code>depth</code> is <code>null</code>. - */ - protected BigInteger getDepth(BigInteger depth) { - if (depth == null) { - return fDefaultDepth; - } - - if (depth.compareTo(BigInteger.ZERO) == 0) { - throw new CmisInvalidArgumentException("depth must not be 0!"); - } - - if (depth.compareTo(MINUS_ONE) == -1) { - throw new CmisInvalidArgumentException("depth must not be <-1!"); - } - - return depth; - } - - /** - * Throws an exception if the given value is negative. - */ - protected void checkNullOrPositive(String name, BigInteger value) { - if (value == null) { - return; - } - - if (value.compareTo(BigInteger.ZERO) == -1) { - throw new CmisInvalidArgumentException(name + " must not be negative!"); - } - } + /** + * Set the default maxItems. + */ + protected void setDefaultMaxItems(BigInteger defaultMaxItems) { + fDefaultMaxItems = defaultMaxItems; + } + + /** + * Set the default depth. + */ + protected void setDefaultDepth(BigInteger defaultDepth) { + fDefaultDepth = defaultDepth; + } + + /** + * Converts the given exception into a CMIS exception. + */ + protected CmisBaseException createCmisException(Exception e) { + if (e == null) { + // should never happen + // if it happens its the fault of the framework... + + return new CmisRuntimeException("Unknown exception!"); + } else if (e instanceof CmisBaseException) { + return (CmisBaseException) e; + } else { + // should not happen if the connector works correctly + // it's alarming enough to log the exception + log.warn(e); + + return new CmisRuntimeException(e.getMessage(), e); + } + } + + /** + * Throws an exception if the given id is <code>null</code> or empty. + */ + protected void checkId(String name, String id) { + if (id == null) { + throw new CmisInvalidArgumentException(name + " must be set!"); + } + + if (id.length() == 0) { + throw new CmisInvalidArgumentException(name + " must not be empty!"); + } + } + + /** + * Throws an exception if the given holder or id is <code>null</code> or + * empty. + */ + protected void checkHolderId(String name, Holder<String> holder) { + if (holder == null) { + throw new CmisInvalidArgumentException(name + " must be set!"); + } + + checkId(name, holder.getValue()); + } + + /** + * Throws an exception if the repository id is <code>null</code> or empty. + */ + protected void checkRepositoryId(String repositoryId) { + checkId("Repository Id", repositoryId); + } + + /** + * Throws an exception if the given path is <code>null</code> or invalid. + */ + protected void checkPath(String name, String path) { + if (path == null) { + throw new CmisInvalidArgumentException(name + " must be set!"); + } + + if (path.length() == 0) { + throw new CmisInvalidArgumentException(name + " must not be empty!"); + } + + if (path.charAt(0) != '/') { + throw new CmisInvalidArgumentException(name + " must start with '/'!"); + } + } + + /** + * Throws an exception if the given properties set is <code>null</code>. + */ + protected void checkProperties(Properties properties) { + if (properties == null) { + throw new CmisInvalidArgumentException("Properties must be set!"); + } + } + + /** + * Throws an exception if the given content object is <code>null</code>. + */ + protected void checkContentStream(ContentStream content) { + if (content == null) { + throw new CmisInvalidArgumentException("Content must be set!"); + } + } + + /** + * Throws an exception if the given query statement is <code>null</code> or + * empty. + */ + protected void checkQueryStatement(String statement) { + if (statement == null) { + throw new CmisInvalidArgumentException("Statement must be set!"); + } + + if (statement.length() == 0) { + throw new CmisInvalidArgumentException("Statement must not be empty!"); + } + } + + /** + * Returns <code>true<code> if <code>value</code> is <code>null</code>. + */ + protected Boolean getDefaultTrue(Boolean value) { + if (value == null) { + return Boolean.TRUE; + } + + return value; + } + + /** + * Returns <code>false<code> if <code>value</code> is <code>null</code>. + */ + protected Boolean getDefaultFalse(Boolean value) { + if (value == null) { + return Boolean.FALSE; + } + + return value; + } + + /** + * Returns the <code>IncludeRelationships.NONE<code> if <code>value</code> + * is <code>null</code>. + */ + protected IncludeRelationships getDefault(IncludeRelationships value) { + if (value == null) { + return IncludeRelationships.NONE; + } + + return value; + } + + /** + * Returns the <code>VersioningState.MAJOR<code> if <code>value</code> is + * <code>null</code>. + */ + protected VersioningState getDefault(VersioningState value) { + if (value == null) { + return VersioningState.MAJOR; + } + + return value; + } + + /** + * Returns the <code>UnfileObjects.DELETE<code> if <code>value</code> is + * <code>null</code>. + */ + protected UnfileObject getDefault(UnfileObject value) { + if (value == null) { + return UnfileObject.DELETE; + } + + return value; + } + + /** + * Returns the + * <code>AclPropagation.REPOSITORYDETERMINED<code> if <code>value</code> is + * <code>null</code>. + */ + protected AclPropagation getDefault(AclPropagation value) { + if (value == null) { + return AclPropagation.REPOSITORYDETERMINED; + } + + return value; + } + + /** + * Returns the + * <code>RelationshipDirection.SOURCE<code> if <code>value</code> is + * <code>null</code> . + */ + protected RelationshipDirection getDefault(RelationshipDirection value) { + if (value == null) { + return RelationshipDirection.SOURCE; + } + + return value; + } + + /** + * Returns the <code>"cmis:none"<code> if <code>value</code> is + * <code>null</code>. + */ + protected String getDefaultRenditionFilter(String value) { + if ((value == null) || (value.length() == 0)) { + return "cmis:none"; + } + + return value; + } + + /** + * Returns the default maxItems if <code>maxItems</code> == + * <code>null</code>, throws an exception if <code>maxItems</code> < 0, + * returns <code>maxItems</code> otherwise. + */ + protected BigInteger getMaxItems(BigInteger maxItems) { + if (maxItems == null) { + return fDefaultMaxItems; + } + + if (maxItems.compareTo(BigInteger.ZERO) == -1) { + throw new CmisInvalidArgumentException("maxItems must not be negative!"); + } + + return maxItems; + } + + /** + * Returns 0 if <code>skipCount</code> == <code>null</code>, throws an + * exception if <code>skipCount</code> < 0, returns + * <code>skipCount</code> otherwise. + */ + protected BigInteger getSkipCount(BigInteger skipCount) { + if (skipCount == null) { + return BigInteger.ZERO; + } + + if (skipCount.compareTo(BigInteger.ZERO) == -1) { + throw new CmisInvalidArgumentException("skipCount must not be negative!"); + } + + return skipCount; + } + + /** + * Checks the depth parameter if it complies with CMIS specification and + * returns the default value if <code>depth</code> is <code>null</code>. + */ + protected BigInteger getDepth(BigInteger depth) { + if (depth == null) { + return fDefaultDepth; + } + + if (depth.compareTo(BigInteger.ZERO) == 0) { + throw new CmisInvalidArgumentException("depth must not be 0!"); + } + + if (depth.compareTo(MINUS_ONE) == -1) { + throw new CmisInvalidArgumentException("depth must not be <-1!"); + } + + return depth; + } + + /** + * Throws an exception if the given value is negative. + */ + protected void checkNullOrPositive(String name, BigInteger value) { + if (value == null) { + return; + } + + if (value.compareTo(BigInteger.ZERO) == -1) { + throw new CmisInvalidArgumentException(name + " must not be negative!"); + } + } } Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AclServiceWrapper.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AclServiceWrapper.java?rev=936938&r1=936937&r2=936938&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AclServiceWrapper.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/AclServiceWrapper.java Thu Apr 22 16:27:57 2010 @@ -32,87 +32,87 @@ import org.apache.chemistry.opencmis.ser */ public class AclServiceWrapper extends AbstractServiceWrapper implements CmisAclService { - private CmisAclService fService; + private CmisAclService fService; - /** - * Constructor. - * - * @param service - * the real service object - */ - public AclServiceWrapper(CmisAclService service) { - if (service == null) { - throw new IllegalArgumentException("Service must be set!"); - } - - fService = service; - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.opencmis.server.spi.CmisAclService#applyAcl(org.apache.opencmis - * .server.spi.CallContext , java.lang.String, java.lang.String, - * org.apache.opencmis.commons.provider.AccessControlList, - * org.apache.opencmis.commons.enums.AclPropagation) - */ - public Acl applyAcl(CallContext context, String repositoryId, String objectId, Acl aces, - AclPropagation aclPropagation) { - checkRepositoryId(repositoryId); - checkId("Object Id", objectId); - aclPropagation = getDefault(aclPropagation); - - try { - return fService.applyAcl(context, repositoryId, objectId, aces, aclPropagation); - } catch (Exception e) { - throw createCmisException(e); - } - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.opencmis.server.spi.CmisAclService#applyAcl(org.apache.opencmis - * .server.spi.CallContext , java.lang.String, java.lang.String, - * org.apache.opencmis.commons.provider.AccessControlList, - * org.apache.opencmis.commons.provider.AccessControlList, - * org.apache.opencmis.commons.enums.AclPropagation, - * org.apache.opencmis.commons.api.ExtensionsData) - */ - public Acl applyAcl(CallContext context, String repositoryId, String objectId, Acl addAces, Acl removeAces, - AclPropagation aclPropagation, ExtensionsData extension) { - checkRepositoryId(repositoryId); - checkId("Object Id", objectId); - aclPropagation = getDefault(aclPropagation); - - try { - return fService.applyAcl(context, repositoryId, objectId, addAces, removeAces, aclPropagation, extension); - } catch (Exception e) { - throw createCmisException(e); - } - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.opencmis.server.spi.CmisAclService#getAcl(org.apache.opencmis - * .server.spi.CallContext , java.lang.String, java.lang.String, - * java.lang.Boolean, org.apache.opencmis.commons.api.ExtensionsData) - */ - public Acl getAcl(CallContext context, String repositoryId, String objectId, Boolean onlyBasicPermissions, - ExtensionsData extension) { - checkRepositoryId(repositoryId); - checkId("Object Id", objectId); - onlyBasicPermissions = getDefaultTrue(onlyBasicPermissions); - - try { - return fService.getAcl(context, repositoryId, objectId, onlyBasicPermissions, extension); - } catch (Exception e) { - throw createCmisException(e); - } - } + /** + * Constructor. + * + * @param service + * the real service object + */ + public AclServiceWrapper(CmisAclService service) { + if (service == null) { + throw new IllegalArgumentException("Service must be set!"); + } + + fService = service; + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.opencmis.server.spi.CmisAclService#applyAcl(org.apache.opencmis + * .server.spi.CallContext , java.lang.String, java.lang.String, + * org.apache.opencmis.commons.provider.AccessControlList, + * org.apache.opencmis.commons.enums.AclPropagation) + */ + public Acl applyAcl(CallContext context, String repositoryId, String objectId, Acl aces, + AclPropagation aclPropagation) { + checkRepositoryId(repositoryId); + checkId("Object Id", objectId); + aclPropagation = getDefault(aclPropagation); + + try { + return fService.applyAcl(context, repositoryId, objectId, aces, aclPropagation); + } catch (Exception e) { + throw createCmisException(e); + } + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.opencmis.server.spi.CmisAclService#applyAcl(org.apache.opencmis + * .server.spi.CallContext , java.lang.String, java.lang.String, + * org.apache.opencmis.commons.provider.AccessControlList, + * org.apache.opencmis.commons.provider.AccessControlList, + * org.apache.opencmis.commons.enums.AclPropagation, + * org.apache.opencmis.commons.api.ExtensionsData) + */ + public Acl applyAcl(CallContext context, String repositoryId, String objectId, Acl addAces, Acl removeAces, + AclPropagation aclPropagation, ExtensionsData extension) { + checkRepositoryId(repositoryId); + checkId("Object Id", objectId); + aclPropagation = getDefault(aclPropagation); + + try { + return fService.applyAcl(context, repositoryId, objectId, addAces, removeAces, aclPropagation, extension); + } catch (Exception e) { + throw createCmisException(e); + } + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.opencmis.server.spi.CmisAclService#getAcl(org.apache.opencmis + * .server.spi.CallContext , java.lang.String, java.lang.String, + * java.lang.Boolean, org.apache.opencmis.commons.api.ExtensionsData) + */ + public Acl getAcl(CallContext context, String repositoryId, String objectId, Boolean onlyBasicPermissions, + ExtensionsData extension) { + checkRepositoryId(repositoryId); + checkId("Object Id", objectId); + onlyBasicPermissions = getDefaultTrue(onlyBasicPermissions); + + try { + return fService.getAcl(context, repositoryId, objectId, onlyBasicPermissions, extension); + } catch (Exception e) { + throw createCmisException(e); + } + } }
