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 2012/07/12 13:34:02 UTC
svn commit: r1360635 - in /chemistry/opencmis/trunk:
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/
chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/ma...
Author: fmui
Date: Thu Jul 12 11:34:01 2012
New Revision: 1360635
URL: http://svn.apache.org/viewvc?rev=1360635&view=rev
Log:
Browser Binding: fixed query statement
Modified:
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-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/DiscoveryService.java
Modified: 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=1360635&r1=1360634&r2=1360635&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/DiscoveryServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/DiscoveryServiceImpl.java Thu Jul 12 11:34:01 2012
@@ -54,7 +54,7 @@ public class DiscoveryServiceImpl extend
// prepare form data
final FormDataWriter formData = new FormDataWriter(Constants.CMISACTION_QUERY);
- formData.addParameter(Constants.PARAM_Q, statement);
+ formData.addParameter(Constants.PARAM_STATEMENT, statement);
formData.addParameter(Constants.PARAM_SEARCH_ALL_VERSIONS, searchAllVersions);
formData.addParameter(Constants.PARAM_ALLOWABLE_ACTIONS, includeAllowableActions);
formData.addParameter(Constants.PARAM_RELATIONSHIPS, includeRelationships);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java?rev=1360635&r1=1360634&r2=1360635&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java Thu Jul 12 11:34:01 2012
@@ -198,6 +198,7 @@ public final class Constants {
public static final String PARAM_VERSION_SERIES_ID = "versionSeries";
public static final String PARAM_VERSIONIG_STATE = "versioningState";
public static final String PARAM_Q = "q";
+ public static final String PARAM_STATEMENT = "statement";
public static final String PARAM_SEARCH_ALL_VERSIONS = "searchAllVersions";
public static final String PARAM_ACL_PROPAGATION = "ACLPropagation";
public static final String PARAM_SOURCE_ID = "sourceId";
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/DiscoveryService.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/impl/browser/DiscoveryService.java?rev=1360635&r1=1360634&r2=1360635&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/DiscoveryService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/DiscoveryService.java Thu Jul 12 11:34:01 2012
@@ -60,7 +60,10 @@ public class DiscoveryService {
public static void query(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
// get parameters
- String statement = getStringParameter(request, Constants.PARAM_Q);
+ String statement = getStringParameter(request, Constants.PARAM_STATEMENT);
+ if(statement == null || statement.length() == 0) {
+ statement = getStringParameter(request, Constants.PARAM_Q);
+ }
Boolean searchAllVersions = getBooleanParameter(request, Constants.PARAM_SEARCH_ALL_VERSIONS);
Boolean includeAllowableActions = getBooleanParameter(request, Constants.PARAM_ALLOWABLE_ACTIONS);
IncludeRelationships includeRelationships = getEnumParameter(request, Constants.PARAM_RELATIONSHIPS,