chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1489853 - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory: server/InMemoryNavigationServiceImpl.java storedobj/impl/FolderImpl.java
Date Wed, 05 Jun 2013 13:26:47 GMT
Author: jens
Date: Wed Jun  5 13:26:47 2013
New Revision: 1489853

URL: http://svn.apache.org/r1489853
Log:
InMemory fix bugs: getObjectParents deliver path segments only if parameter set, do not set
AllowedChildObjectTypeIds to null instead of *

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java?rev=1489853&r1=1489852&r2=1489853&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java
Wed Jun  5 13:26:47 2013
@@ -252,7 +252,7 @@ public class InMemoryNavigationServiceIm
 
         result = getObjectParentsIntern(repositoryId, spo, filter, 
         		context.isObjectInfoRequired() ? objectInfos : null, includeAllowableActions, includeRelationships,
-				renditionFilter, context.getUsername());
+				renditionFilter, includeRelativePathSegment, context.getUsername());
 
         // To be able to provide all Atom links in the response we need
         // additional information:
@@ -365,9 +365,11 @@ public class InMemoryNavigationServiceIm
         return childrenOfFolderId;
     }
 
-    private List<ObjectParentData> getObjectParentsIntern(String repositoryId, Filing
sop, String filter,
-            ObjectInfoHandler objectInfos, Boolean includeAllowableActions, 
-            IncludeRelationships includeRelationships, String renditionFilter, String user)
{
+	private List<ObjectParentData> getObjectParentsIntern(String repositoryId,
+			Filing sop, String filter, ObjectInfoHandler objectInfos,
+			Boolean includeAllowableActions,
+			IncludeRelationships includeRelationships, String renditionFilter,
+			Boolean includeRelativePathSegment, String user) {
 
         List<ObjectParentData> result = null;
         if (sop instanceof SingleFiling) {
@@ -380,7 +382,8 @@ public class InMemoryNavigationServiceIm
                 int beginIndex = path.lastIndexOf(Filing.PATH_SEPARATOR) + 1; 
                 //   Note: if not found results in 0
                 String relPathSeg = path.substring(beginIndex, path.length());
-                parentData.setRelativePathSegment(relPathSeg);
+                if (null != includeRelativePathSegment && includeRelativePathSegment)
+                	parentData.setRelativePathSegment(relPathSeg);
                 result = Collections.singletonList((ObjectParentData) parentData);
             } else {
                 result = Collections.emptyList();
@@ -397,7 +400,8 @@ public class InMemoryNavigationServiceIm
                             includeRelationships, renditionFilter, false, true, null);
 
                     parentData.setObject(objData);
-                    parentData.setRelativePathSegment(multiParentObj.getPathSegment());
+                    if (null != includeRelativePathSegment && includeRelativePathSegment)
+                    	parentData.setRelativePathSegment(multiParentObj.getPathSegment());
                     result.add(parentData);
                     if (objectInfos != null) {
                         ObjectInfoImpl objectInfo = new ObjectInfoImpl();

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java?rev=1489853&r1=1489852&r2=1489853&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java
Wed Jun  5 13:26:47 2013
@@ -205,7 +205,7 @@ public class FolderImpl extends Abstract
         }
 
         if (FilterParser.isContainedInFilter(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, requestedIds))
{
-            String allowedChildObjects = "*"; // TODO: not yet supported
+            String allowedChildObjects = null; // TODO: not yet supported
             properties.put(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, objFactory.createPropertyIdData(
                     PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, allowedChildObjects));
         }



Mime
View raw message