Author: fguillaume
Date: Fri Apr 16 10:37:01 2010
New Revision: 934736
URL: http://svn.apache.org/viewvc?rev=934736&view=rev
Log:
Refactor to get rid of duplicate DTOs (and their interfaces): QueryProperty
Removed:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryProperty.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryPropertyImpl.java
Modified:
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-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/repository/ObjectFactory.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/PersistentPropertyImpl.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryResultImpl.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-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/ReadOnlyObjectIT.java
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=934736&r1=934735&r2=934736&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
Fri Apr 16 10:37:01 2010
@@ -18,8 +18,7 @@
*/
package org.apache.chemistry.opencmis.client.api;
-import java.util.List;
-
+import org.apache.chemistry.opencmis.commons.api.PropertyData;
import org.apache.chemistry.opencmis.commons.api.PropertyDefinition;
import org.apache.chemistry.opencmis.commons.enums.PropertyType;
@@ -27,12 +26,10 @@ import org.apache.chemistry.opencmis.com
* {...@see org.apache.opencmis.client.api.CMISObject#getProperties()},
{...@see
* org.apache.opencmis.client.api.Session#createProperty(String, Object)} and
{...@see
* org.apache.opencmis.client.api.Session#createPropertyMultivalue(String,
List)}. Domain Model 2.2.1
- *
+ *
* @param <T>
*/
-public interface Property<T> {
-
- // property
+public interface Property<T> extends PropertyData<T> {
boolean isMultiValued();
@@ -40,18 +37,6 @@ public interface Property<T> {
PropertyDefinition<T> getDefinition();
- String getId();
-
- String getLocalName();
-
- String getDisplayName();
-
- String getQueryName();
-
String getValueAsString();
- T getValue();
-
- List<T> getValues();
-
}
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.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/QueryResult.java?rev=934736&r1=934735&r2=934736&view=diff
==============================================================================
---
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.java
(original)
+++
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/QueryResult.java
Fri Apr 16 10:37:01 2010
@@ -21,17 +21,18 @@ package org.apache.chemistry.opencmis.cl
import java.util.List;
import org.apache.chemistry.opencmis.commons.api.AllowableActions;
+import org.apache.chemistry.opencmis.commons.api.PropertyData;
/**
* Query result.
*/
public interface QueryResult {
- List<QueryProperty<?>> getProperties();
+ List<PropertyData<?>> getProperties();
- <T> QueryProperty<T> getPropertyById(String id);
+ <T> PropertyData<T> getPropertyById(String id);
- <T> QueryProperty<T> getPropertyByQueryName(String queryName);
+ <T> PropertyData<T> getPropertyByQueryName(String queryName);
<T> T getPropertyValueById(String id);
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/repository/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/repository/ObjectFactory.java?rev=934736&r1=934735&r2=934736&view=diff
==============================================================================
---
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/repository/ObjectFactory.java
(original)
+++
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/repository/ObjectFactory.java
Fri Apr 16 10:37:01 2010
@@ -27,7 +27,6 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.apache.chemistry.opencmis.client.api.Policy;
import org.apache.chemistry.opencmis.client.api.Property;
-import org.apache.chemistry.opencmis.client.api.QueryProperty;
import org.apache.chemistry.opencmis.client.api.QueryResult;
import org.apache.chemistry.opencmis.client.api.Rendition;
import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
@@ -36,6 +35,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.api.ContentStream;
import org.apache.chemistry.opencmis.commons.api.ObjectData;
import org.apache.chemistry.opencmis.commons.api.PropertiesData;
+import org.apache.chemistry.opencmis.commons.api.PropertyData;
import org.apache.chemistry.opencmis.commons.api.PropertyDefinition;
import org.apache.chemistry.opencmis.commons.api.RenditionData;
import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
@@ -84,7 +84,7 @@ public interface ObjectFactory {
PropertiesData convertProperties(Map<String, ?> properties, ObjectType type,
Set<Updatability> updatabilityFilter);
- List<QueryProperty<?>> convertQueryProperties(PropertiesData properties);
+ List<PropertyData<?>> convertQueryProperties(PropertiesData properties);
// objects
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=934736&r1=934735&r2=934736&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
Fri Apr 16 10:37:01 2010
@@ -476,7 +476,7 @@ public abstract class AbstractPersistent
return null;
}
- return property.getValue();
+ return property.getFirstValue();
}
/*
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=934736&r1=934735&r2=934736&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
Fri Apr 16 10:37:01 2010
@@ -19,105 +19,78 @@
package org.apache.chemistry.opencmis.client.runtime;
import java.io.Serializable;
-import java.util.Collections;
import java.util.List;
import org.apache.chemistry.opencmis.client.api.Property;
import org.apache.chemistry.opencmis.commons.api.PropertyDefinition;
import org.apache.chemistry.opencmis.commons.enums.Cardinality;
import org.apache.chemistry.opencmis.commons.enums.PropertyType;
+import
org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractPropertyData;
/**
* Property Implementation.
*/
-public class PersistentPropertyImpl<T> implements Property<T>, Serializable {
+public class PersistentPropertyImpl<T> extends AbstractPropertyData<T>
implements Property<T>, Serializable {
- /**
- * serialization
- */
- private static final long serialVersionUID = -6586532350183649719L;
- private PropertyDefinition<T> type;
- private List<T> values;
+ private static final long serialVersionUID = 1L;
+ private PropertyDefinition<T> propertyDefinition;
+
+ protected void initialize(PropertyDefinition<?> pd) {
+ setId(pd.getId());
+ setDisplayName(pd.getDisplayName());
+ setLocalName(pd.getLocalName());
+ setQueryName(pd.getQueryName());
+ }
/**
* Constructs a single-value property.
*/
@SuppressWarnings("unchecked")
- public PersistentPropertyImpl(PropertyDefinition<?> type, T value) {
- if (type == null) {
+ public PersistentPropertyImpl(PropertyDefinition<?> pd, T value) {
+ if (pd == null) {
throw new IllegalArgumentException("Type must be set!");
}
-
if (value == null) {
throw new IllegalArgumentException("Value must be set!");
}
-
- this.type = (PropertyDefinition<T>) type;
- this.values = Collections.singletonList(value);
+ propertyDefinition = (PropertyDefinition<T>) pd;
+ initialize(pd);
+ setValue(value);
}
/**
* Constructs a multi-value property.
*/
@SuppressWarnings("unchecked")
- public PersistentPropertyImpl(PropertyDefinition<?> type, List<T> values) {
- if (type == null) {
+ public PersistentPropertyImpl(PropertyDefinition<?> pd, List<T> values) {
+ if (pd == null) {
throw new IllegalArgumentException("Type must be set!");
}
-
- this.type = (PropertyDefinition<T>) type;
- this.values = values;
+ propertyDefinition = (PropertyDefinition<T>) pd;
+ initialize(pd);
+ setValues(values);
}
public PropertyDefinition<T> getDefinition() {
- return this.type;
- }
-
- public String getDisplayName() {
- return this.type.getDisplayName();
- }
-
- public String getId() {
- return this.type.getId();
- }
-
- public String getLocalName() {
- return this.type.getLocalName();
- }
-
- public String getQueryName() {
- return this.type.getQueryName();
+ return propertyDefinition;
}
public PropertyType getType() {
- return this.type.getPropertyType();
- }
-
- public T getValue() {
- if (this.values.size() == 0) {
- return null;
- }
- return this.values.get(0);
+ return propertyDefinition.getPropertyType();
}
public String getValueAsString() {
- if (this.values.size() == 0) {
+ List<T> values = getValues();
+ if (values.size() == 0) {
return null;
}
- switch (this.type.getPropertyType()) {
+ switch (propertyDefinition.getPropertyType()) {
default:
- return this.values.get(0).toString();
- }
- }
-
- public List<T> getValues() {
- if (this.values.size() == 0) {
- return null;
+ return values.get(0).toString();
}
- return this.values;
}
public boolean isMultiValued() {
- return this.type.getCardinality() == Cardinality.MULTI;
+ return propertyDefinition.getCardinality() == Cardinality.MULTI;
}
}
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryResultImpl.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/QueryResultImpl.java?rev=934736&r1=934735&r2=934736&view=diff
==============================================================================
---
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryResultImpl.java
(original)
+++
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/QueryResultImpl.java
Fri Apr 16 10:37:01 2010
@@ -25,15 +25,14 @@ import java.util.List;
import java.util.Map;
import org.apache.chemistry.opencmis.client.api.CmisObject;
-import org.apache.chemistry.opencmis.client.api.QueryProperty;
import org.apache.chemistry.opencmis.client.api.QueryResult;
import org.apache.chemistry.opencmis.client.api.Relationship;
import org.apache.chemistry.opencmis.client.api.Rendition;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.client.api.repository.ObjectFactory;
-import
org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomAllowableActions;
import org.apache.chemistry.opencmis.commons.api.AllowableActions;
import org.apache.chemistry.opencmis.commons.api.ObjectData;
+import org.apache.chemistry.opencmis.commons.api.PropertyData;
import org.apache.chemistry.opencmis.commons.api.RenditionData;
/**
@@ -43,8 +42,8 @@ public class QueryResultImpl implements
private static final long serialVersionUID = 1L;
- private Map<String, QueryProperty<?>> propertiesById;
- private Map<String, QueryProperty<?>> propertiesByQueryName;
+ private Map<String, PropertyData<?>> propertiesById;
+ private Map<String, PropertyData<?>> propertiesByQueryName;
private AllowableActions allowableActions;
private List<Relationship> relationships;
private List<Rendition> renditions;
@@ -59,13 +58,13 @@ public class QueryResultImpl implements
// handle properties
if (objectData.getProperties() != null) {
- propertiesById = new LinkedHashMap<String, QueryProperty<?>>();
- propertiesByQueryName = new LinkedHashMap<String, QueryProperty<?>>();
+ propertiesById = new LinkedHashMap<String, PropertyData<?>>();
+ propertiesByQueryName = new LinkedHashMap<String, PropertyData<?>>();
- List<QueryProperty<?>> queryProperties =
of.convertQueryProperties(objectData
+ List<PropertyData<?>> queryProperties =
of.convertQueryProperties(objectData
.getProperties());
- for (QueryProperty<?> property : queryProperties) {
+ for (PropertyData<?> property : queryProperties) {
propertiesById.put(property.getId(), property);
propertiesByQueryName.put(property.getQueryName(), property);
}
@@ -102,8 +101,8 @@ public class QueryResultImpl implements
*
* @see org.apache.opencmis.client.api.QueryResult#getProperties()
*/
- public List<QueryProperty<?>> getProperties() {
- return new ArrayList<QueryProperty<?>>(propertiesById.values());
+ public List<PropertyData<?>> getProperties() {
+ return new ArrayList<PropertyData<?>>(propertiesById.values());
}
/*
@@ -112,8 +111,8 @@ public class QueryResultImpl implements
* @see
org.apache.opencmis.client.api.QueryResult#getPropertyById(java.lang.String)
*/
@SuppressWarnings("unchecked")
- public <T> QueryProperty<T> getPropertyById(String id) {
- return (QueryProperty<T>) propertiesById.get(id);
+ public <T> PropertyData<T> getPropertyById(String id) {
+ return (PropertyData<T>) propertiesById.get(id);
}
/*
@@ -122,8 +121,8 @@ public class QueryResultImpl implements
* @see
org.apache.opencmis.client.api.QueryResult#getPropertyByQueryName(java.lang.String)
*/
@SuppressWarnings("unchecked")
- public <T> QueryProperty<T> getPropertyByQueryName(String queryName) {
- return (QueryProperty<T>) propertiesByQueryName.get(queryName);
+ public <T> PropertyData<T> getPropertyByQueryName(String queryName) {
+ return (PropertyData<T>) propertiesByQueryName.get(queryName);
}
/*
@@ -132,12 +131,12 @@ public class QueryResultImpl implements
* @see
org.apache.opencmis.client.api.QueryResult#getPropertyValueById(java.lang.String)
*/
public <T> T getPropertyValueById(String id) {
- QueryProperty<T> property = getPropertyById(id);
+ PropertyData<T> property = getPropertyById(id);
if (property == null) {
return null;
}
- return property.getValue();
+ return property.getFirstValue();
}
/*
@@ -146,12 +145,12 @@ public class QueryResultImpl implements
* @see
org.apache.opencmis.client.api.QueryResult#getPropertyValueByQueryName(java.lang.String)
*/
public <T> T getPropertyValueByQueryName(String queryName) {
- QueryProperty<T> property = getPropertyByQueryName(queryName);
+ PropertyData<T> property = getPropertyByQueryName(queryName);
if (property == null) {
return null;
}
- return property.getValue();
+ return property.getFirstValue();
}
/*
@@ -160,7 +159,7 @@ public class QueryResultImpl implements
* @see
org.apache.opencmis.client.api.QueryResult#getPropertyMultivalueById(java.lang.String)
*/
public <T> List<T> getPropertyMultivalueById(String id) {
- QueryProperty<T> property = getPropertyById(id);
+ PropertyData<T> property = getPropertyById(id);
if (property == null) {
return null;
}
@@ -175,7 +174,7 @@ public class QueryResultImpl implements
*
org.apache.opencmis.client.api.QueryResult#getPropertyMultivalueByQueryName(java.lang.String)
*/
public <T> List<T> getPropertyMultivalueByQueryName(String queryName) {
- QueryProperty<T> property = getPropertyByQueryName(queryName);
+ PropertyData<T> property = getPropertyByQueryName(queryName);
if (property == null) {
return null;
}
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=934736&r1=934735&r2=934736&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
Fri Apr 16 10:37:01 2010
@@ -34,7 +34,6 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.apache.chemistry.opencmis.client.api.Policy;
import org.apache.chemistry.opencmis.client.api.Property;
-import org.apache.chemistry.opencmis.client.api.QueryProperty;
import org.apache.chemistry.opencmis.client.api.QueryResult;
import org.apache.chemistry.opencmis.client.api.Rendition;
import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
@@ -45,7 +44,6 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.runtime.PersistentPropertyImpl;
import org.apache.chemistry.opencmis.client.runtime.PersistentRelationshipImpl;
import org.apache.chemistry.opencmis.client.runtime.PersistentSessionImpl;
-import org.apache.chemistry.opencmis.client.runtime.QueryPropertyImpl;
import org.apache.chemistry.opencmis.client.runtime.QueryResultImpl;
import org.apache.chemistry.opencmis.client.runtime.RenditionImpl;
import
org.apache.chemistry.opencmis.client.runtime.objecttype.DocumentTypeImpl;
@@ -405,7 +403,7 @@ public class PersistentObjectFactoryImpl
throw new IllegalArgumentException("Property id mismatch: '" + id +
"' != '" + p.getId()
+ "'!");
}
- value = (p.getDefinition().getCardinality() == Cardinality.SINGLE ?
p.getValue() : p
+ value = (p.getDefinition().getCardinality() == Cardinality.SINGLE ?
p.getFirstValue() : p
.getValues());
}
@@ -580,20 +578,13 @@ public class PersistentObjectFactoryImpl
* .commons.provider.PropertiesData)
*/
@SuppressWarnings("unchecked")
- public List<QueryProperty<?>> convertQueryProperties(PropertiesData
properties) {
+ public List<PropertyData<?>> convertQueryProperties(PropertiesData
properties) {
// check input
if ((properties == null) || (properties.getProperties() == null)) {
throw new IllegalArgumentException("Properties must be set!");
}
-
- // iterate through properties and convert them
- List<QueryProperty<?>> result = new ArrayList<QueryProperty<?>>();
- for (PropertyData<?> property : properties.getProperties().values()) {
- result.add(new QueryPropertyImpl(property.getId(),
property.getQueryName(), property
- .getValues()));
- }
-
- return result;
+ return new ArrayList<PropertyData<?>>(properties.getProperties()
+ .values());
}
// objects
Modified:
incubator/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/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java?rev=934736&r1=934735&r2=934736&view=diff
==============================================================================
---
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java
(original)
+++
incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractPropertyData.java
Fri Apr 16 10:37:01 2010
@@ -26,9 +26,9 @@ import org.apache.chemistry.opencmis.com
/**
* Abstract property data implementation.
- *
+ *
* @author <a href="mailto:[email protected]">Florian Müller</a>
- *
+ *
*/
public abstract class AbstractPropertyData<T> extends AbstractExtensionData
implements
PropertyData<T> {
@@ -42,7 +42,7 @@ public abstract class AbstractPropertyDa
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.PropertyData#getId()
*/
public String getId() {
@@ -55,7 +55,7 @@ public abstract class AbstractPropertyDa
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.PropertyData#getDisplayName()
*/
public String getDisplayName() {
@@ -68,7 +68,7 @@ public abstract class AbstractPropertyDa
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.PropertyData#getLocalName()
*/
public String getLocalName() {
@@ -81,7 +81,7 @@ public abstract class AbstractPropertyDa
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.PropertyData#getQueryName()
*/
public String getQueryName() {
@@ -94,7 +94,7 @@ public abstract class AbstractPropertyDa
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.PropertyData#getValues()
*/
public List<T> getValues() {
@@ -122,7 +122,7 @@ public abstract class AbstractPropertyDa
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.opencmis.client.provider.PropertyData#getFirstValue()
*/
public T getFirstValue() {
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/ReadOnlyObjectIT.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/ReadOnlyObjectIT.java?rev=934736&r1=934735&r2=934736&view=diff
==============================================================================
---
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/ReadOnlyObjectIT.java
(original)
+++
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/ReadOnlyObjectIT.java
Fri Apr 16 10:37:01 2010
@@ -127,7 +127,7 @@ public class ReadOnlyObjectIT extends Ab
Iterator<Property<?>> i = l.iterator();
while (i.hasNext()) {
Property<?> p = i.next();
- Object value = p.getValue();
+ Object value = p.getFirstValue();
PropertyType t = p.getType();
Assert.assertNotNull(p);
@@ -194,7 +194,7 @@ public class ReadOnlyObjectIT extends Ab
Iterator<Property<?>> i = l.iterator();
while (i.hasNext()) {
Property<?> p = i.next();
- Object value = p.getValue();
+ Object value = p.getFirstValue();
PropertyType t = p.getType();
Assert.assertNotNull(p);
@@ -256,7 +256,7 @@ public class ReadOnlyObjectIT extends Ab
Property<String> p = document.getProperty(PropertyIds.OBJECT_ID);
Assert.assertNotNull(p);
- String v1 = p.getValue();
+ String v1 = p.getFirstValue();
Assert.assertNotNull(v1);
String v2 = document.getPropertyValue(PropertyIds.OBJECT_ID);