chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r800165 - in /incubator/chemistry/trunk/chemistry: chemistry-api/src/main/java/org/apache/chemistry/ chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/ chemistry-commons/src/main/java/org/apache/chemistry/impl/base/...
Date Mon, 03 Aug 2009 00:02:04 GMT
Author: fguillaume
Date: Mon Aug  3 00:02:04 2009
New Revision: 800165

URL: http://svn.apache.org/viewvc?rev=800165&view=rev
Log:
CMIS-44: remove cmis:PolicyName, make cmis:Name mandatory on all object types

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseObject.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java?rev=800165&r1=800164&r2=800165&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java
Mon Aug  3 00:02:04 2009
@@ -33,6 +33,8 @@
 
     String BASE_TYPE_ID = "cmis:BaseTypeId";
 
+    String NAME = "cmis:Name";
+
     String CREATED_BY = "cmis:CreatedBy";
 
     String CREATION_DATE = "cmis:CreationDate";
@@ -47,8 +49,6 @@
      * ----- Document -----
      */
 
-    String NAME = "cmis:Name";
-
     String IS_IMMUTABLE = "cmis:IsImmutable";
 
     String IS_LATEST_VERSION = "cmis:IsLatestVersion";
@@ -81,7 +81,6 @@
      * ----- Folder -----
      */
 
-    // NAME as well
     String PARENT_ID = "cmis:ParentId";
 
     String ALLOWED_CHILD_OBJECT_TYPE_IDS = "cmis:AllowedChildObjectTypeIds";
@@ -98,8 +97,6 @@
      * ----- Policy -----
      */
 
-    String POLICY_NAME = "cmis:PolicyName";
-
     String POLICY_TEXT = "cmis:PolicyText";
 
     /**

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java?rev=800165&r1=800164&r2=800165&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
Mon Aug  3 00:02:04 2009
@@ -222,12 +222,10 @@
             pdt = type.getPropertyDefinition("dc:title");
         }
         if (pdt == null) {
-            pdt = type.getPropertyDefinition(Property.NAME);
-        }
-        if (pdt != null) {
-            String title = entry.getTitle(); // Atom MUST
-            properties.put(pdt.getId(), title);
+            pdt = type.getPropertyDefinition(Property.NAME); // mandatory
         }
+        String title = entry.getTitle(); // Atom MUST
+        properties.put(pdt.getId(), title);
         // TODO summary
         // parse the date ourselves, as Abdera's AtomDate loses the timezone
         Calendar updated;

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseObject.java?rev=800165&r1=800164&r2=800165&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseObject.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseObject.java
Mon Aug  3 00:02:04 2009
@@ -145,6 +145,10 @@
         return getId(Property.BASE_TYPE_ID);
     }
 
+    public String getName() {
+        return getString(Property.NAME);
+    }
+
     public String getCreatedBy() {
         return getString(Property.CREATED_BY);
     }
@@ -165,10 +169,6 @@
         return getString(Property.CHANGE_TOKEN);
     }
 
-    public String getName() {
-        return getString(Property.NAME);
-    }
-
     public boolean isImmutable() {
         Boolean b = getBoolean(Property.IS_IMMUTABLE);
         return b == null ? false : b.booleanValue();

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java?rev=800165&r1=800164&r2=800165&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java
Mon Aug  3 00:02:04 2009
@@ -51,6 +51,11 @@
             false, null, false, true, null, Updatability.READ_ONLY, true, true,
             0, null, null, -1, null);
 
+    public static final SimplePropertyDefinition PROP_NAME = new SimplePropertyDefinition(
+            Property.NAME, "def:name", null, Property.NAME, "Name", "", false,
+            PropertyType.STRING, false, null, false, true, null,
+            Updatability.READ_WRITE, true, true, 0, null, null, -1, null);
+
     public static final SimplePropertyDefinition PROP_CREATED_BY = new SimplePropertyDefinition(
             Property.CREATED_BY, "def:createdby", null, Property.CREATED_BY,
             "Created By", "", false, PropertyType.STRING, false, null, false,
@@ -81,11 +86,6 @@
             PropertyType.STRING, false, null, false, false, null,
             Updatability.READ_WRITE, true, true, 0, null, null, -1, null);
 
-    public static final SimplePropertyDefinition PROP_NAME = new SimplePropertyDefinition(
-            Property.NAME, "def:name", null, Property.NAME, "Name", "", false,
-            PropertyType.STRING, false, null, false, true, null,
-            Updatability.READ_WRITE, true, true, 0, null, null, -1, null);
-
     public static final SimplePropertyDefinition PROP_IS_LATEST_VERSION = new SimplePropertyDefinition(
             Property.IS_LATEST_VERSION, "def:islatestversion", null,
             Property.IS_LATEST_VERSION, "Is Latest Version", "", false,
@@ -194,12 +194,6 @@
             "Target Id", "", false, PropertyType.ID, false, null, false, true,
             null, Updatability.READ_WRITE, true, true, 0, null, null, -1, null);
 
-    public static final SimplePropertyDefinition PROP_POLICY_NAME = new SimplePropertyDefinition(
-            Property.POLICY_NAME, "def:policyname", null, Property.POLICY_NAME,
-            "Policy Name", "", false, PropertyType.STRING, false, null, false,
-            true, null, Updatability.READ_ONLY, true, true, 0, null, null, -1,
-            null);
-
     public static final SimplePropertyDefinition PROP_POLICY_TEXT = new SimplePropertyDefinition(
             Property.POLICY_TEXT, "def:policytext", null, Property.POLICY_TEXT,
             "Policy Text", "", false, PropertyType.STRING, false, null, false,
@@ -209,6 +203,7 @@
     private static final PropertyDefinition[] PROPS_COMMON = { PROP_ID, //
             PROP_TYPE_ID, //
             PROP_BASE_TYPE_ID, //
+            PROP_NAME, //
             PROP_CREATED_BY, //
             PROP_CREATION_DATE, //
             PROP_LAST_MODIFIED_BY, //
@@ -225,7 +220,6 @@
     }
 
     public static final List<PropertyDefinition> PROPS_DOCUMENT_BASE = commonPlus(
-            PROP_NAME, //
             PROP_IS_LATEST_VERSION, //
             PROP_IS_MAJOR_VERSION, //
             PROP_IS_LATEST_MAJOR_VERSION, //
@@ -241,7 +235,6 @@
             PROP_CONTENT_STREAM_ID);
 
     public static final List<PropertyDefinition> PROPS_FOLDER_BASE = commonPlus(
-            PROP_NAME, //
             PROP_PARENT_ID, //
             PROP_ALLOWED_CHILD_OBJECT_TYPE_IDS);
 
@@ -249,9 +242,8 @@
             PROP_SOURCE_ID, //
             PROP_TARGET_ID);
 
-    public static final List<PropertyDefinition> PROPS_POLICY_BASE = commonPlus(
-            PROP_POLICY_NAME, //
-            PROP_POLICY_TEXT);
+    public static final List<PropertyDefinition> PROPS_POLICY_BASE = commonPlus( //
+    PROP_POLICY_TEXT);
 
     protected final String id;
 



Mime
View raw message