You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fg...@apache.org on 2010/09/01 16:52:35 UTC

svn commit: r991557 - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl: ./ atompub/ webservices/

Author: fguillaume
Date: Wed Sep  1 14:52:34 2010
New Revision: 991557

URL: http://svn.apache.org/viewvc?rev=991557&view=rev
Log:
CMIS-248: use CmisServiceFactory instead of AbstractServiceFactory

Modified:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java?rev=991557&r1=991556&r2=991557&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java Wed Sep  1 14:52:34 2010
@@ -28,7 +28,7 @@ import java.util.Properties;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 
-import org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -46,7 +46,7 @@ public class CmisRepositoryContextListen
 
     public void contextInitialized(ServletContextEvent sce) {
         // create services factory
-        AbstractServiceFactory factory = createServiceFactory(CONFIG_FILENAME);
+        CmisServiceFactory factory = createServiceFactory(CONFIG_FILENAME);
 
         // set the services factory into the servlet context
         sce.getServletContext().setAttribute(SERVICES_FACTORY, factory);
@@ -54,7 +54,7 @@ public class CmisRepositoryContextListen
 
     public void contextDestroyed(ServletContextEvent sce) {
         // destroy services factory
-        AbstractServiceFactory factory = (AbstractServiceFactory) sce.getServletContext()
+        CmisServiceFactory factory = (CmisServiceFactory) sce.getServletContext()
                 .getAttribute(SERVICES_FACTORY);
         if (factory != null) {
             factory.destroy();
@@ -64,7 +64,7 @@ public class CmisRepositoryContextListen
     /**
      * Creates a service factory.
      */
-    private AbstractServiceFactory createServiceFactory(String filename) {
+    private CmisServiceFactory createServiceFactory(String filename) {
         // load properties
         InputStream stream = this.getClass().getResourceAsStream(filename);
 
@@ -97,11 +97,11 @@ public class CmisRepositoryContextListen
             return null;
         }
 
-        if (!(object instanceof AbstractServiceFactory)) {
-            log.warn("The provided class is not a sub class of AbstractServiceFactory!");
+        if (!(object instanceof CmisServiceFactory)) {
+            log.warn("The provided class is not an instance of CmisServiceFactory!");
         }
 
-        AbstractServiceFactory factory = (AbstractServiceFactory) object;
+        CmisServiceFactory factory = (CmisServiceFactory) object;
 
         // initialize factory instance
         Map<String, String> parameters = new HashMap<String, String>();

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java?rev=991557&r1=991556&r2=991557&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java Wed Sep  1 14:52:34 2010
@@ -42,9 +42,9 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.exceptions.CmisStreamNotSupportedException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisUpdateConflictException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisVersioningException;
-import org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory;
 import org.apache.chemistry.opencmis.commons.server.CallContext;
 import org.apache.chemistry.opencmis.commons.server.CmisService;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
 import org.apache.chemistry.opencmis.server.impl.CallContextImpl;
 import org.apache.chemistry.opencmis.server.impl.CmisRepositoryContextListener;
 import org.apache.commons.logging.Log;
@@ -185,7 +185,7 @@ public class CmisAtomPubServlet extends 
         CmisService service = null;
         try {
             // get services factory
-            AbstractServiceFactory factory = (AbstractServiceFactory) getServletContext().getAttribute(
+            CmisServiceFactory factory = (CmisServiceFactory) getServletContext().getAttribute(
                     CmisRepositoryContextListener.SERVICES_FACTORY);
 
             // get the service

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java?rev=991557&r1=991556&r2=991557&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java Wed Sep  1 14:52:34 2010
@@ -41,9 +41,9 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisException;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisFaultType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumServiceException;
-import org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory;
 import org.apache.chemistry.opencmis.commons.server.CallContext;
 import org.apache.chemistry.opencmis.commons.server.CmisService;
+import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
 import org.apache.chemistry.opencmis.server.impl.CallContextImpl;
 import org.apache.chemistry.opencmis.server.impl.CmisRepositoryContextListener;
 
@@ -57,11 +57,11 @@ public abstract class AbstractService {
     /**
      * Returns the services factory.
      */
-    protected AbstractServiceFactory getServiceFactory(WebServiceContext wsContext) {
+    protected CmisServiceFactory getServiceFactory(WebServiceContext wsContext) {
         ServletContext servletContext = (ServletContext) wsContext.getMessageContext().get(
                 MessageContext.SERVLET_CONTEXT);
 
-        return (AbstractServiceFactory) servletContext.getAttribute(CmisRepositoryContextListener.SERVICES_FACTORY);
+        return (CmisServiceFactory) servletContext.getAttribute(CmisRepositoryContextListener.SERVICES_FACTORY);
     }
 
     /**
@@ -86,7 +86,7 @@ public abstract class AbstractService {
      * Returns the {@link CmisService} object.
      */
     protected CmisService getService(WebServiceContext wsContext, String repositoryId) {
-        AbstractServiceFactory factory = getServiceFactory(wsContext);
+        CmisServiceFactory factory = getServiceFactory(wsContext);
         CallContext context = createContext(wsContext, repositoryId);
         return factory.getService(context);
     }