chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r955962 - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory: server/InMemoryObjectServiceImpl.java types/DocumentTypeCreationHelper.java
Date Fri, 18 Jun 2010 12:10:04 GMT
Author: jens
Date: Fri Jun 18 12:10:03 2010
New Revision: 955962

URL: http://svn.apache.org/viewvc?rev=955962&view=rev
Log:
CMIS-220:
Reject an empty or null value name when updating properties
set checkincomment to be read-ony in type definitions

Modified:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java?rev=955962&r1=955961&r2=955962&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
Fri Jun 18 12:10:03 2010
@@ -597,6 +597,9 @@ public class InMemoryObjectServiceImpl e
             List<Folder> parents = ((Filing) so).getParents();
             if (so instanceof Folder && parents.isEmpty())
                 throw new CmisConstraintException("updateProperties failed, you cannot rename
the root folder");
+            if (newName == null || newName.equals(""))
+                throw new CmisConstraintException("updateProperties failed, name must not
be empty.");
+                
             so.rename((String) pd.getFirstValue()); // note: this does persist
             hasUpdatedName = true;
         }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java?rev=955962&r1=955961&r2=955962&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
Fri Jun 18 12:10:03 2010
@@ -173,7 +173,7 @@ public class DocumentTypeCreationHelper 
 
         propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CHECKIN_COMMENT,
                 "CMIS Checkin Comment Property");
-        propId.setUpdatability(Updatability.READONLY); // Note: spec says
+        propS.setUpdatability(Updatability.READONLY); // Note: spec says
         // read-only, because
         // not set as property
         propertyDefinitions.put(propS.getId(), propS);



Mime
View raw message