You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2015/03/06 16:14:25 UTC

svn commit: r1664651 - in /chemistry/opencmis/trunk: chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/ chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apac...

Author: fmui
Date: Fri Mar  6 15:14:24 2015
New Revision: 1664651

URL: http://svn.apache.org/r1664651
Log:
CMIS-896: server: improved handling of JSON responses

Added:
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyDataWithDefinition.java   (with props)
Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java Fri Mar  6 15:14:24 2015
@@ -532,7 +532,7 @@ public final class XMLConverter {
             PropertyStringDefinition def = (PropertyStringDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyStringImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyStringImpl((String) null, def.getDefaultValue()), true);
             }
 
             XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_PROPERTY_TYPE_MAX_LENGTH, def.getMaxLength());
@@ -540,13 +540,13 @@ public final class XMLConverter {
             PropertyIdDefinition def = (PropertyIdDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyIdImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyIdImpl((String) null, def.getDefaultValue()), true);
             }
         } else if (source instanceof PropertyIntegerDefinition) {
             PropertyIntegerDefinition def = (PropertyIntegerDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyIntegerImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyIntegerImpl((String) null, def.getDefaultValue()), true);
             }
 
             XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_PROPERTY_TYPE_MAX_VALUE, def.getMaxValue());
@@ -555,13 +555,13 @@ public final class XMLConverter {
             PropertyBooleanDefinition def = (PropertyBooleanDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyBooleanImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyBooleanImpl((String) null, def.getDefaultValue()), true);
             }
         } else if (source instanceof PropertyDateTimeDefinition) {
             PropertyDateTimeDefinition def = (PropertyDateTimeDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyDateTimeImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyDateTimeImpl((String) null, def.getDefaultValue()), true);
             }
 
             XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_PROPERTY_TYPE_RESOLUTION,
@@ -570,7 +570,7 @@ public final class XMLConverter {
             PropertyDecimalDefinition def = (PropertyDecimalDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyDecimalImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyDecimalImpl((String) null, def.getDefaultValue()), true);
             }
 
             XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_PROPERTY_TYPE_MAX_VALUE, def.getMaxValue());
@@ -580,13 +580,13 @@ public final class XMLConverter {
             PropertyHtmlDefinition def = (PropertyHtmlDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyHtmlImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyHtmlImpl((String) null, def.getDefaultValue()), true);
             }
         } else if (source instanceof PropertyUriDefinition) {
             PropertyUriDefinition def = (PropertyUriDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyUriImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyUriImpl((String) null, def.getDefaultValue()), true);
             }
         }
 
@@ -1270,7 +1270,7 @@ public final class XMLConverter {
                 }
 
                 if (isTag(name, TAG_CAP_ORDER_BY)) {
-                    target.setOrderByCapability(readEnum(parser, CapabilityOrderBy.class));
+                    target.setCapabilityOrderBy(readEnum(parser, CapabilityOrderBy.class));
                     return true;
                 }
 
@@ -2405,7 +2405,7 @@ public final class XMLConverter {
                 throws XmlPullParserException {
             if (isCmisNamespace(name)) {
                 if (isTag(name, TAG_ACE_PRINCIPAL_ID)) {
-                    target.setPrincipalId(readText(parser));
+                    target.setId(readText(parser));
                     return true;
                 }
             }

Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyDataWithDefinition.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyDataWithDefinition.java?rev=1664651&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyDataWithDefinition.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyDataWithDefinition.java Fri Mar  6 15:14:24 2015
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.data;
+
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
+
+/**
+ * PropertyData objects implementing this interface also may provide the
+ * property definition.
+ */
+public interface PropertyDataWithDefinition<T> extends PropertyData<T> {
+
+    PropertyDefinition<T> getPropertyDefinition();
+}

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/data/PropertyDataWithDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java Fri Mar  6 15:14:24 2015
@@ -61,6 +61,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.data.Properties;
 import org.apache.chemistry.opencmis.commons.data.PropertyBoolean;
 import org.apache.chemistry.opencmis.commons.data.PropertyData;
+import org.apache.chemistry.opencmis.commons.data.PropertyDataWithDefinition;
 import org.apache.chemistry.opencmis.commons.data.PropertyDateTime;
 import org.apache.chemistry.opencmis.commons.data.PropertyDecimal;
 import org.apache.chemistry.opencmis.commons.data.PropertyHtml;
@@ -1201,10 +1202,6 @@ public final class JSONConverter {
                     type = typeCache.getTypeDefinition(typeId);
                 }
             }
-
-            if (type == null && objectId != null && propertyMode != PropertyMode.CHANGE) {
-                type = typeCache.getTypeDefinitionForObject(objectId);
-            }
         }
 
         JSONObject result = new JSONObject();
