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/09 00:38:48 UTC
svn commit: r1199535 - in /chemistry/opencmis/trunk:
chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/
chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apa...
Author: fmui
Date: Tue Nov 8 23:38:48 2011
New Revision: 1199535
URL: http://svn.apache.org/viewvc?rev=1199535&view=rev
Log:
more browser binding code
Modified:
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/BrowserBindingUtils.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/DiscoveryService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RelationshipService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/json/JSONConverter.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/HttpUtils.java
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=1199535&r1=1199534&r2=1199535&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 Tue Nov 8 23:38:48 2011
@@ -129,6 +129,7 @@ public final class Constants {
public static final String PARAM_ROPERTY_DEFINITIONS = "includePropertyDefinitions";
public static final String PARAM_SKIP_COUNT = "skipCount";
public static final String PARAM_SOURCE_FOLDER_ID = "sourceFolderId";
+ public static final String PARAM_TARGET_FOLDER_ID = "targetFolderId";
public static final String PARAM_STREAM_ID = "streamId";
public static final String PARAM_SUB_RELATIONSHIP_TYPES = "includeSubRelationshipTypes";
public static final String PARAM_TYPE_ID = "typeId";
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.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/BrowserBindingUtils.java?rev=1199535&r1=1199534&r2=1199535&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.java Tue Nov 8 23:38:48 2011
@@ -90,6 +90,7 @@ public class BrowserBindingUtils {
public static final String SELECTOR_QUERY = "query";
public static final String SELECTOR_VERSIONS = "versions";
public static final String SELECTOR_RELATIONSHIPS = "relationships";
+ public static final String SELECTOR_CHECKEDOUT = "checkedout";
public static final String CMISACTION_CREATE_DOCUMENT = "createDocument";
public static final String CMISACTION_CREATE_FOLDER = "createFolder";
@@ -99,6 +100,7 @@ public class BrowserBindingUtils {
public static final String CMISACTION_SET_CONTENT = "setContent";
public static final String CMISACTION_DELETE = "delete";
public static final String CMISACTION_DELETE_TREE = "deleteTree";
+ public static final String CMISACTION_MOVE = "move";
public static final String CMISACTION_QUERY = "query";
public static final String CMISACTION_CHECK_OUT = "checkOut";
public static final String CMISACTION_CANCEL_CHECK_OUT = "cancelCheckOut";
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.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/CmisBrowserBindingServlet.java?rev=1199535&r1=1199534&r2=1199535&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java Tue Nov 8 23:38:48 2011
@@ -27,6 +27,7 @@ import static org.apache.chemistry.openc
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CMISACTION_DELETE;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CMISACTION_DELETE_CONTENT;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CMISACTION_DELETE_TREE;
+import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CMISACTION_MOVE;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CMISACTION_QUERY;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CMISACTION_SET_CONTENT;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CONTEXT_BASETYPE_ID;
@@ -37,6 +38,7 @@ import static org.apache.chemistry.openc
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.JSON_MIME_TYPE;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.PARAM_SELECTOR;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.PARAM_SUPPRESS_RESPONSE_CODES;
+import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.SELECTOR_CHECKEDOUT;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.SELECTOR_CHILDREN;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.SELECTOR_CONTENT;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.SELECTOR_DESCENDANTS;
@@ -147,6 +149,8 @@ public class CmisBrowserBindingServlet e
repositoryDispatcher.addResource(CMISACTION_QUERY, METHOD_POST, DiscoveryService.class, "query");
repositoryDispatcher.addResource(CMISACTION_CREATE_DOCUMENT, METHOD_POST, ObjectService.class,
"createDocument");
+ repositoryDispatcher.addResource(SELECTOR_CHECKEDOUT, METHOD_GET, RelationshipService.class,
+ "getCheckedOutDocs");
rootDispatcher.addResource(SELECTOR_OBJECT, METHOD_GET, ObjectService.class, "getObject");
rootDispatcher.addResource(SELECTOR_PROPERTIES, METHOD_GET, ObjectService.class, "getProperties");
@@ -160,6 +164,7 @@ public class CmisBrowserBindingServlet e
rootDispatcher.addResource(SELECTOR_VERSIONS, METHOD_GET, VersioningService.class, "getAllVersions");
rootDispatcher.addResource(SELECTOR_RELATIONSHIPS, METHOD_GET, RelationshipService.class,
"getObjectRelationships");
+ rootDispatcher.addResource(SELECTOR_CHECKEDOUT, METHOD_GET, RelationshipService.class, "getCheckedOutDocs");
rootDispatcher.addResource(CMISACTION_CREATE_DOCUMENT, METHOD_POST, ObjectService.class, "createDocument");
rootDispatcher.addResource(CMISACTION_CREATE_FOLDER, METHOD_POST, ObjectService.class, "createFolder");
@@ -168,6 +173,7 @@ public class CmisBrowserBindingServlet e
"deleteContentStream");
rootDispatcher.addResource(CMISACTION_DELETE, METHOD_POST, ObjectService.class, "deleteObject");
rootDispatcher.addResource(CMISACTION_DELETE_TREE, METHOD_POST, ObjectService.class, "deleteTree");
+ rootDispatcher.addResource(CMISACTION_MOVE, METHOD_POST, ObjectService.class, "moveObject");
rootDispatcher.addResource(CMISACTION_CHECK_OUT, METHOD_POST, VersioningService.class, "checkOut");
rootDispatcher.addResource(CMISACTION_CANCEL_CHECK_OUT, METHOD_POST, VersioningService.class,
"cancelCheckOut");
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=1199535&r1=1199534&r2=1199535&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 Tue Nov 8 23:38:48 2011
@@ -18,6 +18,14 @@
*/
package org.apache.chemistry.opencmis.server.impl.browser;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_ALLOWABLE_ACTIONS;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_FILTER;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_MAX_ITEMS;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_ORDER_BY;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_RELATIONSHIPS;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_RENDITION_FILTER;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_SKIP_COUNT;
+import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CONTEXT_OBJECT_ID;
import static org.apache.chemistry.opencmis.server.shared.HttpUtils.getBigIntegerParameter;
import static org.apache.chemistry.opencmis.server.shared.HttpUtils.getBooleanParameter;
import static org.apache.chemistry.opencmis.server.shared.HttpUtils.getEnumParameter;
@@ -45,6 +53,37 @@ public class DiscoveryService {
private DiscoveryService() {
}
+ /**
+ * getCheckedOutDocs.
+ */
+ public static void getCheckedOutDocs(CallContext context, CmisService service, String repositoryId,
+ HttpServletRequest request, HttpServletResponse response) throws Exception {
+ // get parameters
+ String folderId = (String) context.get(CONTEXT_OBJECT_ID);
+ String filter = getStringParameter(request, PARAM_FILTER);
+ String orderBy = getStringParameter(request, PARAM_ORDER_BY);
+ Boolean includeAllowableActions = getBooleanParameter(request, PARAM_ALLOWABLE_ACTIONS);
+ IncludeRelationships includeRelationships = getEnumParameter(request, PARAM_RELATIONSHIPS,
+ IncludeRelationships.class);
+ String renditionFilter = getStringParameter(request, PARAM_RENDITION_FILTER);
+ BigInteger maxItems = getBigIntegerParameter(request, PARAM_MAX_ITEMS);
+ BigInteger skipCount = getBigIntegerParameter(request, PARAM_SKIP_COUNT);
+
+ // execute
+ ObjectList checkedout = service.getCheckedOutDocs(repositoryId, folderId, filter, orderBy,
+ includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount, null);
+
+ if (checkedout == null) {
+ throw new CmisRuntimeException("Checked out list is null!");
+ }
+
+ TypeCache typeCache = new TypeCache(repositoryId, service);
+ JSONObject jsonCheckedOut = JSONConverter.convert(checkedout, typeCache);
+
+ response.setStatus(HttpServletResponse.SC_OK);
+ BrowserBindingUtils.writeJSON(jsonCheckedOut, request, response);
+ }
+
public static void query(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
// get parameters
@@ -65,7 +104,8 @@ public class DiscoveryService {
throw new CmisRuntimeException("Results are null!");
}
- JSONObject jsonResults = JSONConverter.convert(results);
+ TypeCache typeCache = new TypeCache(repositoryId, service);
+ JSONObject jsonResults = JSONConverter.convert(results, typeCache);
response.setStatus(HttpServletResponse.SC_OK);
BrowserBindingUtils.writeJSON(jsonResults, request, response);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.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/ObjectService.java?rev=1199535&r1=1199534&r2=1199535&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java Tue Nov 8 23:38:48 2011
@@ -26,7 +26,9 @@ import static org.apache.chemistry.openc
import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_RELATIONSHIPS;
import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_RENDITION_FILTER;
import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_RETURN_VERSION;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_SOURCE_FOLDER_ID;
import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_STREAM_ID;
+import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_TARGET_FOLDER_ID;
import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_VERSIONIG_STATE;
import static org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils.RESOURCE_CONTENT;
import static org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils.compileBaseUrl;
@@ -440,4 +442,38 @@ public final class ObjectService {
writeJSON(jsonObject, request, response);
}
+
+ /**
+ * moveObject.
+ */
+ public static void moveObject(CallContext context, CmisService service, String repositoryId,
+ HttpServletRequest request, HttpServletResponse response) throws Exception {
+ // get parameters
+ String objectId = (String) context.get(CONTEXT_OBJECT_ID);
+ String targetFolderId = getStringParameter(request, PARAM_TARGET_FOLDER_ID);
+ String sourceFolderId = getStringParameter(request, PARAM_SOURCE_FOLDER_ID);
+
+ // execute
+ Holder<String> objectIdHolder = new Holder<String>(objectId);
+ service.moveObject(repositoryId, objectIdHolder, targetFolderId, sourceFolderId, null);
+
+ String newObjectId = (objectIdHolder.getValue() == null ? objectId : objectIdHolder.getValue());
+
+ ObjectData object = getSimpleObject(service, repositoryId, newObjectId);
+ if (object == null) {
+ throw new CmisRuntimeException("Object is null!");
+ }
+
+ // set headers
+ String location = compileUrl(compileBaseUrl(request, repositoryId), RESOURCE_CONTENT, newObjectId);
+
+ response.setStatus(HttpServletResponse.SC_CREATED);
+ response.setHeader("Location", location);
+
+ // return object
+ TypeCache typeCache = new TypeCache(repositoryId, service);
+ JSONObject jsonObject = JSONConverter.convert(object, typeCache);
+
+ writeJSON(jsonObject, request, response);
+ }
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RelationshipService.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/RelationshipService.java?rev=1199535&r1=1199534&r2=1199535&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RelationshipService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RelationshipService.java Tue Nov 8 23:38:48 2011
@@ -71,7 +71,8 @@ public class RelationshipService {
throw new CmisRuntimeException("Relationships are null!");
}
- JSONObject jsonChildren = JSONConverter.convert(relationships);
+ TypeCache typeCache = new TypeCache(repositoryId, service);
+ JSONObject jsonChildren = JSONConverter.convert(relationships, typeCache);
response.setStatus(HttpServletResponse.SC_OK);
BrowserBindingUtils.writeJSON(jsonChildren, request, response);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.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/VersioningService.java?rev=1199535&r1=1199534&r2=1199535&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.java Tue Nov 8 23:38:48 2011
@@ -22,6 +22,9 @@ import static org.apache.chemistry.openc
import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_CHECKIN_COMMENT;
import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_FILTER;
import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_MAJOR;
+import static org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils.RESOURCE_CONTENT;
+import static org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils.compileBaseUrl;
+import static org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils.compileUrl;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.CONTEXT_OBJECT_ID;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.PARAM_TRANSACTION;
import static org.apache.chemistry.opencmis.server.impl.browser.BrowserBindingUtils.createAddAcl;
@@ -81,6 +84,12 @@ public class VersioningService {
TypeCache typeCache = new TypeCache(repositoryId, service);
JSONObject jsonObject = JSONConverter.convert(object, typeCache);
+ // set headers
+ String location = compileUrl(compileBaseUrl(request, repositoryId), RESOURCE_CONTENT, object.getId());
+
+ response.setStatus(HttpServletResponse.SC_CREATED);
+ response.setHeader("Location", location);
+
response.setStatus(HttpServletResponse.SC_CREATED);
setCookie(request, response, repositoryId, transaction,
createCookieValue(HttpServletResponse.SC_CREATED, object.getId(), null, null));
@@ -133,7 +142,11 @@ public class VersioningService {
// return object
JSONObject jsonObject = JSONConverter.convert(object, typeCache);
+ String location = compileUrl(compileBaseUrl(request, repositoryId), RESOURCE_CONTENT, object.getId());
+
response.setStatus(HttpServletResponse.SC_CREATED);
+ response.setHeader("Location", location);
+
setCookie(request, response, repositoryId, transaction,
createCookieValue(HttpServletResponse.SC_CREATED, object.getId(), null, null));
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/json/JSONConverter.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/json/JSONConverter.java?rev=1199535&r1=1199534&r2=1199535&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/json/JSONConverter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/json/JSONConverter.java Tue Nov 8 23:38:48 2011
@@ -449,7 +449,7 @@ public class JSONConverter {
* Converts a query object list.
*/
@SuppressWarnings("unchecked")
- public static JSONObject convert(ObjectList list) {
+ public static JSONObject convert(ObjectList list, TypeCache typeCache) {
if (list == null) {
return null;
}
@@ -459,7 +459,7 @@ public class JSONConverter {
JSONArray objects = new JSONArray();
if (list.getObjects() != null) {
for (ObjectData object : list.getObjects()) {
- objects.add(convert(object, null));
+ objects.add(convert(object, typeCache));
}
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/HttpUtils.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/HttpUtils.java?rev=1199535&r1=1199534&r2=1199535&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/HttpUtils.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/HttpUtils.java Tue Nov 8 23:38:48 2011
@@ -51,8 +51,7 @@ public class HttpUtils {
repositoryId = pathFragments[0];
}
- CallContextImpl context = new CallContextImpl(binding, repositoryId,
- CallContext.BINDING_ATOMPUB.equals(binding));
+ CallContextImpl context = new CallContextImpl(binding, repositoryId, true);
// call call context handler
if (callContextHandler != null) {