chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1222639 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
Date Fri, 23 Dec 2011 10:58:47 GMT
Author: jens
Date: Fri Dec 23 10:58:46 2011
New Revision: 1222639

URL: http://svn.apache.org/viewvc?rev=1222639&view=rev
Log:
correct allowable actions related to folders for unfiled documents

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.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/DataObjectCreator.java?rev=1222639&r1=1222638&r2=1222639&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
Fri Dec 23 10:58:46 2011
@@ -39,6 +39,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.ChangeEventInfoDataImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.PolicyIdListImpl;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Content;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Folder;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoredObject;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Version;
@@ -125,8 +126,10 @@ public class DataObjectCreator {
         }
 
         if (isDocument) {
-            set.add(Action.CAN_ADD_OBJECT_TO_FOLDER);
-            set.add(Action.CAN_REMOVE_OBJECT_FROM_FOLDER);
+            if (so instanceof Filing && ((Filing)so).hasParent()) {
+                set.add(Action.CAN_ADD_OBJECT_TO_FOLDER);
+                set.add(Action.CAN_REMOVE_OBJECT_FROM_FOLDER);
+            }
             if (isVersioned) {
                 if (canCheckIn)
                     set.add(Action.CAN_SET_CONTENT_STREAM);



Mime
View raw message