@@ -1214,7 +1211,10 @@ public final class JSONConverter {
             assert property.getId() != null;
 
             PropertyDefinition<?> propDef = null;
-            if (typeCache != null) {
+            if (property instanceof PropertyDataWithDefinition) {
+                propDef = ((PropertyDataWithDefinition<?>) property).getPropertyDefinition();
+            }
+            if (propDef == null && typeCache != null) {
                 propDef = typeCache.getPropertyDefinition(property.getId());
             }
             if (propDef == null && type != null) {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java Fri Mar  6 15:14:24 2015
@@ -531,7 +531,7 @@ public final class XMLConverter {
             PropertyStringDefinition def = (PropertyStringDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyStringImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyStringImpl((String) null, def.getDefaultValue()), true);
             }
 
             XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_PROPERTY_TYPE_MAX_LENGTH, def.getMaxLength());
@@ -539,13 +539,13 @@ public final class XMLConverter {
             PropertyIdDefinition def = (PropertyIdDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyIdImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyIdImpl((String) null, def.getDefaultValue()), true);
             }
         } else if (source instanceof PropertyIntegerDefinition) {
             PropertyIntegerDefinition def = (PropertyIntegerDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyIntegerImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyIntegerImpl((String) null, def.getDefaultValue()), true);
             }
 
             XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_PROPERTY_TYPE_MAX_VALUE, def.getMaxValue());
@@ -554,13 +554,13 @@ public final class XMLConverter {
             PropertyBooleanDefinition def = (PropertyBooleanDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyBooleanImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyBooleanImpl((String) null, def.getDefaultValue()), true);
             }
         } else if (source instanceof PropertyDateTimeDefinition) {
             PropertyDateTimeDefinition def = (PropertyDateTimeDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyDateTimeImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyDateTimeImpl((String) null, def.getDefaultValue()), true);
             }
 
             XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_PROPERTY_TYPE_RESOLUTION,
@@ -569,7 +569,7 @@ public final class XMLConverter {
             PropertyDecimalDefinition def = (PropertyDecimalDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyDecimalImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyDecimalImpl((String) null, def.getDefaultValue()), true);
             }
 
             XMLUtils.write(writer, PREFIX_CMIS, NAMESPACE_CMIS, TAG_PROPERTY_TYPE_MAX_VALUE, def.getMaxValue());
@@ -579,13 +579,13 @@ public final class XMLConverter {
             PropertyHtmlDefinition def = (PropertyHtmlDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyHtmlImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyHtmlImpl((String) null, def.getDefaultValue()), true);
             }
         } else if (source instanceof PropertyUriDefinition) {
             PropertyUriDefinition def = (PropertyUriDefinition) source;
 
             if (def.getDefaultValue() != null) {
-                writeProperty(writer, new PropertyUriImpl(null, def.getDefaultValue()), true);
+                writeProperty(writer, new PropertyUriImpl((String) null, def.getDefaultValue()), true);
             }
         }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java Fri Mar  6 15:14:24 2015
@@ -23,11 +23,14 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyData;
+import org.apache.chemistry.opencmis.commons.data.PropertyDataWithDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * Abstract property data implementation.
  */
