|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.api.model.impl.AbstractProperty org.nuxeo.ecm.core.api.model.impl.ScalarProperty org.nuxeo.ecm.core.api.model.impl.ArrayProperty
public class ArrayProperty
Field Summary |
---|
Fields inherited from class org.nuxeo.ecm.core.api.model.impl.AbstractProperty |
---|
IS_READONLY, IS_VALIDATING, KEYED_DATA |
Fields inherited from interface org.nuxeo.ecm.core.api.model.Property |
---|
DIRTY_MASK, IS_DIRTY, IS_MODIFIED, IS_MOVED, IS_NEW, IS_PHANTOM, IS_REMOVED, NONE |
Constructor Summary | |
---|---|
ArrayProperty(Property parent,
Field field,
int flags)
|
Method Summary | ||
---|---|---|
|
convertTo(Serializable value,
Class<T> toType)
Converts the given normalized value to the given type. |
|
ListType |
getType()
Get the type of the field corresponding to this property. |
|
boolean |
isContainer()
Whether this property is a container - this means the property value is a map or a list. |
|
boolean |
isNormalized(Object value)
Checks if the given value is a normalized one. |
|
Object |
newInstance()
Creates a new and empty instance of a normalized value. |
|
Serializable |
normalize(Object value)
Normalizes the given value as dictated by the property type. |
Methods inherited from class org.nuxeo.ecm.core.api.model.impl.ScalarProperty |
---|
accept, addEmpty, addValue, addValue, clone, get, get, getChildren, getDirtyChildren, getField, getName, internalGetValue, internalSetValue, isSameAs, toString |
Methods inherited from class org.nuxeo.ecm.core.api.model.impl.AbstractProperty |
---|
areFlagsSet, clearDirtyFlags, clearFlags, getData, getData, getDirtyFlags, getParent, getPath, getRoot, getSchema, getValue, getValue, getValue, getValue, getValueForWrite, init, isComplex, isDirty, isList, isModified, isMoved, isNew, isPhantom, isReadOnly, isRemoved, isScalar, isValidating, iterator, moveTo, remove, removePhantomFlag, resolvePath, resolvePath, setData, setData, setFlags, setIsModified, setReadOnly, setValidating, setValue, setValue, setValue, size, validate, validateType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArrayProperty(Property parent, Field field, int flags)
Method Detail |
---|
public ListType getType()
Property
getType
in interface Property
getType
in class ScalarProperty
public boolean isContainer()
Property
Container properties don't have a scalar values. Container values are
computed each time they are requested - by calling on of the
getValue
methods - by collecting the values of the child
properties.
isContainer
in interface Property
isContainer
in class ScalarProperty
public boolean isNormalized(Object value)
Property
Null values are considered as normalized.
isNormalized
in interface Property
isNormalized
in class AbstractProperty
value
- the value to check
public Serializable normalize(Object value) throws PropertyConversionException
Property
Normalized values are the ones that are used for transportation over the net and that are given to the storage implementation to be stored in the repository
Normalized values must be Serializable
If the given value is already normalized it will be returned back.
normalize
in interface Property
normalize
in class AbstractProperty
value
- the value to normalize according to the property type
PropertyConversionException
public <T> T convertTo(Serializable value, Class<T> toType) throws PropertyConversionException
Property
If the value has already the given type it will be returned back.
convertTo
in interface Property
convertTo
in class AbstractProperty
value
- the normalized value to converttoType
- the conversion type
PropertyConversionException
- if the conversion cannot be made
because of type incompatibilitiespublic Object newInstance()
Property
Empty is used in the sense of a value that has not been initialized or
can be considered as an empty value. For example for the String
type the empty value will be the empty string ""
newInstance
in interface Property
newInstance
in class AbstractProperty
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |