You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by sk...@apache.org on 2010/06/15 17:51:43 UTC
svn commit: r954941 [1/7] - in /incubator/chemistry/opencmis/trunk: ./ _dev/
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/
chemistry-opencmis-client/chemistry-opencmi...
Author: sklevenz
Date: Tue Jun 15 15:51:42 2010
New Revision: 954941
URL: http://svn.apache.org/viewvc?rev=954941&view=rev
Log:
Adding missing license headers
-> https://issues.apache.org/jira/browse/CMIS-172
Added:
incubator/chemistry/opencmis/trunk/LICENSE (contents, props changed)
- copied, changed from r954729, incubator/chemistry/opencmis/trunk/LICENSE.txt
incubator/chemistry/opencmis/trunk/NOTICE
- copied unchanged from r954729, incubator/chemistry/opencmis/trunk/NOTICE.txt
Removed:
incubator/chemistry/opencmis/trunk/LICENSE.txt
incubator/chemistry/opencmis/trunk/NOTICE.txt
Modified:
incubator/chemistry/opencmis/trunk/_dev/Formatting_presets.xml
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AbstractLocalService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/DiscoveryServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/MultiFilingServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/NavigationServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/ObjectServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/PolicyServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RelationshipServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RepositoryServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/VersioningServiceImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/site/apt/index.apt
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/log4j.properties
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/resources/log4j.properties
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/CmisServiceFactory.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/server/ObjectInfoHandler.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractServiceFactory.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/log4j.properties
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareService.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AbstractServiceTst.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/pom.xml
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/CmisServiceWrapper.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-browser-app/src/main/webapp/browser/browser.css
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.atom.properties
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.ws.properties
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/log4j.properties
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/runCreate.bat
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/runcmd.bat
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/runfill.bat
incubator/chemistry/opencmis/trunk/src/site/apt/browser.apt
incubator/chemistry/opencmis/trunk/src/site/apt/client-api.apt
incubator/chemistry/opencmis/trunk/src/site/apt/client-binding.apt
incubator/chemistry/opencmis/trunk/src/site/apt/how-to-build.apt
incubator/chemistry/opencmis/trunk/src/site/apt/index.apt
incubator/chemistry/opencmis/trunk/src/site/apt/server-fileshare.apt
incubator/chemistry/opencmis/trunk/src/site/apt/server-inmemory.apt
incubator/chemistry/opencmis/trunk/src/site/apt/server.apt
Copied: incubator/chemistry/opencmis/trunk/LICENSE (from r954729, incubator/chemistry/opencmis/trunk/LICENSE.txt)
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/LICENSE?p2=incubator/chemistry/opencmis/trunk/LICENSE&p1=incubator/chemistry/opencmis/trunk/LICENSE.txt&r1=954729&r2=954941&rev=954941&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/LICENSE.txt (original)
+++ incubator/chemistry/opencmis/trunk/LICENSE Tue Jun 15 15:51:42 2010
@@ -1,4 +1,3 @@
-
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Propchange: incubator/chemistry/opencmis/trunk/LICENSE
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/chemistry/opencmis/trunk/_dev/Formatting_presets.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/_dev/Formatting_presets.xml?rev=954941&r1=954940&r2=954941&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/_dev/Formatting_presets.xml (original)
+++ incubator/chemistry/opencmis/trunk/_dev/Formatting_presets.xml Tue Jun 15 15:51:42 2010
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+
<profiles version="11">
<profile kind="CodeFormatterProfile" name="OpenCMIS" version="11">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AbstractLocalService.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/AbstractLocalService.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/AbstractLocalService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AbstractLocalService.java Tue Jun 15 15:51:42 2010
@@ -1,111 +1,132 @@
-package org.apache.chemistry.opencmis.client.bindings.spi.local;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.chemistry.opencmis.client.bindings.spi.Session;
-import org.apache.chemistry.opencmis.commons.SessionParameter;
-import org.apache.chemistry.opencmis.commons.server.CallContext;
-import org.apache.chemistry.opencmis.commons.server.CmisService;
-import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
-
-/**
- * Base class for all local clients.
- */
-public abstract class AbstractLocalService {
-
- private Session session;
- private CmisServiceFactory factory;
-
- private String user;
- private String password;
-
- /**
- * Sets the current session.
- */
- protected void setSession(Session session) {
- this.session = session;
-
- Object userObj = session.get(SessionParameter.USER);
- user = userObj instanceof String ? userObj.toString() : null;
-
- Object passwordObj = session.get(SessionParameter.PASSWORD);
- password = passwordObj instanceof String ? passwordObj.toString() : null;
- }
-
- /**
- * Gets the current session.
- */
- protected Session getSession() {
- return session;
- }
-
- /**
- * Sets the service factory.
- */
- protected void setServiceFactory(CmisServiceFactory factory) {
- this.factory = factory;
- }
-
- /**
- * Gets the service factory.
- */
- protected CmisServiceFactory getServiceFactory() {
- return factory;
- }
-
- /**
- * creates a local call context.
- */
- protected CallContext createCallContext(String repositoryId) {
- return new LocalCallContext(repositoryId, user, password);
- }
-
- protected CmisService getService(String repositoryId) {
- return factory.getService(createCallContext(repositoryId));
- }
-
- // ------------------------------------------------------------------
-
- /**
- * Simple {@link CallContext} implementation.
- */
- static class LocalCallContext implements CallContext {
-
- private Map<String, String> contextMap = new HashMap<String, String>();
-
- public LocalCallContext(String repositoryId, String user, String password) {
- contextMap.put(REPOSITORY_ID, repositoryId);
- contextMap.put(USERNAME, user);
- contextMap.put(PASSWORD, password);
- }
-
- public String getBinding() {
- return BINDING_LOCAL;
- }
-
- public String get(String key) {
- return contextMap.get(key);
- }
-
- public String getRepositoryId() {
- return get(REPOSITORY_ID);
- }
-
- public String getUsername() {
- return get(USERNAME);
- }
-
- public String getPassword() {
- return get(PASSWORD);
- }
-
- public String getLocale() {
- return null;
- }
-
- public boolean isObjectInfoRequired() {
- return false;
- }
- }
-}
+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.HashMap;
+import java.util.Map;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.Session;
+import org.apache.chemistry.opencmis.commons.SessionParameter;
+import org.apache.chemistry.opencmis.commons.server.CallContext;
+import org.apache.chemistry.opencmis.commons.server.CmisService;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+
+/**
+ * Base class for all local clients.
+ */
+public abstract class AbstractLocalService {
+
+ private Session session;
+ private CmisServiceFactory factory;
+
+ private String user;
+ private String password;
+
+ /**
+ * Sets the current session.
+ */
+ protected void setSession(Session session) {
+ this.session = session;
+
+ Object userObj = session.get(SessionParameter.USER);
+ user = userObj instanceof String ? userObj.toString() : null;
+
+ Object passwordObj = session.get(SessionParameter.PASSWORD);
+ password = passwordObj instanceof String ? passwordObj.toString() : null;
+ }
+
+ /**
+ * Gets the current session.
+ */
+ protected Session getSession() {
+ return session;
+ }
+
+ /**
+ * Sets the service factory.
+ */
+ protected void setServiceFactory(CmisServiceFactory factory) {
+ this.factory = factory;
+ }
+
+ /**
+ * Gets the service factory.
+ */
+ protected CmisServiceFactory getServiceFactory() {
+ return factory;
+ }
+
+ /**
+ * creates a local call context.
+ */
+ protected CallContext createCallContext(String repositoryId) {
+ return new LocalCallContext(repositoryId, user, password);
+ }
+
+ protected CmisService getService(String repositoryId) {
+ return factory.getService(createCallContext(repositoryId));
+ }
+
+ // ------------------------------------------------------------------
+
+ /**
+ * Simple {@link CallContext} implementation.
+ */
+ static class LocalCallContext implements CallContext {
+
+ private Map<String, String> contextMap = new HashMap<String, String>();
+
+ public LocalCallContext(String repositoryId, String user, String password) {
+ contextMap.put(REPOSITORY_ID, repositoryId);
+ contextMap.put(USERNAME, user);
+ contextMap.put(PASSWORD, password);
+ }
+
+ public String getBinding() {
+ return BINDING_LOCAL;
+ }
+
+ public String get(String key) {
+ return contextMap.get(key);
+ }
+
+ public String getRepositoryId() {
+ return get(REPOSITORY_ID);
+ }
+
+ public String getUsername() {
+ return get(USERNAME);
+ }
+
+ public String getPassword() {
+ return get(PASSWORD);
+ }
+
+ public String getLocale() {
+ return null;
+ }
+
+ public boolean isObjectInfoRequired() {
+ return false;
+ }
+ }
+}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.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/AclServiceImpl.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/AclServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java Tue Jun 15 15:51:42 2010
@@ -1,41 +1,62 @@
-package org.apache.chemistry.opencmis.client.bindings.spi.local;
-
-import org.apache.chemistry.opencmis.client.bindings.spi.Session;
-import org.apache.chemistry.opencmis.commons.data.Acl;
-import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
-import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
-import org.apache.chemistry.opencmis.commons.server.CmisService;
-import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
-import org.apache.chemistry.opencmis.commons.spi.AclService;
-
-public class AclServiceImpl extends AbstractLocalService implements AclService {
-
- /**
- * Constructor.
- */
- public AclServiceImpl(Session session, CmisServiceFactory factory) {
- setSession(session);
- setServiceFactory(factory);
- }
-
- public Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces,
- AclPropagation aclPropagation, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.applyAcl(repositoryId, objectId, addAces, removeAces, aclPropagation, extension);
- } finally {
- service.close();
- }
- }
-
- public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getAcl(repositoryId, objectId, onlyBasicPermissions, 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 org.apache.chemistry.opencmis.client.bindings.spi.Session;
+import org.apache.chemistry.opencmis.commons.data.Acl;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
+import org.apache.chemistry.opencmis.commons.server.CmisService;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+import org.apache.chemistry.opencmis.commons.spi.AclService;
+
+public class AclServiceImpl extends AbstractLocalService implements AclService {
+
+ /**
+ * Constructor.
+ */
+ public AclServiceImpl(Session session, CmisServiceFactory factory) {
+ setSession(session);
+ setServiceFactory(factory);
+ }
+
+ public Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces,
+ AclPropagation aclPropagation, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.applyAcl(repositoryId, objectId, addAces, removeAces, aclPropagation, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getAcl(repositoryId, objectId, onlyBasicPermissions, 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/CmisLocalSpi.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/CmisLocalSpi.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/CmisLocalSpi.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java Tue Jun 15 15:51:42 2010
@@ -1,136 +1,157 @@
-package org.apache.chemistry.opencmis.client.bindings.spi.local;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.chemistry.opencmis.client.bindings.spi.CmisSpi;
-import org.apache.chemistry.opencmis.client.bindings.spi.CmisSpiFactory;
-import org.apache.chemistry.opencmis.client.bindings.spi.Session;
-import org.apache.chemistry.opencmis.commons.SessionParameter;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
-import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
-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;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * * CMIS local SPI implementation.
- */
-public class CmisLocalSpi implements CmisSpiFactory, CmisSpi {
-
- private static final long serialVersionUID = 1L;
-
- private static Log log = LogFactory.getLog(CmisLocalSpi.class);
-
- private CmisServiceFactory factory;
-
- private RepositoryService repositoryService;
- private NavigationService navigationService;
- private ObjectService objectService;
- private VersioningService versioningService;
- private DiscoveryService discoveryService;
- private MultiFilingService multiFilingService;
- private RelationshipService relationshipService;
- private PolicyService policyService;
- private AclService aclService;
-
- /**
- * Constructor.
- */
- public CmisLocalSpi() {
- }
-
- public CmisSpi getSpiInstance(Session session) {
- if (log.isDebugEnabled()) {
- log.debug("Initializing local SPI...");
- }
-
- // get the service factory class name
- String serviceFactoryClassname = (String) session.get(SessionParameter.LOCAL_FACTORY);
- if (serviceFactoryClassname == null) {
- throw new CmisConnectionException("Factory class not set!");
- }
-
- try {
- // gather parameters from session
- Map<String, String> parameters = new HashMap<String, String>();
- for (String key : session.getKeys()) {
- Object value = session.get(key);
- if (value instanceof String) {
- parameters.put(key, (String) value);
- }
- }
-
- // create and initialize factory
- factory = (CmisServiceFactory) Class.forName(serviceFactoryClassname).newInstance();
- factory.init(parameters);
- } catch (Exception e) {
- throw new CmisConnectionException("Factory cannot be created!", e);
- }
-
- repositoryService = new RepositoryServiceImpl(session, factory);
- navigationService = new NavigationServiceImpl(session, factory);
- objectService = new ObjectServiceImpl(session, factory);
- versioningService = new VersioningServiceImpl(session, factory);
- discoveryService = new DiscoveryServiceImpl(session, factory);
- multiFilingService = new MultiFilingServiceImpl(session, factory);
- relationshipService = new RelationshipServiceImpl(session, factory);
- policyService = new PolicyServiceImpl(session, factory);
-
- return this;
- }
-
- public RepositoryService getRepositoryService() {
- return repositoryService;
- }
-
- public NavigationService getNavigationService() {
- return navigationService;
- }
-
- public ObjectService getObjectService() {
- return objectService;
- }
-
- public DiscoveryService getDiscoveryService() {
- return discoveryService;
- }
-
- public VersioningService getVersioningService() {
- return versioningService;
- }
-
- public MultiFilingService getMultiFilingService() {
- return multiFilingService;
- }
-
- public RelationshipService getRelationshipService() {
- return relationshipService;
- }
-
- public PolicyService getPolicyService() {
- return policyService;
- }
-
- public AclService getAclService() {
- return aclService;
- }
-
- public void clearAllCaches() {
- }
-
- public void clearRepositoryCache(String repositoryId) {
- }
-
- public void close() {
- factory.destroy();
- }
-}
+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.HashMap;
+import java.util.Map;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.CmisSpi;
+import org.apache.chemistry.opencmis.client.bindings.spi.CmisSpiFactory;
+import org.apache.chemistry.opencmis.client.bindings.spi.Session;
+import org.apache.chemistry.opencmis.commons.SessionParameter;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+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;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * * CMIS local SPI implementation.
+ */
+public class CmisLocalSpi implements CmisSpiFactory, CmisSpi {
+
+ private static final long serialVersionUID = 1L;
+
+ private static Log log = LogFactory.getLog(CmisLocalSpi.class);
+
+ private CmisServiceFactory factory;
+
+ private RepositoryService repositoryService;
+ private NavigationService navigationService;
+ private ObjectService objectService;
+ private VersioningService versioningService;
+ private DiscoveryService discoveryService;
+ private MultiFilingService multiFilingService;
+ private RelationshipService relationshipService;
+ private PolicyService policyService;
+ private AclService aclService;
+
+ /**
+ * Constructor.
+ */
+ public CmisLocalSpi() {
+ }
+
+ public CmisSpi getSpiInstance(Session session) {
+ if (log.isDebugEnabled()) {
+ log.debug("Initializing local SPI...");
+ }
+
+ // get the service factory class name
+ String serviceFactoryClassname = (String) session.get(SessionParameter.LOCAL_FACTORY);
+ if (serviceFactoryClassname == null) {
+ throw new CmisConnectionException("Factory class not set!");
+ }
+
+ try {
+ // gather parameters from session
+ Map<String, String> parameters = new HashMap<String, String>();
+ for (String key : session.getKeys()) {
+ Object value = session.get(key);
+ if (value instanceof String) {
+ parameters.put(key, (String) value);
+ }
+ }
+
+ // create and initialize factory
+ factory = (CmisServiceFactory) Class.forName(serviceFactoryClassname).newInstance();
+ factory.init(parameters);
+ } catch (Exception e) {
+ throw new CmisConnectionException("Factory cannot be created!", e);
+ }
+
+ repositoryService = new RepositoryServiceImpl(session, factory);
+ navigationService = new NavigationServiceImpl(session, factory);
+ objectService = new ObjectServiceImpl(session, factory);
+ versioningService = new VersioningServiceImpl(session, factory);
+ discoveryService = new DiscoveryServiceImpl(session, factory);
+ multiFilingService = new MultiFilingServiceImpl(session, factory);
+ relationshipService = new RelationshipServiceImpl(session, factory);
+ policyService = new PolicyServiceImpl(session, factory);
+
+ return this;
+ }
+
+ public RepositoryService getRepositoryService() {
+ return repositoryService;
+ }
+
+ public NavigationService getNavigationService() {
+ return navigationService;
+ }
+
+ public ObjectService getObjectService() {
+ return objectService;
+ }
+
+ public DiscoveryService getDiscoveryService() {
+ return discoveryService;
+ }
+
+ public VersioningService getVersioningService() {
+ return versioningService;
+ }
+
+ public MultiFilingService getMultiFilingService() {
+ return multiFilingService;
+ }
+
+ public RelationshipService getRelationshipService() {
+ return relationshipService;
+ }
+
+ public PolicyService getPolicyService() {
+ return policyService;
+ }
+
+ public AclService getAclService() {
+ return aclService;
+ }
+
+ public void clearAllCaches() {
+ }
+
+ public void clearRepositoryCache(String repositoryId) {
+ }
+
+ public void close() {
+ factory.destroy();
+ }
+}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/DiscoveryServiceImpl.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/DiscoveryServiceImpl.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/DiscoveryServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/DiscoveryServiceImpl.java Tue Jun 15 15:51:42 2010
@@ -1,48 +1,69 @@
-package org.apache.chemistry.opencmis.client.bindings.spi.local;
-
-import java.math.BigInteger;
-
-import org.apache.chemistry.opencmis.client.bindings.spi.Session;
-import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
-import org.apache.chemistry.opencmis.commons.data.ObjectList;
-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.DiscoveryService;
-import org.apache.chemistry.opencmis.commons.spi.Holder;
-
-public class DiscoveryServiceImpl extends AbstractLocalService implements DiscoveryService {
-
- /**
- * Constructor.
- */
- public DiscoveryServiceImpl(Session session, CmisServiceFactory factory) {
- setSession(session);
- setServiceFactory(factory);
- }
-
- public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
- String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getContentChanges(repositoryId, changeLogToken, includeProperties, filter, includePolicyIds,
- includeAcl, maxItems, extension);
- } finally {
- service.close();
- }
- }
-
- public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
- Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
- BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.query(repositoryId, statement, searchAllVersions, includeAllowableActions,
- includeRelationships, renditionFilter, maxItems, skipCount, 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 org.apache.chemistry.opencmis.client.bindings.spi.Session;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.data.ObjectList;
+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.DiscoveryService;
+import org.apache.chemistry.opencmis.commons.spi.Holder;
+
+public class DiscoveryServiceImpl extends AbstractLocalService implements DiscoveryService {
+
+ /**
+ * Constructor.
+ */
+ public DiscoveryServiceImpl(Session session, CmisServiceFactory factory) {
+ setSession(session);
+ setServiceFactory(factory);
+ }
+
+ public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
+ String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getContentChanges(repositoryId, changeLogToken, includeProperties, filter, includePolicyIds,
+ includeAcl, maxItems, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.query(repositoryId, statement, searchAllVersions, includeAllowableActions,
+ includeRelationships, renditionFilter, maxItems, skipCount, 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/MultiFilingServiceImpl.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/MultiFilingServiceImpl.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/MultiFilingServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/MultiFilingServiceImpl.java Tue Jun 15 15:51:42 2010
@@ -1,39 +1,60 @@
-package org.apache.chemistry.opencmis.client.bindings.spi.local;
-
-import org.apache.chemistry.opencmis.client.bindings.spi.Session;
-import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
-import org.apache.chemistry.opencmis.commons.server.CmisService;
-import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
-import org.apache.chemistry.opencmis.commons.spi.MultiFilingService;
-
-public class MultiFilingServiceImpl extends AbstractLocalService implements MultiFilingService {
-
- /**
- * Constructor.
- */
- public MultiFilingServiceImpl(Session session, CmisServiceFactory factory) {
- setSession(session);
- setServiceFactory(factory);
- }
-
- public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions,
- ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.addObjectToFolder(repositoryId, objectId, folderId, allVersions, extension);
- } finally {
- service.close();
- }
- }
-
- public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.removeObjectFromFolder(repositoryId, objectId, folderId, 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 org.apache.chemistry.opencmis.client.bindings.spi.Session;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.server.CmisService;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+import org.apache.chemistry.opencmis.commons.spi.MultiFilingService;
+
+public class MultiFilingServiceImpl extends AbstractLocalService implements MultiFilingService {
+
+ /**
+ * Constructor.
+ */
+ public MultiFilingServiceImpl(Session session, CmisServiceFactory factory) {
+ setSession(session);
+ setServiceFactory(factory);
+ }
+
+ public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions,
+ ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.addObjectToFolder(repositoryId, objectId, folderId, allVersions, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.removeObjectFromFolder(repositoryId, objectId, folderId, 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/NavigationServiceImpl.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/NavigationServiceImpl.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/NavigationServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/NavigationServiceImpl.java Tue Jun 15 15:51:42 2010
@@ -1,102 +1,123 @@
-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.ObjectData;
-import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
-import org.apache.chemistry.opencmis.commons.data.ObjectInFolderList;
-import org.apache.chemistry.opencmis.commons.data.ObjectList;
-import org.apache.chemistry.opencmis.commons.data.ObjectParentData;
-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.NavigationService;
-
-public class NavigationServiceImpl extends AbstractLocalService implements NavigationService {
-
- /**
- * Constructor.
- */
- public NavigationServiceImpl(Session session, CmisServiceFactory factory) {
- setSession(session);
- setServiceFactory(factory);
- }
-
- public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
- Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
- BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getCheckedOutDocs(repositoryId, folderId, filter, orderBy, includeAllowableActions,
- includeRelationships, renditionFilter, maxItems, skipCount, extension);
- } finally {
- service.close();
- }
- }
-
- public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
- Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
- Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getChildren(repositoryId, folderId, filter, orderBy, includeAllowableActions,
- includeRelationships, renditionFilter, includePathSegment, maxItems, skipCount, extension);
- } finally {
- service.close();
- }
- }
-
- public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
- String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
- String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions,
- includeRelationships, renditionFilter, includePathSegment, extension);
- } finally {
- service.close();
- }
- }
-
- public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getFolderParent(repositoryId, folderId, filter, extension);
- } finally {
- service.close();
- }
- }
-
- public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
- String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
- String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions,
- includeRelationships, renditionFilter, includePathSegment, extension);
- } finally {
- service.close();
- }
- }
-
- public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
- Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
- Boolean includeRelativePathSegment, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getObjectParents(repositoryId, objectId, filter, includeAllowableActions,
- includeRelationships, renditionFilter, includeRelativePathSegment, 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.ObjectData;
+import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
+import org.apache.chemistry.opencmis.commons.data.ObjectInFolderList;
+import org.apache.chemistry.opencmis.commons.data.ObjectList;
+import org.apache.chemistry.opencmis.commons.data.ObjectParentData;
+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.NavigationService;
+
+public class NavigationServiceImpl extends AbstractLocalService implements NavigationService {
+
+ /**
+ * Constructor.
+ */
+ public NavigationServiceImpl(Session session, CmisServiceFactory factory) {
+ setSession(session);
+ setServiceFactory(factory);
+ }
+
+ public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getCheckedOutDocs(repositoryId, folderId, filter, orderBy, includeAllowableActions,
+ includeRelationships, renditionFilter, maxItems, skipCount, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getChildren(repositoryId, folderId, filter, orderBy, includeAllowableActions,
+ includeRelationships, renditionFilter, includePathSegment, maxItems, skipCount, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
+ String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+ String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions,
+ includeRelationships, renditionFilter, includePathSegment, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getFolderParent(repositoryId, folderId, filter, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
+ String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+ String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions,
+ includeRelationships, renditionFilter, includePathSegment, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ Boolean includeRelativePathSegment, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getObjectParents(repositoryId, objectId, filter, includeAllowableActions,
+ includeRelationships, renditionFilter, includeRelativePathSegment, 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/ObjectServiceImpl.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/ObjectServiceImpl.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/ObjectServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/ObjectServiceImpl.java Tue Jun 15 15:51:42 2010
@@ -1,224 +1,245 @@
-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.Acl;
-import org.apache.chemistry.opencmis.commons.data.AllowableActions;
-import org.apache.chemistry.opencmis.commons.data.ContentStream;
-import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
-import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
-import org.apache.chemistry.opencmis.commons.data.ObjectData;
-import org.apache.chemistry.opencmis.commons.data.Properties;
-import org.apache.chemistry.opencmis.commons.data.RenditionData;
-import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
-import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
-import org.apache.chemistry.opencmis.commons.enums.VersioningState;
-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.ObjectService;
-
-public class ObjectServiceImpl extends AbstractLocalService implements ObjectService {
-
- /**
- * Constructor.
- */
- public ObjectServiceImpl(Session session, CmisServiceFactory factory) {
- setSession(session);
- setServiceFactory(factory);
- }
-
- public String createDocument(String repositoryId, Properties properties, String folderId,
- ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
- Acl removeAces, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.createDocument(repositoryId, properties, folderId, contentStream, versioningState, policies,
- addAces, removeAces, extension);
- } finally {
- service.close();
- }
- }
-
- public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
- String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces,
- ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.createDocumentFromSource(repositoryId, sourceId, properties, folderId, versioningState,
- policies, addAces, removeAces, extension);
- } finally {
- service.close();
- }
- }
-
- public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
- Acl addAces, Acl removeAces, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.createFolder(repositoryId, properties, folderId, policies, addAces, removeAces, extension);
- } finally {
- service.close();
- }
- }
-
- public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
- Acl addAces, Acl removeAces, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.createPolicy(repositoryId, properties, folderId, policies, addAces, removeAces, extension);
- } finally {
- service.close();
- }
- }
-
- public String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addAces,
- Acl removeAces, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.createRelationship(repositoryId, properties, policies, addAces, removeAces, extension);
- } finally {
- service.close();
- }
- }
-
- public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
- ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.deleteContentStream(repositoryId, objectId, changeToken, extension);
- } finally {
- service.close();
- }
- }
-
- public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.deleteObject(repositoryId, objectId, allVersions, extension);
- } finally {
- service.close();
- }
- }
-
- public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
- UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.deleteTree(repositoryId, folderId, allVersions, unfileObjects, continueOnFailure, extension);
- } finally {
- service.close();
- }
- }
-
- public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getAllowableActions(repositoryId, objectId, extension);
- } finally {
- service.close();
- }
- }
-
- public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
- BigInteger length, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getContentStream(repositoryId, objectId, streamId, offset, length, extension);
- } finally {
- service.close();
- }
- }
-
- public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
- IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
- Boolean includeAcl, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getObject(repositoryId, objectId, filter, includeAllowableActions, includeRelationships,
- renditionFilter, includePolicyIds, includeAcl, extension);
- } finally {
- service.close();
- }
- }
-
- public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
- IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
- Boolean includeAcl, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getObjectByPath(repositoryId, path, filter, includeAllowableActions, includeRelationships,
- renditionFilter, includePolicyIds, includeAcl, extension);
- } finally {
- service.close();
- }
- }
-
- public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getProperties(repositoryId, objectId, filter, extension);
- } finally {
- service.close();
- }
- }
-
- public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
- BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getRenditions(repositoryId, objectId, renditionFilter, maxItems, skipCount, extension);
- } finally {
- service.close();
- }
- }
-
- public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
- ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.moveObject(repositoryId, objectId, targetFolderId, sourceFolderId, extension);
- } finally {
- service.close();
- }
- }
-
- public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
- Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.setContentStream(repositoryId, objectId, overwriteFlag, changeToken, contentStream, extension);
- } finally {
- service.close();
- }
- }
-
- public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
- Properties properties, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.updateProperties(repositoryId, objectId, changeToken, properties, 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.Acl;
+import org.apache.chemistry.opencmis.commons.data.AllowableActions;
+import org.apache.chemistry.opencmis.commons.data.ContentStream;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
+import org.apache.chemistry.opencmis.commons.data.ObjectData;
+import org.apache.chemistry.opencmis.commons.data.Properties;
+import org.apache.chemistry.opencmis.commons.data.RenditionData;
+import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
+import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
+import org.apache.chemistry.opencmis.commons.enums.VersioningState;
+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.ObjectService;
+
+public class ObjectServiceImpl extends AbstractLocalService implements ObjectService {
+
+ /**
+ * Constructor.
+ */
+ public ObjectServiceImpl(Session session, CmisServiceFactory factory) {
+ setSession(session);
+ setServiceFactory(factory);
+ }
+
+ public String createDocument(String repositoryId, Properties properties, String folderId,
+ ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
+ Acl removeAces, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.createDocument(repositoryId, properties, folderId, contentStream, versioningState, policies,
+ addAces, removeAces, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
+ String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces,
+ ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.createDocumentFromSource(repositoryId, sourceId, properties, folderId, versioningState,
+ policies, addAces, removeAces, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
+ Acl addAces, Acl removeAces, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.createFolder(repositoryId, properties, folderId, policies, addAces, removeAces, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
+ Acl addAces, Acl removeAces, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.createPolicy(repositoryId, properties, folderId, policies, addAces, removeAces, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addAces,
+ Acl removeAces, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.createRelationship(repositoryId, properties, policies, addAces, removeAces, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+ ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.deleteContentStream(repositoryId, objectId, changeToken, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.deleteObject(repositoryId, objectId, allVersions, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
+ UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.deleteTree(repositoryId, folderId, allVersions, unfileObjects, continueOnFailure, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getAllowableActions(repositoryId, objectId, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
+ BigInteger length, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getContentStream(repositoryId, objectId, streamId, offset, length, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
+ IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+ Boolean includeAcl, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getObject(repositoryId, objectId, filter, includeAllowableActions, includeRelationships,
+ renditionFilter, includePolicyIds, includeAcl, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
+ IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+ Boolean includeAcl, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getObjectByPath(repositoryId, path, filter, includeAllowableActions, includeRelationships,
+ renditionFilter, includePolicyIds, includeAcl, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getProperties(repositoryId, objectId, filter, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getRenditions(repositoryId, objectId, renditionFilter, maxItems, skipCount, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
+ ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.moveObject(repositoryId, objectId, targetFolderId, sourceFolderId, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
+ Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.setContentStream(repositoryId, objectId, overwriteFlag, changeToken, contentStream, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+ Properties properties, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.updateProperties(repositoryId, objectId, changeToken, properties, 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/PolicyServiceImpl.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/PolicyServiceImpl.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/PolicyServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/PolicyServiceImpl.java Tue Jun 15 15:51:42 2010
@@ -1,52 +1,73 @@
-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.ExtensionsData;
-import org.apache.chemistry.opencmis.commons.data.ObjectData;
-import org.apache.chemistry.opencmis.commons.server.CmisService;
-import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
-import org.apache.chemistry.opencmis.commons.spi.PolicyService;
-
-public class PolicyServiceImpl extends AbstractLocalService implements PolicyService {
-
- /**
- * Constructor.
- */
- public PolicyServiceImpl(Session session, CmisServiceFactory factory) {
- setSession(session);
- setServiceFactory(factory);
- }
-
- public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.applyPolicy(repositoryId, policyId, objectId, extension);
- } finally {
- service.close();
- }
- }
-
- public List<ObjectData> getAppliedPolicies(String repositoryId, String objectId, String filter,
- ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getAppliedPolicies(repositoryId, objectId, filter, extension);
- } finally {
- service.close();
- }
- }
-
- public void removePolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- service.removePolicy(repositoryId, policyId, objectId, 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.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.data.ObjectData;
+import org.apache.chemistry.opencmis.commons.server.CmisService;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+import org.apache.chemistry.opencmis.commons.spi.PolicyService;
+
+public class PolicyServiceImpl extends AbstractLocalService implements PolicyService {
+
+ /**
+ * Constructor.
+ */
+ public PolicyServiceImpl(Session session, CmisServiceFactory factory) {
+ setSession(session);
+ setServiceFactory(factory);
+ }
+
+ public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.applyPolicy(repositoryId, policyId, objectId, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public List<ObjectData> getAppliedPolicies(String repositoryId, String objectId, String filter,
+ ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getAppliedPolicies(repositoryId, objectId, filter, extension);
+ } finally {
+ service.close();
+ }
+ }
+
+ public void removePolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ service.removePolicy(repositoryId, policyId, objectId, 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/RelationshipServiceImpl.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/RelationshipServiceImpl.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/RelationshipServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/RelationshipServiceImpl.java Tue Jun 15 15:51:42 2010
@@ -1,35 +1,56 @@
-package org.apache.chemistry.opencmis.client.bindings.spi.local;
-
-import java.math.BigInteger;
-
-import org.apache.chemistry.opencmis.client.bindings.spi.Session;
-import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
-import org.apache.chemistry.opencmis.commons.data.ObjectList;
-import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
-import org.apache.chemistry.opencmis.commons.server.CmisService;
-import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
-import org.apache.chemistry.opencmis.commons.spi.RelationshipService;
-
-public class RelationshipServiceImpl extends AbstractLocalService implements RelationshipService {
-
- /**
- * Constructor.
- */
- public RelationshipServiceImpl(Session session, CmisServiceFactory factory) {
- setSession(session);
- setServiceFactory(factory);
- }
-
- public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes,
- RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions,
- BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
- CmisService service = getService(repositoryId);
-
- try {
- return service.getObjectRelationships(repositoryId, objectId, includeSubRelationshipTypes,
- relationshipDirection, typeId, filter, includeAllowableActions, maxItems, skipCount, 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 org.apache.chemistry.opencmis.client.bindings.spi.Session;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.data.ObjectList;
+import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
+import org.apache.chemistry.opencmis.commons.server.CmisService;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+import org.apache.chemistry.opencmis.commons.spi.RelationshipService;
+
+public class RelationshipServiceImpl extends AbstractLocalService implements RelationshipService {
+
+ /**
+ * Constructor.
+ */
+ public RelationshipServiceImpl(Session session, CmisServiceFactory factory) {
+ setSession(session);
+ setServiceFactory(factory);
+ }
+
+ public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes,
+ RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ CmisService service = getService(repositoryId);
+
+ try {
+ return service.getObjectRelationships(repositoryId, objectId, includeSubRelationshipTypes,
+ relationshipDirection, typeId, filter, includeAllowableActions, maxItems, skipCount, extension);
+ } finally {
+ service.close();
+ }
+ }
+}