-public abstract class AbstractPropertyData<T> extends AbstractExtensionData implements MutablePropertyData<T> {
+public abstract class AbstractPropertyData<T> extends AbstractExtensionData implements MutablePropertyData<T>,
+        PropertyDataWithDefinition<T> {
 
     private static final long serialVersionUID = 1L;
 
@@ -35,9 +38,29 @@ public abstract class AbstractPropertyDa
     private String displayName;
     private String localName;
     private String queryName;
+    private PropertyDefinition<T> propDef;
 
     private List<T> values = Collections.emptyList();
 
+    public PropertyDefinition<T> getPropertyDefinition() {
+        return propDef;
+    }
+
+    public void setPropertyDefinition(PropertyDefinition<T> propDef) {
+        this.propDef = propDef;
+        if (propDef != null) {
+            this.id = propDef.getId();
+            this.displayName = propDef.getDisplayName();
+            this.localName = propDef.getLocalName();
+            this.queryName = propDef.getQueryName();
+        } else {
+            this.id = null;
+            this.displayName = null;
+            this.localName = null;
+            this.queryName = null;
+        }
+    }
+
     public String getId() {
         return id;
     }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanImpl.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyBooleanImpl.java Fri Mar  6 15:14:24 2015
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyBoolean;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * Boolean property data implementation.
@@ -41,4 +42,14 @@ public class PropertyBooleanImpl extends
         setId(id);
         setValue(value);
     }
+
+    public PropertyBooleanImpl(PropertyDefinition<Boolean> propDef, List<Boolean> values) {
+        setPropertyDefinition(propDef);
+        setValues(values);
+    }
+
+    public PropertyBooleanImpl(PropertyDefinition<Boolean> propDef, Boolean value) {
+        setPropertyDefinition(propDef);
+        setValue(value);
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeImpl.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDateTimeImpl.java Fri Mar  6 15:14:24 2015
@@ -22,6 +22,7 @@ import java.util.GregorianCalendar;
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyDateTime;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * DateTime property data implementation.
@@ -42,4 +43,14 @@ public class PropertyDateTimeImpl extend
         setId(id);
         setValue(value);
     }
+
+    public PropertyDateTimeImpl(PropertyDefinition<GregorianCalendar> propDef, List<GregorianCalendar> values) {
+        setPropertyDefinition(propDef);
+        setValues(values);
+    }
+
+    public PropertyDateTimeImpl(PropertyDefinition<GregorianCalendar> propDef, GregorianCalendar value) {
+        setPropertyDefinition(propDef);
+        setValue(value);
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalImpl.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyDecimalImpl.java Fri Mar  6 15:14:24 2015
@@ -22,6 +22,7 @@ import java.math.BigDecimal;
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyDecimal;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * Decimal property data implementation.
@@ -42,4 +43,14 @@ public class PropertyDecimalImpl extends
         setId(id);
         setValue(value);
     }
+
+    public PropertyDecimalImpl(PropertyDefinition<BigDecimal> propDef, List<BigDecimal> values) {
+        setPropertyDefinition(propDef);
+        setValues(values);
+    }
+
+    public PropertyDecimalImpl(PropertyDefinition<BigDecimal> propDef, BigDecimal value) {
+        setPropertyDefinition(propDef);
+        setValue(value);
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlImpl.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyHtmlImpl.java Fri Mar  6 15:14:24 2015
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyHtml;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * HTML property data implementation.
@@ -41,4 +42,14 @@ public class PropertyHtmlImpl extends Ab
         setId(id);
         setValue(value);
     }
+
+    public PropertyHtmlImpl(PropertyDefinition<String> propDef, List<String> values) {
+        setPropertyDefinition(propDef);
+        setValues(values);
+    }
+
+    public PropertyHtmlImpl(PropertyDefinition<String> propDef, String value) {
+        setPropertyDefinition(propDef);
+        setValue(value);
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdImpl.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIdImpl.java Fri Mar  6 15:14:24 2015
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyId;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * Id property data implementation.
@@ -41,4 +42,14 @@ public class PropertyIdImpl extends Abst
         setId(id);
         setValue(value);
     }
+    
+    public PropertyIdImpl(PropertyDefinition<String> propDef, List<String> values) {
+        setPropertyDefinition(propDef);
+        setValues(values);
+    }
+
+    public PropertyIdImpl(PropertyDefinition<String> propDef, String value) {
+        setPropertyDefinition(propDef);
+        setValue(value);
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerImpl.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyIntegerImpl.java Fri Mar  6 15:14:24 2015
@@ -22,6 +22,7 @@ import java.math.BigInteger;
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyInteger;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * Integer property data implementation.
@@ -42,4 +43,14 @@ public class PropertyIntegerImpl extends
         setId(id);
         setValue(value);
     }
+
+    public PropertyIntegerImpl(PropertyDefinition<BigInteger> propDef, List<BigInteger> values) {
+        setPropertyDefinition(propDef);
+        setValues(values);
+    }
+
+    public PropertyIntegerImpl(PropertyDefinition<BigInteger> propDef, BigInteger value) {
+        setPropertyDefinition(propDef);
+        setValue(value);
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringImpl.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyStringImpl.java Fri Mar  6 15:14:24 2015
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyString;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * String property data implementation.
@@ -41,4 +42,14 @@ public class PropertyStringImpl extends
         setId(id);
         setValue(value);
     }
+
+    public PropertyStringImpl(PropertyDefinition<String> propDef, List<String> values) {
+        setPropertyDefinition(propDef);
+        setValues(values);
+    }
+
+    public PropertyStringImpl(PropertyDefinition<String> propDef, String value) {
+        setPropertyDefinition(propDef);
+        setValue(value);
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriImpl.java?rev=1664651&r1=1664650&r2=1664651&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/PropertyUriImpl.java Fri Mar  6 15:14:24 2015
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.co
 import java.util.List;
 
 import org.apache.chemistry.opencmis.commons.data.MutablePropertyUri;
+import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
 
 /**
  * Uri property data implementation.
@@ -41,4 +42,14 @@ public class PropertyUriImpl extends Abs
         setId(id);
         setValue(value);
     }
+
+    public PropertyUriImpl(PropertyDefinition<String> propDef, List<String> values) {
+        setPropertyDefinition(propDef);
+        setValues(values);
+    }
+
+    public PropertyUriImpl(PropertyDefinition<String> propDef, String value) {
+        setPropertyDefinition(propDef);
+        setValue(value);
+    }
 }