chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1133473 - 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...
Date Wed, 08 Jun 2011 17:24:32 GMT
Author: fmui
Date: Wed Jun  8 17:24:31 2011
New Revision: 1133473

URL: http://svn.apache.org/viewvc?rev=1133473&view=rev
Log:
cleaned up the authentication provider interfaces and classes

Added:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/SessionAwareAuthenticationProvider.java
  (with props)
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/impl/CmisBindingImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/AbstractAuthenticationProvider.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-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/AuthenticationProvider.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=1133473&r1=1133472&r2=1133473&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
Wed Jun  8 17:24:31 2011
@@ -22,8 +22,8 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingImpl;
-import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider;
 import org.apache.chemistry.opencmis.commons.SessionParameter;
+import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 import org.apache.chemistry.opencmis.commons.spi.CmisBinding;
 
 /**
@@ -90,7 +90,7 @@ public class CmisBindingFactory {
      * the session parameters.
      */
     public CmisBinding createCmisBinding(Map<String, String> sessionParameters,
-            AbstractAuthenticationProvider authenticationProvider) {
+            AuthenticationProvider authenticationProvider) {
         checkSessionParameters(sessionParameters, true);
 
         addDefaultParameters(sessionParameters);
@@ -110,7 +110,7 @@ public class CmisBindingFactory {
      * authentication provider.
      */
     public CmisBinding createCmisAtomPubBinding(Map<String, String> sessionParameters,
-            AbstractAuthenticationProvider authenticationProvider) {
+            AuthenticationProvider authenticationProvider) {
         checkSessionParameters(sessionParameters, false);
 
         sessionParameters.put(SessionParameter.BINDING_SPI_CLASS, BINDING_SPI_ATOMPUB);
@@ -142,7 +142,7 @@ public class CmisBindingFactory {
      * authentication provider.
      */
     public CmisBinding createCmisWebServicesBinding(Map<String, String> sessionParameters,
-            AbstractAuthenticationProvider authenticationProvider) {
+            AuthenticationProvider authenticationProvider) {
         checkSessionParameters(sessionParameters, false);
 
         sessionParameters.put(SessionParameter.BINDING_SPI_CLASS, BINDING_SPI_WEBSERVICES);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingImpl.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/impl/CmisBindingImpl.java?rev=1133473&r1=1133472&r2=1133473&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingImpl.java
Wed Jun  8 17:24:31 2011
@@ -21,9 +21,9 @@ package org.apache.chemistry.opencmis.cl
 import java.io.Serializable;
 import java.util.Map;
 
-import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider;
-import org.apache.chemistry.opencmis.client.bindings.spi.CmisSpi;
 import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+import org.apache.chemistry.opencmis.client.bindings.spi.CmisSpi;
+import org.apache.chemistry.opencmis.client.bindings.spi.SessionAwareAuthenticationProvider;
 import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.BindingsObjectFactoryImpl;
 import org.apache.chemistry.opencmis.commons.spi.AclService;
@@ -68,7 +68,7 @@ public class CmisBindingImpl implements 
      * @param authenticationProvider
      *            an authentication provider instance
      */
-    public CmisBindingImpl(Map<String, String> sessionParameters, AbstractAuthenticationProvider
authenticationProvider) {
+    public CmisBindingImpl(Map<String, String> sessionParameters, AuthenticationProvider
authenticationProvider) {
         // some checks first
         if (sessionParameters == null) {
             throw new IllegalArgumentException("Session parameters must be set!");
@@ -95,18 +95,24 @@ public class CmisBindingImpl implements 
                     throw new IllegalArgumentException("Could not load authentication provider:
" + e, e);
                 }
 
-                if (!(authProviderObj instanceof AbstractAuthenticationProvider)) {
+                if (!(authProviderObj instanceof AuthenticationProvider)) {
                     throw new IllegalArgumentException(
-                            "Authentication provider does not extend AbstractAuthenticationProvider!");
+                            "Authentication provider does not implement AuthenticationProvider!");
                 }
 
-                session.put(CmisBindingsHelper.AUTHENTICATION_PROVIDER_OBJECT,
-                        (AbstractAuthenticationProvider) authProviderObj);
-                ((AbstractAuthenticationProvider) authProviderObj).setSession(session);
+                session.put(CmisBindingsHelper.AUTHENTICATION_PROVIDER_OBJECT, (AuthenticationProvider)
authProviderObj);
+
+                if (authProviderObj instanceof SessionAwareAuthenticationProvider) {
+                    ((SessionAwareAuthenticationProvider) authProviderObj).setSession(session);
+                }
             }
         } else {
             session.put(CmisBindingsHelper.AUTHENTICATION_PROVIDER_OBJECT, authenticationProvider);
-            authenticationProvider.setSession(session);
+
+            if (authenticationProvider instanceof SessionAwareAuthenticationProvider) {
+                ((SessionAwareAuthenticationProvider) authenticationProvider).setSession(session);
+            }
+
         }
 
         // set up caches

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.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/impl/CmisBindingsHelper.java?rev=1133473&r1=1133472&r2=1133473&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.java
Wed Jun  8 17:24:31 2011
@@ -20,12 +20,12 @@ package org.apache.chemistry.opencmis.cl
 
 import java.lang.reflect.Constructor;
 
-import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider;
 import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
 import org.apache.chemistry.opencmis.client.bindings.spi.CmisSpi;
 import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 
 /**
  * A collection of static methods that are used in multiple places within the
@@ -93,8 +93,8 @@ public final class CmisBindingsHelper {
      * Returns the authentication provider from the session or <code>null</code>
      * if no authentication provider is set.
      */
-    public static AbstractAuthenticationProvider getAuthenticationProvider(BindingSession
session) {
-        return (AbstractAuthenticationProvider) session.get(AUTHENTICATION_PROVIDER_OBJECT);
+    public static AuthenticationProvider getAuthenticationProvider(BindingSession session)
{
+        return (AuthenticationProvider) session.get(AUTHENTICATION_PROVIDER_OBJECT);
     }
 
     /**

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/AbstractAuthenticationProvider.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/AbstractAuthenticationProvider.java?rev=1133473&r1=1133472&r2=1133473&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/AbstractAuthenticationProvider.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/AbstractAuthenticationProvider.java
Wed Jun  8 17:24:31 2011
@@ -18,18 +18,16 @@
  */
 package org.apache.chemistry.opencmis.client.bindings.spi;
 
-import java.io.Serializable;
 import java.util.List;
 import java.util.Map;
 
 import org.apache.chemistry.opencmis.commons.SessionParameter;
-import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 import org.w3c.dom.Element;
 
 /**
  * Authentication provider class.
  */
-public abstract class AbstractAuthenticationProvider implements AuthenticationProvider, Serializable
{
+public abstract class AbstractAuthenticationProvider implements SessionAwareAuthenticationProvider
{
 
     private static final long serialVersionUID = 1L;
 

Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/SessionAwareAuthenticationProvider.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/SessionAwareAuthenticationProvider.java?rev=1133473&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/SessionAwareAuthenticationProvider.java
(added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/SessionAwareAuthenticationProvider.java
Wed Jun  8 17:24:31 2011
@@ -0,0 +1,33 @@
+/*
+ * 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;
+
+import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
+
+/**
+ * Authentication provider implementing this interface get the binding session
+ * injected.
+ */
+public interface SessionAwareAuthenticationProvider extends AuthenticationProvider {
+
+    /**
+     * Sets the binding session.
+     */
+    void setSession(BindingSession session);
+}

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/SessionAwareAuthenticationProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

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=1133473&r1=1133472&r2=1133473&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
Wed Jun  8 17:24:31 2011
@@ -21,10 +21,10 @@ package org.apache.chemistry.opencmis.cl
 import java.util.Map;
 
 import org.apache.chemistry.opencmis.client.bindings.CmisBindingFactory;
-import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider;
 import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.enums.BindingType;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 import org.apache.chemistry.opencmis.commons.spi.CmisBinding;
 
 /**
@@ -39,7 +39,7 @@ public class CmisBindingHelper {
      * Creates a {@link CmisBinding} object.
      */
     public static CmisBinding createBinding(Map<String, String> parameters,
-            AbstractAuthenticationProvider authenticationProvider) {
+            AuthenticationProvider authenticationProvider) {
         if (parameters == null || parameters.isEmpty()) {
             throw new CmisRuntimeException("Session parameter not set!");
         }
@@ -68,7 +68,7 @@ public class CmisBindingHelper {
      * Creates a binding with custom parameters.
      */
     private static CmisBinding createCustomBinding(Map<String, String> parameters,
-            AbstractAuthenticationProvider authenticationProvider) {
+            AuthenticationProvider authenticationProvider) {
         CmisBindingFactory factory = CmisBindingFactory.newInstance();
         CmisBinding binding = factory.createCmisBinding(parameters, authenticationProvider);
 
@@ -79,7 +79,7 @@ public class CmisBindingHelper {
      * Creates a Web Services binding.
      */
     private static CmisBinding createWebServiceBinding(Map<String, String> parameters,
-            AbstractAuthenticationProvider authenticationProvider) {
+            AuthenticationProvider authenticationProvider) {
         CmisBindingFactory factory = CmisBindingFactory.newInstance();
         CmisBinding binding = factory.createCmisWebServicesBinding(parameters, authenticationProvider);
 
@@ -90,7 +90,7 @@ public class CmisBindingHelper {
      * Creates an AtomPub binding.
      */
     private static CmisBinding createAtomPubBinding(Map<String, String> parameters,
-            AbstractAuthenticationProvider authenticationProvider) {
+            AuthenticationProvider authenticationProvider) {
         CmisBindingFactory factory = CmisBindingFactory.newInstance();
         CmisBinding binding = factory.createCmisAtomPubBinding(parameters, authenticationProvider);
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.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/SessionFactoryImpl.java?rev=1133473&r1=1133472&r2=1133473&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionFactoryImpl.java
Wed Jun  8 17:24:31 2011
@@ -26,12 +26,12 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.client.api.Repository;
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.client.api.SessionFactory;
-import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider;
 import org.apache.chemistry.opencmis.client.runtime.cache.Cache;
 import org.apache.chemistry.opencmis.client.runtime.repository.RepositoryImpl;
 import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
+import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 import org.apache.chemistry.opencmis.commons.spi.CmisBinding;
 
 /**
@@ -56,7 +56,7 @@ public class SessionFactoryImpl implemen
     protected SessionFactoryImpl() {
     }
 
-    public static SessionFactory newInstance() {
+    public static SessionFactoryImpl newInstance() {
         return new SessionFactoryImpl();
     }
 
@@ -87,7 +87,7 @@ public class SessionFactoryImpl implemen
      * @see SessionParameter
      */
     public Session createSession(Map<String, String> parameters, ObjectFactory objectFactory,
-            AbstractAuthenticationProvider authenticationProvider, Cache cache) {
+            AuthenticationProvider authenticationProvider, Cache cache) {
         SessionImpl session = new SessionImpl(parameters, objectFactory, authenticationProvider,
cache);
         session.connect();
 
@@ -100,12 +100,12 @@ public class SessionFactoryImpl implemen
 
     /**
      * Returns all repositories that are available at the endpoint. See
-     * {@link #createSession(Map, ObjectFactory, AbstractAuthenticationProvider, Cache)}
+     * {@link #createSession(Map, ObjectFactory, AuthenticationProvider, Cache)}
      * for parameter details. The parameter
      * {@code SessionParameter.REPOSITORY_ID} should not be set.
      */
     public List<Repository> getRepositories(Map<String, String> parameters, ObjectFactory
objectFactory,
-            AbstractAuthenticationProvider authenticationProvider, Cache cache) {
+            AuthenticationProvider authenticationProvider, Cache cache) {
         CmisBinding binding = CmisBindingHelper.createBinding(parameters, authenticationProvider);
 
         List<RepositoryInfo> repositoryInfos = binding.getRepositoryService().getRepositoryInfos(null);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.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/SessionImpl.java?rev=1133473&r1=1133472&r2=1133473&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
Wed Jun  8 17:24:31 2011
@@ -44,7 +44,6 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.client.api.Relationship;
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.client.api.Tree;
-import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider;
 import org.apache.chemistry.opencmis.client.runtime.cache.Cache;
 import org.apache.chemistry.opencmis.client.runtime.cache.CacheImpl;
 import org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl;
@@ -68,6 +67,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.enums.Updatability;
 import org.apache.chemistry.opencmis.commons.enums.VersioningState;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 import org.apache.chemistry.opencmis.commons.spi.CmisBinding;
 import org.apache.chemistry.opencmis.commons.spi.DiscoveryService;
 import org.apache.chemistry.opencmis.commons.spi.Holder;
@@ -121,7 +121,7 @@ public class SessionImpl implements Sess
     /*
      * Authentication provider (serializable)
      */
-    private final AbstractAuthenticationProvider authenticationProvider;
+    private final AuthenticationProvider authenticationProvider;
 
     /*
      * Object cache (serializable)
@@ -143,7 +143,7 @@ public class SessionImpl implements Sess
      * Constructor.
      */
     public SessionImpl(Map<String, String> parameters, ObjectFactory objectFactory,
-            AbstractAuthenticationProvider authenticationProvider, Cache cache) {
+            AuthenticationProvider authenticationProvider, Cache cache) {
         if (parameters == null) {
             throw new IllegalArgumentException("No parameters provided!");
         }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.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/repository/RepositoryImpl.java?rev=1133473&r1=1133472&r2=1133473&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/RepositoryImpl.java
Wed Jun  8 17:24:31 2011
@@ -24,12 +24,12 @@ import java.util.Map;
 import org.apache.chemistry.opencmis.client.api.ObjectFactory;
 import org.apache.chemistry.opencmis.client.api.Repository;
 import org.apache.chemistry.opencmis.client.api.Session;
-import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider;
 import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl;
 import org.apache.chemistry.opencmis.client.runtime.cache.Cache;
 import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.RepositoryInfoImpl;
+import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 
 public class RepositoryImpl extends RepositoryInfoImpl implements Repository {
 
@@ -38,14 +38,14 @@ public class RepositoryImpl extends Repo
     private final Map<String, String> parameters;
     private final SessionFactoryImpl sessionFactory;
     private final ObjectFactory objectFactory;
-    private final AbstractAuthenticationProvider authenticationProvider;
+    private final AuthenticationProvider authenticationProvider;
     private final Cache cache;
 
     /**
      * Constructor.
      */
     public RepositoryImpl(RepositoryInfo data, Map<String, String> parameters, SessionFactoryImpl
sessionFactory,
-            ObjectFactory objectFactory, AbstractAuthenticationProvider authenticationProvider,
Cache cache) {
+            ObjectFactory objectFactory, AuthenticationProvider authenticationProvider, Cache
cache) {
         super(data);
 
         this.parameters = new HashMap<String, String>(parameters);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/AuthenticationProvider.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/spi/AuthenticationProvider.java?rev=1133473&r1=1133472&r2=1133473&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/AuthenticationProvider.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/AuthenticationProvider.java
Wed Jun  8 17:24:31 2011
@@ -18,6 +18,7 @@
  */
 package org.apache.chemistry.opencmis.commons.spi;
 
+import java.io.Serializable;
 import java.util.List;
 import java.util.Map;
 
@@ -26,7 +27,7 @@ import org.w3c.dom.Element;
 /**
  * Authentication provider interface.
  */
-public interface AuthenticationProvider {
+public interface AuthenticationProvider extends Serializable {
     /**
      * Returns a set of HTTP headers (key-value pairs) that should be added to a
      * HTTP call. This will be called by the AtomPub and the Web Services



Mime
View raw message