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 2014/06/25 18:16:36 UTC

svn commit: r1605467 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java

Author: fmui
Date: Wed Jun 25 16:16:35 2014
New Revision: 1605467

URL: http://svn.apache.org/r1605467
Log:
AtomPub server: set the repository ID in the call context for getRepositoryInfo calls

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java?rev=1605467&r1=1605466&r2=1605467&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java Wed Jun 25 16:16:35 2014
@@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletRes
 import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
 import org.apache.chemistry.opencmis.commons.impl.ClassLoaderUtil;
+import org.apache.chemistry.opencmis.commons.impl.Constants;
 import org.apache.chemistry.opencmis.commons.server.CallContext;
 import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
 import org.apache.chemistry.opencmis.server.impl.CallContextImpl;
@@ -129,6 +130,12 @@ public abstract class AbstractCmisHttpSe
             repositoryId = pathFragments[0];
         }
 
+        if (repositoryId == null && CallContext.BINDING_ATOMPUB.equals(binding)) {
+            // it's a getRepositories or getRepositoryInfo call
+            // getRepositoryInfo has the repository ID in the query parameters
+            repositoryId = HttpUtils.getStringParameter(request, Constants.PARAM_REPOSITORY_ID);
+        }
+
         CallContextImpl context = null;
 
         if (CallContext.BINDING_BROWSER.equals(binding)) {