chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1729105 - /chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java
Date Mon, 08 Feb 2016 09:03:05 GMT
Author: fmui
Date: Mon Feb  8 09:03:05 2016
New Revision: 1729105

URL: http://svn.apache.org/viewvc?rev=1729105&view=rev
Log:
CMIS-969: fixed getPath (in bridge + AtomPub scenarios)

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java?rev=1729105&r1=1729104&r2=1729105&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java
Mon Feb  8 09:03:05 2016
@@ -91,13 +91,21 @@ public abstract class AbstractFilableCmi
     public List<String> getPaths() {
         String objectId = getObjectId();
 
+        // determine filter
+        String filter;
+
         ObjectType folderType = getSession().getTypeDefinition(BaseTypeId.CMIS_FOLDER.value());
-        PropertyDefinition<?> propDef = folderType.getPropertyDefinitions().get(PropertyIds.PATH);
-        String pathQueryName = propDef == null ? null : propDef.getQueryName();
+        PropertyDefinition<?> idPropDef = folderType.getPropertyDefinitions().get(PropertyIds.OBJECT_ID);
+        PropertyDefinition<?> pathPropDef = folderType.getPropertyDefinitions().get(PropertyIds.PATH);
+        if (idPropDef != null && pathPropDef != null) {
+            filter = idPropDef.getQueryName() + "," + pathPropDef.getQueryName();
+        } else {
+            filter = "*";
+        }
 
         // get object paths of the parent folders
         List<ObjectParentData> bindingParents = getBinding().getNavigationService().getObjectParents(getRepositoryId(),
-                objectId, pathQueryName, false, IncludeRelationships.NONE, null, true, null);
+                objectId, filter, false, IncludeRelationships.NONE, null, true, null);
 
         List<String> paths = new ArrayList<String>();
 



Mime
View raw message