You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2011/11/24 15:33:47 UTC
svn commit: r1205845 - in /chemistry/opencmis/trunk:
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/or...
Author: fmui
Date: Thu Nov 24 14:33:44 2011
New Revision: 1205845
URL: http://svn.apache.org/viewvc?rev=1205845&view=rev
Log:
added base infrastructure for the browser binding client implementation
Added:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AbstractBrowserBindingService.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AclServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/DiscoveryServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/MultiFilingServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/NavigationServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/ObjectServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/PolicyServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RelationshipServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryUrlCache.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/SpiSessionParameter.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/VersioningServiceImpl.java
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/CmisBindingHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BindingType.java
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java?rev=1205845&r1=1205844&r2=1205845&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java Thu Nov 24 14:33:44 2011
@@ -35,6 +35,8 @@ public class CmisBindingFactory {
public static final String BINDING_SPI_ATOMPUB = "org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubSpi";
/** Default CMIS Web Services binding SPI implementation */
public static final String BINDING_SPI_WEBSERVICES = "org.apache.chemistry.opencmis.client.bindings.spi.webservices.CmisWebServicesSpi";
+ /** Default CMIS Browser binding SPI implementation */
+ public static final String BINDING_SPI_BROWSER = "org.apache.chemistry.opencmis.client.bindings.spi.browser.CmisBrowserBindingSpi";
/** Default CMIS local binding SPI implementation */
public static final String BINDING_SPI_LOCAL = "org.apache.chemistry.opencmis.client.bindings.spi.local.CmisLocalSpi";
@@ -173,6 +175,38 @@ public class CmisBindingFactory {
}
/**
+ * Creates a default CMIS Browser binding instance.
+ */
+ public CmisBinding createCmisBrowserBinding(Map<String, String> sessionParameters) {
+ return createCmisBrowserBinding(sessionParameters, null);
+ }
+
+ /**
+ * Creates a default CMIS Browser binding instance with a custom
+ * authentication provider.
+ */
+ public CmisBinding createCmisBrowserBinding(Map<String, String> sessionParameters,
+ AuthenticationProvider authenticationProvider) {
+ checkSessionParameters(sessionParameters, false);
+
+ sessionParameters.put(SessionParameter.BINDING_SPI_CLASS, BINDING_SPI_BROWSER);
+ if (authenticationProvider == null) {
+ if (!sessionParameters.containsKey(SessionParameter.AUTHENTICATION_PROVIDER_CLASS)) {
+ sessionParameters.put(SessionParameter.AUTHENTICATION_PROVIDER_CLASS, STANDARD_AUTHENTICATION_PROVIDER);
+ }
+ }
+ if (!sessionParameters.containsKey(SessionParameter.AUTH_HTTP_BASIC)) {
+ sessionParameters.put(SessionParameter.AUTH_HTTP_BASIC, "true");
+ }
+ sessionParameters.put(SessionParameter.AUTH_SOAP_USERNAMETOKEN, "false");
+ addDefaultParameters(sessionParameters);
+
+ check(sessionParameters, SessionParameter.BROWSER_URL);
+
+ return new CmisBindingImpl(sessionParameters, authenticationProvider);
+ }
+
+ /**
* Creates a default CMIS local binding instance.
*/
public CmisBinding createCmisLocalBinding(Map<String, String> sessionParameters) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java?rev=1205845&r1=1205844&r2=1205845&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java Thu Nov 24 14:33:44 2011
@@ -80,9 +80,9 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
/**
- * Base class for all AtomPub clients.
+ * Base class for all AtomPub client services.
*/
-public class AbstractAtomPubService implements LinkAccess {
+public abstract class AbstractAtomPubService implements LinkAccess {
protected enum IdentifierType {
ID, PATH
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java?rev=1205845&r1=1205844&r2=1205845&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java Thu Nov 24 14:33:44 2011
@@ -19,8 +19,7 @@
package org.apache.chemistry.opencmis.client.bindings.spi.atompub;
/**
- * @author <a href="mailto:fmueller@opentext.com">Florian Müller</a>
- *
+ * Internal session parameters.
*/
public final class SpiSessionParameter {
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AbstractBrowserBindingService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AbstractBrowserBindingService.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AbstractBrowserBindingService.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AbstractBrowserBindingService.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.LinkAccess;
+
+/**
+ * Base class for all Browser Binding client services.
+ */
+public abstract class AbstractBrowserBindingService implements LinkAccess {
+
+ private BindingSession session;
+
+ /**
+ * Sets the current session.
+ */
+ protected void setSession(BindingSession session) {
+ this.session = session;
+ }
+
+ /**
+ * Gets the current session.
+ */
+ protected BindingSession getSession() {
+ return session;
+ }
+
+ // ---- LinkAccess interface ----
+
+ public String loadLink(String repositoryId, String objectId, String rel, String type) {
+ // AtomPub specific -> return null
+ return null;
+ }
+
+ public String loadContentLink(String repositoryId, String documentId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AclServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AclServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AclServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/AclServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+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.spi.AclService;
+
+/**
+ * ACL Service Browser Binding client.
+ */
+public class AclServiceImpl extends AbstractBrowserBindingService implements AclService {
+
+ /**
+ * Constructor.
+ */
+ public AclServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces,
+ AclPropagation aclPropagation, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,122 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+import org.apache.chemistry.opencmis.client.bindings.spi.CmisSpi;
+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;
+
+public class CmisBrowserBindingSpi implements CmisSpi {
+
+ private static final Log log = LogFactory.getLog(CmisBrowserBindingSpi.class);
+
+ private final BindingSession session;
+
+ private final RepositoryService repositoryService;
+ private final NavigationService navigationService;
+ private final ObjectService objectService;
+ private final VersioningService versioningService;
+ private final DiscoveryService discoveryService;
+ private final MultiFilingService multiFilingService;
+ private final RelationshipService relationshipService;
+ private final PolicyService policyService;
+ private final AclService aclService;
+
+ /**
+ * Constructor.
+ */
+ public CmisBrowserBindingSpi(BindingSession session) {
+ if (log.isDebugEnabled()) {
+ log.debug("Initializing Browser Binding SPI...");
+ }
+
+ this.session = session;
+
+ repositoryService = new RepositoryServiceImpl(session);
+ navigationService = new NavigationServiceImpl(session);
+ objectService = new ObjectServiceImpl(session);
+ versioningService = new VersioningServiceImpl(session);
+ discoveryService = new DiscoveryServiceImpl(session);
+ multiFilingService = new MultiFilingServiceImpl(session);
+ relationshipService = new RelationshipServiceImpl(session);
+ policyService = new PolicyServiceImpl(session);
+ aclService = new AclServiceImpl(session);
+ }
+
+ public RepositoryService getRepositoryService() {
+ return repositoryService;
+ }
+
+ public NavigationService getNavigationService() {
+ return navigationService;
+ }
+
+ public ObjectService getObjectService() {
+ return objectService;
+ }
+
+ public VersioningService getVersioningService() {
+ return versioningService;
+ }
+
+ public RelationshipService getRelationshipService() {
+ return relationshipService;
+ }
+
+ public DiscoveryService getDiscoveryService() {
+ return discoveryService;
+ }
+
+ public MultiFilingService getMultiFilingService() {
+ return multiFilingService;
+ }
+
+ public AclService getAclService() {
+ return aclService;
+ }
+
+ public PolicyService getPolicyService() {
+ return policyService;
+ }
+
+ public void clearAllCaches() {
+ session.remove(SpiSessionParameter.REPOSITORY_URL_CACHE);
+ }
+
+ public void clearRepositoryCache(String repositoryId) {
+ RepositoryUrlCache repUrlCache = (RepositoryUrlCache) session.get(SpiSessionParameter.REPOSITORY_URL_CACHE);
+ if (repUrlCache != null) {
+ repUrlCache.removeRepository(repositoryId);
+ }
+ }
+
+ public void close() {
+ // no-op for Browser Binding
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/DiscoveryServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/DiscoveryServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/DiscoveryServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/DiscoveryServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import java.math.BigInteger;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+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.spi.DiscoveryService;
+import org.apache.chemistry.opencmis.commons.spi.Holder;
+
+/**
+ * Discovery Service Browser Binding client.
+ */
+public class DiscoveryServiceImpl extends AbstractBrowserBindingService implements DiscoveryService {
+
+ /**
+ * Constructor.
+ */
+ public DiscoveryServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
+ String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/MultiFilingServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/MultiFilingServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/MultiFilingServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/MultiFilingServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.spi.MultiFilingService;
+
+/**
+ * MultiFiling Service Browser Binding client.
+ */
+public class MultiFilingServiceImpl extends AbstractBrowserBindingService implements MultiFilingService {
+
+ /**
+ * Constructor.
+ */
+ public MultiFilingServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions,
+ ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/NavigationServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/NavigationServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/NavigationServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/NavigationServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import java.math.BigInteger;
+import java.util.List;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+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.spi.NavigationService;
+
+/**
+ * Navigation Service Browser Binding client.
+ */
+public class NavigationServiceImpl extends AbstractBrowserBindingService implements NavigationService {
+
+ /**
+ * Constructor.
+ */
+ public NavigationServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ 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) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
+ String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+ String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
+ String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+ String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ Boolean includeRelativePathSegment, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
+ Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/ObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/ObjectServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/ObjectServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/ObjectServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,154 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import java.math.BigInteger;
+import java.util.List;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+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.spi.Holder;
+import org.apache.chemistry.opencmis.commons.spi.ObjectService;
+
+/**
+ * Object Service Browser Binding client.
+ */
+public class ObjectServiceImpl extends AbstractBrowserBindingService implements ObjectService {
+
+ /**
+ * Constructor.
+ */
+ public ObjectServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ public String createDocument(String repositoryId, Properties properties, String folderId,
+ ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
+ Acl removeAces, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
+ String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces,
+ ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
+ Acl addAces, Acl removeAces, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addAces,
+ Acl removeAces, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
+ Acl addAces, Acl removeAces, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
+ IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+ Boolean includeAcl, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
+ IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+ Boolean includeAcl, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
+ BigInteger length, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+ Properties properties, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
+ ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
+ UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
+ Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+ ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/PolicyServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/PolicyServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/PolicyServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/PolicyServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import java.util.List;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.data.ObjectData;
+import org.apache.chemistry.opencmis.commons.spi.PolicyService;
+
+/**
+ * Policy Service Browser Binding client.
+ */
+public class PolicyServiceImpl extends AbstractBrowserBindingService implements PolicyService {
+
+ /**
+ * Constructor.
+ */
+ public PolicyServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removePolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public List<ObjectData> getAppliedPolicies(String repositoryId, String objectId, String filter,
+ ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RelationshipServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RelationshipServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RelationshipServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RelationshipServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import java.math.BigInteger;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+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.spi.RelationshipService;
+
+/**
+ * Relationship Service Browser Binding client.
+ */
+public class RelationshipServiceImpl extends AbstractBrowserBindingService implements RelationshipService {
+
+ /**
+ * Constructor.
+ */
+ public RelationshipServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes,
+ RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import java.math.BigInteger;
+import java.util.List;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+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.spi.RepositoryService;
+
+/**
+ * Repository Service Browser Binding client.
+ */
+public class RepositoryServiceImpl extends AbstractBrowserBindingService implements RepositoryService {
+
+ /**
+ * Constructor.
+ */
+ public RepositoryServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
+ BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
+ Boolean includePropertyDefinitions, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryUrlCache.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryUrlCache.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryUrlCache.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/RepositoryUrlCache.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,152 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.chemistry.opencmis.commons.impl.UrlBuilder;
+
+/**
+ * URL cache for repository and root URLs.
+ */
+public class RepositoryUrlCache implements Serializable {
+
+ public static final String CMIS_SELECTOR = "cmisselector";
+ public static final String OBJECT_ID = "objectId";
+
+ private static final long serialVersionUID = 1L;
+
+ private final Map<String, String> repositoryUrls;
+ private final Map<String, String> rootUrls;
+
+ private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+
+ public RepositoryUrlCache() {
+ repositoryUrls = new HashMap<String, String>();
+ rootUrls = new HashMap<String, String>();
+ }
+
+ /**
+ * Adds the URLs of a repository to the cache.
+ */
+ public void addRepository(String repositoryId, String repositoryUrl, String rootUrl) {
+ lock.writeLock().lock();
+ try {
+ repositoryUrls.put(repositoryId, repositoryUrl);
+ rootUrls.put(repositoryId, rootUrl);
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
+ /**
+ * Removes the URLs of a repository from the cache.
+ */
+ public void removeRepository(String repositoryId) {
+ lock.writeLock().lock();
+ try {
+ repositoryUrls.remove(repositoryId);
+ rootUrls.remove(repositoryId);
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
+ /**
+ * Returns the base repository URL of a repository.
+ */
+ public String getRepositoryBaseUrl(String repositoryId) {
+ lock.readLock().lock();
+ try {
+ return repositoryUrls.get(repositoryId);
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Returns the root URL of a repository.
+ */
+ public String getRootUrl(String repositoryId) {
+ lock.readLock().lock();
+ try {
+ return rootUrls.get(repositoryId);
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Return the repository URL.
+ */
+ public UrlBuilder getRepositoryUrl(String repositoryId) {
+ String base = getRepositoryBaseUrl(repositoryId);
+ if (base == null) {
+ return null;
+ }
+
+ return new UrlBuilder(base);
+ }
+
+ /**
+ * Return the repository URL with the given selector.
+ */
+ public UrlBuilder getRepositoryUrl(String repositoryId, String selector) {
+ UrlBuilder result = getRepositoryUrl(repositoryId);
+ if (result == null) {
+ return null;
+ }
+
+ result.addParameter(CMIS_SELECTOR, selector);
+
+ return result;
+ }
+
+ /**
+ * Return an object URL with the given selector.
+ */
+ public UrlBuilder getObjectUrl(String repositoryId, String objectId) {
+ String root = getRootUrl(repositoryId);
+ if (root == null) {
+ return null;
+ }
+
+ UrlBuilder result = new UrlBuilder(root);
+ result.addParameter(OBJECT_ID, objectId);
+
+ return result;
+ }
+
+ /**
+ * Return an object URL with the given selector.
+ */
+ public UrlBuilder getObjectUrl(String repositoryId, String objectId, String selector) {
+ UrlBuilder result = getObjectUrl(repositoryId, objectId);
+ if (result == null) {
+ return null;
+ }
+
+ result.addParameter(CMIS_SELECTOR, selector);
+
+ return result;
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/SpiSessionParameter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/SpiSessionParameter.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/SpiSessionParameter.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/SpiSessionParameter.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+/**
+ * Internal session parameters.
+ */
+public final class SpiSessionParameter {
+
+ public static final String REPOSITORY_URL_CACHE = "org.apache.chemistry.opencmis.binding.browser.repositoryurls";
+
+ private SpiSessionParameter() {
+ }
+}
Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/VersioningServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/VersioningServiceImpl.java?rev=1205845&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/VersioningServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/VersioningServiceImpl.java Thu Nov 24 14:33:44 2011
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.browser;
+
+import java.util.List;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+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.spi.Holder;
+import org.apache.chemistry.opencmis.commons.spi.VersioningService;
+
+/**
+ * Versioning Service Browser Binding client.
+ */
+public class VersioningServiceImpl extends AbstractBrowserBindingService implements VersioningService {
+
+ /**
+ * Constructor.
+ */
+ public VersioningServiceImpl(BindingSession session) {
+ setSession(session);
+ }
+
+ public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
+ Holder<Boolean> contentCopied) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+
+ }
+
+ 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) {
+ // TODO Auto-generated method stub
+
+ }
+
+ 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) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+ Boolean major, String filter, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
+ Boolean includeAllowableActions, ExtensionsData extension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/CmisBindingHelper.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/CmisBindingHelper.java?rev=1205845&r1=1205844&r2=1205845&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/CmisBindingHelper.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/CmisBindingHelper.java Thu Nov 24 14:33:44 2011
@@ -55,6 +55,8 @@ public class CmisBindingHelper {
return createAtomPubBinding(parameters, authenticationProvider);
case WEBSERVICES:
return createWebServiceBinding(parameters, authenticationProvider);
+ case BROWSER:
+ return createCmisBrowserBinding(parameters, authenticationProvider);
case LOCAL:
return createLocalBinding(parameters);
case CUSTOM:
@@ -98,6 +100,17 @@ public class CmisBindingHelper {
}
/**
+ * Creates an Browser binding.
+ */
+ private static CmisBinding createCmisBrowserBinding(Map<String, String> parameters,
+ AuthenticationProvider authenticationProvider) {
+ CmisBindingFactory factory = CmisBindingFactory.newInstance();
+ CmisBinding binding = factory.createCmisBrowserBinding(parameters, authenticationProvider);
+
+ return binding;
+ }
+
+ /**
* Creates a local binding.
*/
private static CmisBinding createLocalBinding(Map<String, String> parameters) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java?rev=1205845&r1=1205844&r2=1205845&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java Thu Nov 24 14:33:44 2011
@@ -54,7 +54,10 @@ public final class SessionParameter {
public static final String WEBSERVICES_MEMORY_THRESHOLD = "org.apache.chemistry.opencmis.binding.webservices.memoryThreshold";
public static final String WEBSERVICES_PORT_PROVIDER_CLASS = "org.apache.chemistry.opencmis.binding.webservices.portprovider.classname";
-
+
+ /** URL of the Browser Binding entry point. */
+ public static final String BROWSER_URL = "org.apache.chemistry.opencmis.binding.browser.url";
+
/** Factory class name for the local binding. */
public static final String LOCAL_FACTORY = "org.apache.chemistry.opencmis.binding.local.classname";
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BindingType.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BindingType.java?rev=1205845&r1=1205844&r2=1205845&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BindingType.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BindingType.java Thu Nov 24 14:33:44 2011
@@ -23,7 +23,7 @@ package org.apache.chemistry.opencmis.co
*/
public enum BindingType {
- WEBSERVICES("webservices"), ATOMPUB("atompub"), LOCAL("local"), CUSTOM("custom");
+ WEBSERVICES("webservices"), ATOMPUB("atompub"), BROWSER("browser"), LOCAL("local"), CUSTOM("custom");
private final String value;