org.nuxeo.ecm.core.api.model.impl.primitives
Class BlobProperty
java.lang.Object
org.nuxeo.ecm.core.api.model.impl.AbstractProperty
org.nuxeo.ecm.core.api.model.impl.ComplexProperty
org.nuxeo.ecm.core.api.model.impl.MapProperty
org.nuxeo.ecm.core.api.model.impl.osm.ComplexMemberProperty
org.nuxeo.ecm.core.api.model.impl.osm.ObjectProperty
org.nuxeo.ecm.core.api.model.impl.primitives.BlobProperty
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Property>, java.util.Map<java.lang.String,Property>, Adaptable, Property
public class BlobProperty
- extends ObjectProperty
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Method Summary |
|
convertTo(java.io.Serializable value,
java.lang.Class<T> toType)
Converts the given normalized value to the given type. |
static ObjectAdapter |
getObjectMetaData()
|
boolean |
isNormalized(java.lang.Object value)
Checks if the given value is a normalized one. |
java.lang.Object |
newInstance()
Creates a new and empty instance of a normalized value. |
java.io.Serializable |
normalize(java.lang.Object value)
Normalizes the given value as dictated by the property type. |
Methods inherited from class org.nuxeo.ecm.core.api.model.impl.ComplexProperty |
addEmpty, addValue, addValue, clear, containsKey, containsValue, entrySet, get, get, get, getChild, getChildren, getDirtyChildren, getNonPhantomChild, getNonPhantomChildren, isEmpty, keySet, put, putAll, remove, values |
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, 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, size, toString, validate, validateType |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode, size |
BlobProperty
public BlobProperty(Property parent,
Field field,
int flags)
getObjectMetaData
public static ObjectAdapter getObjectMetaData()
isNormalized
public boolean isNormalized(java.lang.Object value)
- Description copied from interface:
Property
- Checks if the given value is a normalized one. This means the value has a
type that is normalized.
Null values are considered as normalized.
- Specified by:
isNormalized
in interface Property
- Overrides:
isNormalized
in class ComplexProperty
- Parameters:
value
- the value to check
- Returns:
- true if the value is normalized false otherwise
normalize
public java.io.Serializable normalize(java.lang.Object value)
throws PropertyConversionException
- Description copied from interface:
Property
- Normalizes the given value as dictated by the property type.
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.
- Specified by:
normalize
in interface Property
- Overrides:
normalize
in class ComplexProperty
- Parameters:
value
- the value to normalize according to the property type
- Returns:
- the normalized value
- Throws:
PropertyConversionException
convertTo
public <T> T convertTo(java.io.Serializable value,
java.lang.Class<T> toType)
throws PropertyConversionException
- Description copied from interface:
Property
- Converts the given normalized value to the given type.
If the value has already the given type it will be returned back.
- Specified by:
convertTo
in interface Property
- Overrides:
convertTo
in class AbstractProperty
- Parameters:
value
- the normalized value to converttoType
- the conversion type
- Returns:
- the converted value, which may be null
- Throws:
PropertyConversionException
- if the conversion cannot be made
because of type incompatibilities
newInstance
public java.lang.Object newInstance()
- Description copied from interface:
Property
- Creates a new and empty instance of a normalized value.
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 ""
- Specified by:
newInstance
in interface Property
- Overrides:
newInstance
in class AbstractProperty
- Returns:
- the empty instance the empty instance, or null for some
implementations
Copyright © 2010 Nuxeo SAS. All Rights Reserved.