Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java?rev=954941&r1=954940&r2=954941&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java Tue Jun 15 15:51:42 2010 @@ -1,82 +1,103 @@ -package org.apache.chemistry.opencmis.client.bindings.spi.local; - -import java.math.BigInteger; -import java.util.List; - -import org.apache.chemistry.opencmis.client.bindings.spi.Session; -import org.apache.chemistry.opencmis.commons.data.ExtensionsData; -import org.apache.chemistry.opencmis.commons.data.RepositoryInfo; -import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition; -import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer; -import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList; -import org.apache.chemistry.opencmis.commons.server.CmisService; -import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory; -import org.apache.chemistry.opencmis.commons.spi.RepositoryService; - -/** - * Repository Service local client. - */ -public class RepositoryServiceImpl extends AbstractLocalService implements RepositoryService { - - /** - * Constructor. - */ - public RepositoryServiceImpl(Session session, CmisServiceFactory factory) { - setSession(session); - setServiceFactory(factory); - } - - public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - return service.getRepositoryInfo(repositoryId, extension); - } finally { - service.close(); - } - } - - public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) { - CmisService service = getService(null); - - try { - return service.getRepositoryInfos(extension); - } finally { - service.close(); - } - } - - public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - return service.getTypeDefinition(repositoryId, typeId, extension); - } finally { - service.close(); - } - } - - public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions, - BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - return service.getTypeChildren(repositoryId, typeId, includePropertyDefinitions, maxItems, skipCount, - extension); - } finally { - service.close(); - } - } - - public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth, - Boolean includePropertyDefinitions, ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - return service.getTypeDescendants(repositoryId, typeId, depth, includePropertyDefinitions, extension); - } finally { - service.close(); - } - } - -} +package org.apache.chemistry.opencmis.client.bindings.spi.local; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + + +import java.math.BigInteger; +import java.util.List; + +import org.apache.chemistry.opencmis.client.bindings.spi.Session; +import org.apache.chemistry.opencmis.commons.data.ExtensionsData; +import org.apache.chemistry.opencmis.commons.data.RepositoryInfo; +import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition; +import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer; +import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList; +import org.apache.chemistry.opencmis.commons.server.CmisService; +import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory; +import org.apache.chemistry.opencmis.commons.spi.RepositoryService; + +/** + * Repository Service local client. + */ +public class RepositoryServiceImpl extends AbstractLocalService implements RepositoryService { + + /** + * Constructor. + */ + public RepositoryServiceImpl(Session session, CmisServiceFactory factory) { + setSession(session); + setServiceFactory(factory); + } + + public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + return service.getRepositoryInfo(repositoryId, extension); + } finally { + service.close(); + } + } + + public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) { + CmisService service = getService(null); + + try { + return service.getRepositoryInfos(extension); + } finally { + service.close(); + } + } + + public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + return service.getTypeDefinition(repositoryId, typeId, extension); + } finally { + service.close(); + } + } + + public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions, + BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + return service.getTypeChildren(repositoryId, typeId, includePropertyDefinitions, maxItems, skipCount, + extension); + } finally { + service.close(); + } + } + + public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth, + Boolean includePropertyDefinitions, ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + return service.getTypeDescendants(repositoryId, typeId, depth, includePropertyDefinitions, extension); + } finally { + service.close(); + } + } + +}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/VersioningServiceImpl.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/VersioningServiceImpl.java?rev=954941&r1=954940&r2=954941&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/VersioningServiceImpl.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/VersioningServiceImpl.java Tue Jun 15 15:51:42 2010 @@ -1,98 +1,119 @@ -package org.apache.chemistry.opencmis.client.bindings.spi.local; - -import java.util.List; - -import org.apache.chemistry.opencmis.client.bindings.spi.Session; -import org.apache.chemistry.opencmis.commons.data.Acl; -import org.apache.chemistry.opencmis.commons.data.ContentStream; -import org.apache.chemistry.opencmis.commons.data.ExtensionsData; -import org.apache.chemistry.opencmis.commons.data.ObjectData; -import org.apache.chemistry.opencmis.commons.data.Properties; -import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; -import org.apache.chemistry.opencmis.commons.server.CmisService; -import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory; -import org.apache.chemistry.opencmis.commons.spi.Holder; -import org.apache.chemistry.opencmis.commons.spi.VersioningService; - -public class VersioningServiceImpl extends AbstractLocalService implements VersioningService { - - /** - * Constructor. - */ - public VersioningServiceImpl(Session session, CmisServiceFactory factory) { - setSession(session); - setServiceFactory(factory); - } - - public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - service.cancelCheckOut(repositoryId, objectId, extension); - } finally { - service.close(); - } - } - - public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties, - ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces, - ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - service.checkIn(repositoryId, objectId, major, properties, contentStream, checkinComment, policies, - addAces, removeAces, extension); - } finally { - service.close(); - } - } - - public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension, - Holder<Boolean> contentCopied) { - CmisService service = getService(repositoryId); - - try { - service.checkOut(repositoryId, objectId, extension, contentCopied); - } finally { - service.close(); - } - } - - public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter, - Boolean includeAllowableActions, ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - return service.getAllVersions(repositoryId, objectId, versionSeriesId, filter, includeAllowableActions, - extension); - } finally { - service.close(); - } - } - - public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId, - Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, - String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - return service.getObjectOfLatestVersion(repositoryId, objectId, versionSeriesId, major, filter, - includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeAcl, - extension); - } finally { - service.close(); - } - } - - public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId, - Boolean major, String filter, ExtensionsData extension) { - CmisService service = getService(repositoryId); - - try { - return service.getPropertiesOfLatestVersion(repositoryId, objectId, versionSeriesId, major, filter, - extension); - } finally { - service.close(); - } - } -} +package org.apache.chemistry.opencmis.client.bindings.spi.local; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + + +import java.util.List; + +import org.apache.chemistry.opencmis.client.bindings.spi.Session; +import org.apache.chemistry.opencmis.commons.data.Acl; +import org.apache.chemistry.opencmis.commons.data.ContentStream; +import org.apache.chemistry.opencmis.commons.data.ExtensionsData; +import org.apache.chemistry.opencmis.commons.data.ObjectData; +import org.apache.chemistry.opencmis.commons.data.Properties; +import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; +import org.apache.chemistry.opencmis.commons.server.CmisService; +import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory; +import org.apache.chemistry.opencmis.commons.spi.Holder; +import org.apache.chemistry.opencmis.commons.spi.VersioningService; + +public class VersioningServiceImpl extends AbstractLocalService implements VersioningService { + + /** + * Constructor. + */ + public VersioningServiceImpl(Session session, CmisServiceFactory factory) { + setSession(session); + setServiceFactory(factory); + } + + public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + service.cancelCheckOut(repositoryId, objectId, extension); + } finally { + service.close(); + } + } + + public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties, + ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces, + ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + service.checkIn(repositoryId, objectId, major, properties, contentStream, checkinComment, policies, + addAces, removeAces, extension); + } finally { + service.close(); + } + } + + public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension, + Holder<Boolean> contentCopied) { + CmisService service = getService(repositoryId); + + try { + service.checkOut(repositoryId, objectId, extension, contentCopied); + } finally { + service.close(); + } + } + + public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter, + Boolean includeAllowableActions, ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + return service.getAllVersions(repositoryId, objectId, versionSeriesId, filter, includeAllowableActions, + extension); + } finally { + service.close(); + } + } + + public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId, + Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships, + String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + return service.getObjectOfLatestVersion(repositoryId, objectId, versionSeriesId, major, filter, + includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeAcl, + extension); + } finally { + service.close(); + } + } + + public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId, + Boolean major, String filter, ExtensionsData extension) { + CmisService service = getService(repositoryId); + + try { + return service.getPropertiesOfLatestVersion(repositoryId, objectId, versionSeriesId, major, filter, + extension); + } finally { + service.close(); + } + } +} Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/site/apt/index.apt?rev=954941&r1=954940&r2=954941&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/site/apt/index.apt (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/site/apt/index.apt Tue Jun 15 15:51:42 2010 @@ -1,3 +1,24 @@ +~~ +~~ +~~ Licensed to the Apache Software Foundation (ASF) under one +~~ or more contributor license agreements. See the NOTICE file +~~ distributed with this work for additional information +~~ regarding copyright ownership. The ASF licenses this file +~~ to you under the Apache License, Version 2.0 (the +~~ "License"); you may not use this file except in compliance +~~ with the License. You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, +~~ software distributed under the License is distributed on an +~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~~ KIND, either express or implied. See the License for the +~~ specific language governing permissions and limitations +~~ under the License. +~~ +~~ + ----- OpenCMIS Client Binding Layer ----- @@ -29,4 +50,4 @@ JUnit Test Parameters | opencmis.test.webservices.url | URL prefix of the CMIS Web Services WSDLs | http://localhost:8080/cmis/services/ | *-------------------------------------+-------------------------------------------+-------------------------------------------------------------------------------+ | opencmis.test.config | Absolute path to a properties file that can contain all the parameters above | <none> | -*-------------------------------------+-------------------------------------------+-------------------------------------------------------------------------------+ \ No newline at end of file +*-------------------------------------+-------------------------------------------+-------------------------------------------------------------------------------+ Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/log4j.properties URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/log4j.properties?rev=954941&r1=954940&r2=954941&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/log4j.properties (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/log4j.properties Tue Jun 15 15:51:42 2010 @@ -1,3 +1,24 @@ +# +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# + #sample log4j.properties log4j.rootCategory=DEBUG, R, O @@ -19,4 +40,4 @@ log4j.appender.O.layout=org.apache.log4j log4j.appender.R.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c: %m%n log4j.appender.O.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c: %m%n -log4j.logger.org.apache.opencmis.client.bindings.spi=O \ No newline at end of file +log4j.logger.org.apache.opencmis.client.bindings.spi=O Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/resources/log4j.properties URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/resources/log4j.properties?rev=954941&r1=954940&r2=954941&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/resources/log4j.properties (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/resources/log4j.properties Tue Jun 15 15:51:42 2010 @@ -1,3 +1,24 @@ +# +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# + #sample log4j.properties log4j.rootCategory=DEBUG, R, O Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisService.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisService.java?rev=954941&r1=954940&r2=954941&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisService.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisService.java Tue Jun 15 15:51:42 2010 @@ -1,137 +1,158 @@ -package org.apache.chemistry.opencmis.commons.server; - -import java.util.List; - -import org.apache.chemistry.opencmis.commons.data.Acl; -import org.apache.chemistry.opencmis.commons.data.ContentStream; -import org.apache.chemistry.opencmis.commons.data.ExtensionsData; -import org.apache.chemistry.opencmis.commons.data.Properties; -import org.apache.chemistry.opencmis.commons.enums.AclPropagation; -import org.apache.chemistry.opencmis.commons.enums.VersioningState; -import org.apache.chemistry.opencmis.commons.spi.AclService; -import org.apache.chemistry.opencmis.commons.spi.DiscoveryService; -import org.apache.chemistry.opencmis.commons.spi.MultiFilingService; -import org.apache.chemistry.opencmis.commons.spi.NavigationService; -import org.apache.chemistry.opencmis.commons.spi.ObjectService; -import org.apache.chemistry.opencmis.commons.spi.PolicyService; -import org.apache.chemistry.opencmis.commons.spi.RelationshipService; -import org.apache.chemistry.opencmis.commons.spi.RepositoryService; -import org.apache.chemistry.opencmis.commons.spi.VersioningService; - -/** - * OpenCMIS server interface. - * - * <p> - * <em> - * See CMIS 1.0 specification for details on the operations, parameters, - * exceptions and the domain model. - * </em> - * </p> - * - * <p> - * This interface adds a few more operations to the operation set defined by - * CMIS to address binding specific requirements. - * </p> - */ -public interface CmisService extends RepositoryService, NavigationService, ObjectService, VersioningService, - DiscoveryService, MultiFilingService, RelationshipService, AclService, PolicyService { - - /** - * Creates a new document, folder or policy. - * - * The property "cmis:objectTypeId" defines the type and implicitly the base - * type. - * - * @param repositoryId - * the identifier for the repository - * @param properties - * the property values that MUST be applied to the newly created - * object - * @param folderId - * <em>(optional)</em> if specified, the identifier for the - * folder that MUST be the parent folder for the newly created - * object - * @param contentStream - * <em>(optional)</em> if the object to create is a document - * object, the content stream that MUST be stored for the newly - * created document object - * @param versioningState - * <em>(optional)</em> if the object to create is a document - * object, it specifies what the versioning state of the newly - * created object MUST be (default is - * {...@link VersioningState#MAJOR}) - * @param policies - * <em>(optional)</em> a list of policy IDs that MUST be applied - * to the newly created object - * @param addAces - * <em>(optional)</em> a list of ACEs that MUST be added to the - * newly created object, either using the ACL from - * <code>folderId</code> if specified, or being applied if no - * <code>folderId</code> is specified - * @param removeAces - * <em>(optional)</em> a list of ACEs that MUST be removed from - * the newly created object, either using the ACL from - * <code>folderId</code> if specified, or being ignored if no - * <code>folderId</code> is specified - */ - String create(String repositoryId, Properties properties, String folderId, ContentStream contentStream, - VersioningState versioningState, List<String> policies, 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. - * - * @param repositoryId - * the identifier for the repository - * @param objectId - * the identifier for the object - * @param allVersions - * <em>(optional)</em> If <code>true</code> then delete all - * versions of the document, otherwise delete only the document - * object specified (default is <code>true</code>) - */ - void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions, - ExtensionsData extension); - - /** - * 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. - * - * @param repositoryId - * the identifier for the repository - * @param objectId - * the identifier for the object - * @param aces - * the ACEs that should replace the current ACL of the object - * @param aclPropagation - * <em>(optional)</em> specifies how ACEs should be handled - * (default is {...@link AclPropagation#REPOSITORYDETERMINED}) - */ - Acl applyAcl(String repositoryId, String objectId, Acl aces, AclPropagation aclPropagation); - - /** - * Returns the {...@link ObjectInfo} of the given object id or - * <code>null</code> if no object info exists. - * - * Only AtomPub requests will require object infos. - * - * @param repositoryId - * the identifier for the repository - * @param objectId - * the identifier for the object - */ - ObjectInfo getObjectInfo(String repositoryId, String objectId); - - /** - * Signals that this object will not be used anymore and resources can - * released. - */ - void close(); -} +package org.apache.chemistry.opencmis.commons.server; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + + +import java.util.List; + +import org.apache.chemistry.opencmis.commons.data.Acl; +import org.apache.chemistry.opencmis.commons.data.ContentStream; +import org.apache.chemistry.opencmis.commons.data.ExtensionsData; +import org.apache.chemistry.opencmis.commons.data.Properties; +import org.apache.chemistry.opencmis.commons.enums.AclPropagation; +import org.apache.chemistry.opencmis.commons.enums.VersioningState; +import org.apache.chemistry.opencmis.commons.spi.AclService; +import org.apache.chemistry.opencmis.commons.spi.DiscoveryService; +import org.apache.chemistry.opencmis.commons.spi.MultiFilingService; +import org.apache.chemistry.opencmis.commons.spi.NavigationService; +import org.apache.chemistry.opencmis.commons.spi.ObjectService; +import org.apache.chemistry.opencmis.commons.spi.PolicyService; +import org.apache.chemistry.opencmis.commons.spi.RelationshipService; +import org.apache.chemistry.opencmis.commons.spi.RepositoryService; +import org.apache.chemistry.opencmis.commons.spi.VersioningService; + +/** + * OpenCMIS server interface. + * + * <p> + * <em> + * See CMIS 1.0 specification for details on the operations, parameters, + * exceptions and the domain model. + * </em> + * </p> + * + * <p> + * This interface adds a few more operations to the operation set defined by + * CMIS to address binding specific requirements. + * </p> + */ +public interface CmisService extends RepositoryService, NavigationService, ObjectService, VersioningService, + DiscoveryService, MultiFilingService, RelationshipService, AclService, PolicyService { + + /** + * Creates a new document, folder or policy. + * + * The property "cmis:objectTypeId" defines the type and implicitly the base + * type. + * + * @param repositoryId + * the identifier for the repository + * @param properties + * the property values that MUST be applied to the newly created + * object + * @param folderId + * <em>(optional)</em> if specified, the identifier for the + * folder that MUST be the parent folder for the newly created + * object + * @param contentStream + * <em>(optional)</em> if the object to create is a document + * object, the content stream that MUST be stored for the newly + * created document object + * @param versioningState + * <em>(optional)</em> if the object to create is a document + * object, it specifies what the versioning state of the newly + * created object MUST be (default is + * {...@link VersioningState#MAJOR}) + * @param policies + * <em>(optional)</em> a list of policy IDs that MUST be applied + * to the newly created object + * @param addAces + * <em>(optional)</em> a list of ACEs that MUST be added to the + * newly created object, either using the ACL from + * <code>folderId</code> if specified, or being applied if no + * <code>folderId</code> is specified + * @param removeAces + * <em>(optional)</em> a list of ACEs that MUST be removed from + * the newly created object, either using the ACL from + * <code>folderId</code> if specified, or being ignored if no + * <code>folderId</code> is specified + */ + String create(String repositoryId, Properties properties, String folderId, ContentStream contentStream, + VersioningState versioningState, List<String> policies, 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. + * + * @param repositoryId + * the identifier for the repository + * @param objectId + * the identifier for the object + * @param allVersions + * <em>(optional)</em> If <code>true</code> then delete all + * versions of the document, otherwise delete only the document + * object specified (default is <code>true</code>) + */ + void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions, + ExtensionsData extension); + + /** + * 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. + * + * @param repositoryId + * the identifier for the repository + * @param objectId + * the identifier for the object + * @param aces + * the ACEs that should replace the current ACL of the object + * @param aclPropagation + * <em>(optional)</em> specifies how ACEs should be handled + * (default is {...@link AclPropagation#REPOSITORYDETERMINED}) + */ + Acl applyAcl(String repositoryId, String objectId, Acl aces, AclPropagation aclPropagation); + + /** + * Returns the {...@link ObjectInfo} of the given object id or + * <code>null</code> if no object info exists. + * + * Only AtomPub requests will require object infos. + * + * @param repositoryId + * the identifier for the repository + * @param objectId + * the identifier for the object + */ + ObjectInfo getObjectInfo(String repositoryId, String objectId); + + /** + * Signals that this object will not be used anymore and resources can + * released. + */ + void close(); +} Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisServiceFactory.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisServiceFactory.java?rev=954941&r1=954940&r2=954941&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisServiceFactory.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisServiceFactory.java Tue Jun 15 15:51:42 2010 @@ -1,27 +1,48 @@ -package org.apache.chemistry.opencmis.commons.server; - -import java.util.Map; - -/** - * Factory for {...@link CmisService} objects. - */ -public interface CmisServiceFactory { - - /** - * Initializes the factory instance. - */ - void init(Map<String, String> parameters); - - /** - * Cleans up the the factory instance. - */ - void destroy(); - - /** - * Returns a {...@link CmisService} object for the given {...@link CallContext}. - * - * When the {...@link CmisService} object is not longer needed - * {...@link CmisService#close()} will be called. - */ - CmisService getService(CallContext context); -} +package org.apache.chemistry.opencmis.commons.server; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + + +import java.util.Map; + +/** + * Factory for {...@link CmisService} objects. + */ +public interface CmisServiceFactory { + + /** + * Initializes the factory instance. + */ + void init(Map<String, String> parameters); + + /** + * Cleans up the the factory instance. + */ + void destroy(); + + /** + * Returns a {...@link CmisService} object for the given {...@link CallContext}. + * + * When the {...@link CmisService} object is not longer needed + * {...@link CmisService#close()} will be called. + */ + CmisService getService(CallContext context); +} Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/ObjectInfoHandler.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/ObjectInfoHandler.java?rev=954941&r1=954940&r2=954941&view=diff ============================================================================== --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/ObjectInfoHandler.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/ObjectInfoHandler.java Tue Jun 15 15:51:42 2010 @@ -1,8 +1,29 @@ -package org.apache.chemistry.opencmis.commons.server; - -public interface ObjectInfoHandler { - - ObjectInfo getObjectInfo(String repositoryId, String objectId); - - void addObjectInfo(ObjectInfo objectInfo); -} +package org.apache.chemistry.opencmis.commons.server; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + + +public interface ObjectInfoHandler { + + ObjectInfo getObjectInfo(String repositoryId, String objectId); + + void addObjectInfo(ObjectInfo objectInfo); +}
