You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fg...@apache.org on 2010/10/10 21:59:00 UTC
svn commit: r1006347 - in /incubator/chemistry/opencmis/trunk:
chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/
chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/ap...
Author: fguillaume
Date: Sun Oct 10 19:59:00 2010
New Revision: 1006347
URL: http://svn.apache.org/viewvc?rev=1006347&view=rev
Log:
CMIS-259: Simplify value vs multi-value management in high-level API
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentPropertyImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractReadOnlyObjectIT.java
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java Sun Oct 10 19:59:00 2010
@@ -33,7 +33,7 @@ import org.apache.chemistry.opencmis.com
/**
* Base CMIS object.
- *
+ *
* See CMIS Domain Model - section 2.1.2.
*/
public interface CmisObject extends ObjectId {
@@ -88,7 +88,7 @@ public interface CmisObject extends Obje
/**
* Get the type's base type id.
- *
+ *
* @return
*/
BaseTypeId getBaseTypeId();
@@ -110,38 +110,27 @@ public interface CmisObject extends Obje
/**
* Returns a property by id.
- *
+ *
* @param id
* the property id
- *
+ *
* @return the property or <code>null</code> if the property does not exist
* or is not available
*/
<T> Property<T> getProperty(String id);
/**
- * Returns a property (single) value by id.
- *
+ * Returns a property value by id.
+ *
* @param id
* the property id
- *
+ *
* @return the property value or <code>null</code> if the property does not
* exist or is not available
*/
<T> T getPropertyValue(String id);
/**
- * Returns a property multi-value by id.
- *
- * @param id
- * the property id
- *
- * @return the list of values or <code>null</code> if the property does not
- * exist or is not available
- */
- <T> List<T> getPropertyMultivalue(String id);
-
- /**
* Returns the allowable actions if they have been fetched for this object.
*/
AllowableActions getAllowableActions();
@@ -160,7 +149,7 @@ public interface CmisObject extends Obje
/**
* Deletes this object.
- *
+ *
* @param allVersions
* if this object is a document this parameter defines if just
* this version or all versions should be deleted
@@ -169,9 +158,8 @@ public interface CmisObject extends Obje
/**
* Updates the properties that have been set with
- * {@link #setProperty(String, Object)} or
- * {@link #setPropertyMultivalue(String, List)}.
- *
+ * {@link #setProperty(String, Object)}.
+ *
* @return the object id of the updated object (a repository might have
* created a new object)
*/
@@ -179,10 +167,10 @@ public interface CmisObject extends Obje
/**
* Updates the properties that are provided.
- *
+ *
* @param properties
* the properties to update
- *
+ *
* @return the object id of the updated object (a repository might have
* created a new object)
*/
@@ -229,7 +217,7 @@ public interface CmisObject extends Obje
/**
* Adds and removes ACEs to the object.
- *
+ *
* @return the new ACL of this object
*/
Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation);
@@ -247,18 +235,13 @@ public interface CmisObject extends Obje
// buffered stuff
/**
- * Sets a new property single value.
- *
- * Use {@link #updateProperties()} to store the new value in the repository.
- */
- <T> void setProperty(String id, T value);
-
- /**
- * Sets a new property multi value.
- *
+ * Sets a new property value.
+ * <p>
+ * The value may be a single value or a list.
+ *
* Use {@link #updateProperties()} to store the new value in the repository.
*/
- <T> void setPropertyMultivalue(String id, List<T> value);
+ <T> void setProperty(String id, Object value);
// extensions
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ObjectFactory.java Sun Oct 10 19:59:00 2010
@@ -37,7 +37,7 @@ import org.apache.chemistry.opencmis.com
/**
* A factory to create CMIS objects.
- *
+ *
* @see org.apache.chemistry.opencmis.client.api.Session#getObjectFactory()
*/
public interface ObjectFactory {
@@ -72,9 +72,7 @@ public interface ObjectFactory {
// properties
- <T> Property<T> createProperty(PropertyDefinition<?> type, T value);
-
- <T> Property<T> createPropertyMultivalue(PropertyDefinition<?> type, List<T> values);
+ <T> Property<T> createProperty(PropertyDefinition<T> type, List<T> values);
Map<String, Property<?>> convertProperties(ObjectType objectType, Properties properties);
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/Property.java Sun Oct 10 19:59:00 2010
@@ -24,7 +24,7 @@ import org.apache.chemistry.opencmis.com
/**
* CMIS Property.
- *
+ *
* Domain Model 2.2.1
*/
public interface Property<T> extends PropertyData<T> {
@@ -45,6 +45,11 @@ public interface Property<T> extends Pro
PropertyDefinition<T> getDefinition();
/**
+ * Returns the property value (single or multiple).
+ */
+ <U> U getValue();
+
+ /**
* Returns a human readable representation of the property value. If the
* property is multi-value property, only the first value will be returned.
*/
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java Sun Oct 10 19:59:00 2010
@@ -404,22 +404,14 @@ public abstract class AbstractPersistent
}
}
- public <T> List<T> getPropertyMultivalue(String id) {
- Property<T> property = getProperty(id);
- if (property == null) {
- return null;
- }
-
- return property.getValues();
- }
-
+ @SuppressWarnings("unchecked")
public <T> T getPropertyValue(String id) {
Property<T> property = getProperty(id);
if (property == null) {
return null;
}
-
- return property.getFirstValue();
+ // explicit cast needed by the Sun compiler
+ return (T) property.getValue();
}
public void setName(String name) {
@@ -427,39 +419,22 @@ public abstract class AbstractPersistent
}
@SuppressWarnings("unchecked")
- public <T> void setProperty(String id, T value) {
- PropertyDefinition<?> propertyDefinition = checkProperty(id, value);
-
- // check updatability
- if (propertyDefinition.getUpdatability() == Updatability.READONLY) {
- throw new IllegalArgumentException("Property is read-only!");
- }
-
- // create property
- Property<T> newProperty = (Property<T>) getObjectFactory().createProperty(
- (PropertyDefinition<T>) propertyDefinition, value);
-
- writeLock();
- try {
- setChanged();
- this.properties.put(id, newProperty);
- } finally {
- writeUnlock();
+ public <T> void setProperty(String id, Object value) {
+ PropertyDefinition<T> propertyDefinition = (PropertyDefinition<T>) getObjectType().getPropertyDefinitions().get(
+ id);
+ if (propertyDefinition == null) {
+ throw new IllegalArgumentException("Unknown property '" + id + "'!");
}
- }
-
- @SuppressWarnings("unchecked")
- public <T> void setPropertyMultivalue(String id, List<T> value) {
- PropertyDefinition<?> propertyDefinition = checkProperty(id, value);
-
// check updatability
if (propertyDefinition.getUpdatability() == Updatability.READONLY) {
throw new IllegalArgumentException("Property is read-only!");
}
+ List<T> values = checkProperty(propertyDefinition, value);
+
// create property
- Property<T> newProperty = (Property<T>) getObjectFactory().createPropertyMultivalue(
- (PropertyDefinition<T>) propertyDefinition, value);
+ Property<T> newProperty = getObjectFactory().createProperty(
+ propertyDefinition, values);
writeLock();
try {
@@ -689,29 +664,29 @@ public abstract class AbstractPersistent
/**
* Checks if a value matches a property definition.
+ * <p>
+ * Returns a list of values.
*/
- private PropertyDefinition<?> checkProperty(String id, Object value) {
- PropertyDefinition<?> propertyDefinition = getObjectType().getPropertyDefinitions().get(id);
- if (propertyDefinition == null) {
- throw new IllegalArgumentException("Unknown property '" + id + "'!");
- }
+ @SuppressWarnings("unchecked")
+ private <T> List<T> checkProperty(PropertyDefinition<T> propertyDefinition,
+ Object value) {
// null values are ok for updates
if (value == null) {
- return propertyDefinition;
+ return null;
}
// single and multi value check
- List<?> values = null;
+ List<T> values = null;
if (value instanceof List<?>) {
if (propertyDefinition.getCardinality() != Cardinality.MULTI) {
throw new IllegalArgumentException("Property '" + propertyDefinition.getId()
+ "' is not a multi value property!");
}
- values = (List<?>) value;
+ values = (List<T>) value;
if (values.isEmpty()) {
- return propertyDefinition;
+ return values;
}
} else {
if (propertyDefinition.getCardinality() != Cardinality.SINGLE) {
@@ -719,7 +694,7 @@ public abstract class AbstractPersistent
+ "' is not a single value property!");
}
- values = Collections.singletonList(value);
+ values = Collections.singletonList((T) value);
}
// check if list contains null values
@@ -760,6 +735,6 @@ public abstract class AbstractPersistent
+ "' does not match property type!");
}
- return propertyDefinition;
+ return values;
}
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java Sun Oct 10 19:59:00 2010
@@ -221,7 +221,7 @@ public class PersistentFolderImpl extend
readLock();
try {
- List<String> otids = getPropertyMultivalue(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS);
+ List<String> otids = getPropertyValue(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS);
if (otids == null) {
return result;
}
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentPropertyImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentPropertyImpl.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentPropertyImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentPropertyImpl.java Sun Oct 10 19:59:00 2010
@@ -44,30 +44,16 @@ public class PersistentPropertyImpl<T> e
}
/**
- * Constructs a single-value property.
+ * Constructs a property from a list of values.
*/
- @SuppressWarnings("unchecked")
- public PersistentPropertyImpl(PropertyDefinition<?> pd, T value) {
+ public PersistentPropertyImpl(PropertyDefinition<T> pd, List<T> values) {
if (pd == null) {
throw new IllegalArgumentException("Type must be set!");
}
- if (value == null) {
+ if (values == null) {
throw new IllegalArgumentException("Value must be set!");
}
- propertyDefinition = (PropertyDefinition<T>) pd;
- initialize(pd);
- setValue(value);
- }
-
- /**
- * Constructs a multi-value property.
- */
- @SuppressWarnings("unchecked")
- public PersistentPropertyImpl(PropertyDefinition<?> pd, List<T> values) {
- if (pd == null) {
- throw new IllegalArgumentException("Type must be set!");
- }
- propertyDefinition = (PropertyDefinition<T>) pd;
+ propertyDefinition = pd;
initialize(pd);
setValues(values);
}
@@ -80,6 +66,16 @@ public class PersistentPropertyImpl<T> e
return propertyDefinition.getPropertyType();
}
+ @SuppressWarnings("unchecked")
+ public <U> U getValue() {
+ List<T> values = getValues();
+ if (propertyDefinition.getCardinality() == Cardinality.SINGLE) {
+ return values.size() == 0 ? null : (U) values.get(0);
+ } else {
+ return (U) values;
+ }
+ }
+
public String getValueAsString() {
List<T> values = getValues();
if (values.size() == 0) {
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java Sun Oct 10 19:59:00 2010
@@ -236,15 +236,23 @@ public class PersistentObjectFactoryImpl
// properties
- public <T> Property<T> createProperty(PropertyDefinition<?> type, T value) {
- return new PersistentPropertyImpl<T>(type, value);
- }
-
- public <T> Property<T> createPropertyMultivalue(PropertyDefinition<?> type, List<T> values) {
+ public <T> Property<T> createProperty(PropertyDefinition<T> type, List<T> values) {
return new PersistentPropertyImpl<T>(type, values);
}
@SuppressWarnings("unchecked")
+ protected <T> Property<T> convertProperty(ObjectType objectType,
+ PropertyData<T> pd) {
+ PropertyDefinition<T> definition = (PropertyDefinition<T>) objectType.getPropertyDefinitions().get(
+ pd.getId());
+ if (definition == null) {
+ // property without definition
+ throw new CmisRuntimeException("Property '" + pd.getId()
+ + "' doesn't exist!");
+ }
+ return createProperty(definition, pd.getValues());
+ }
+
public Map<String, Property<?>> convertProperties(ObjectType objectType, Properties properties) {
// check input
if (objectType == null) {
@@ -261,43 +269,10 @@ public class PersistentObjectFactoryImpl
// iterate through properties and convert them
Map<String, Property<?>> result = new LinkedHashMap<String, Property<?>>();
- for (Map.Entry<String, PropertyData<?>> property : properties.getProperties().entrySet()) {
+ for (Map.Entry<String, PropertyData<?>> entry : properties.getProperties().entrySet()) {
// find property definition
- PropertyDefinition<?> definition = objectType.getPropertyDefinitions().get(property.getKey());
- if (definition == null) {
- // property without definition
- throw new CmisRuntimeException("Property '" + property.getKey() + "' doesn't exist!");
- }
-
- Property<?> apiProperty = null;
-
- if (definition instanceof PropertyStringDefinition) {
- apiProperty = createPropertyMultivalue((PropertyStringDefinition) definition, (List<String>) property
- .getValue().getValues());
- } else if (definition instanceof PropertyIdDefinition) {
- apiProperty = createPropertyMultivalue((PropertyIdDefinition) definition, (List<String>) property
- .getValue().getValues());
- } else if (definition instanceof PropertyHtmlDefinition) {
- apiProperty = createPropertyMultivalue((PropertyHtmlDefinition) definition, (List<String>) property
- .getValue().getValues());
- } else if (definition instanceof PropertyUriDefinition) {
- apiProperty = createPropertyMultivalue((PropertyUriDefinition) definition, (List<String>) property
- .getValue().getValues());
- } else if (definition instanceof PropertyIntegerDefinition) {
- apiProperty = createPropertyMultivalue((PropertyIntegerDefinition) definition,
- (List<BigInteger>) property.getValue().getValues());
- } else if (definition instanceof PropertyBooleanDefinition) {
- apiProperty = createPropertyMultivalue((PropertyBooleanDefinition) definition, (List<Boolean>) property
- .getValue().getValues());
- } else if (definition instanceof PropertyDecimalDefinition) {
- apiProperty = createPropertyMultivalue((PropertyDecimalDefinition) definition,
- (List<BigDecimal>) property.getValue().getValues());
- } else if (definition instanceof PropertyDateTimeDefinition) {
- apiProperty = createPropertyMultivalue((PropertyDateTimeDefinition) definition,
- (List<GregorianCalendar>) property.getValue().getValues());
- }
-
- result.put(property.getKey(), apiProperty);
+ Property<?> apiProperty = convertProperty(objectType, entry.getValue());
+ result.put(entry.getKey(), apiProperty);
}
return result;
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CmisObjectMock.java Sun Oct 10 19:59:00 2010
@@ -44,7 +44,7 @@ import org.apache.chemistry.opencmis.com
public class CmisObjectMock implements CmisObject, Serializable {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
@@ -123,10 +123,6 @@ public class CmisObjectMock implements C
return null;
}
- public <T> List<T> getPropertyMultivalue(String id) {
- return null;
- }
-
public <T> T getPropertyValue(String id) {
return null;
}
@@ -180,11 +176,7 @@ public class CmisObjectMock implements C
}
- public <T> void setProperty(String id, T value) {
- }
-
- public <T> void setPropertyMultivalue(String id, List<T> value) {
-
+ public <T> void setProperty(String id, Object value) {
}
public ObjectId updateProperties() {
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractReadOnlyObjectIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractReadOnlyObjectIT.java?rev=1006347&r1=1006346&r2=1006347&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractReadOnlyObjectIT.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractReadOnlyObjectIT.java Sun Oct 10 19:59:00 2010
@@ -262,8 +262,11 @@ public abstract class AbstractReadOnlyOb
List<String> v1 = p.getValues();
Assert.assertNotNull(v1);
Assert.assertFalse(v1.isEmpty());
+ v1 = p.getValue();
+ Assert.assertNotNull(v1);
+ Assert.assertFalse(v1.isEmpty());
- List<String> v2 = document.getPropertyMultivalue(FixtureData.PROPERTY_NAME_STRING_MULTI_VALUED.toString());
+ List<String> v2 = document.getPropertyValue(FixtureData.PROPERTY_NAME_STRING_MULTI_VALUED.toString());
Assert.assertNotNull(v2);
Assert.assertFalse(v2.isEmpty());
Assert.assertEquals(v1, v2);