Class BinaryProperty
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.primitives.BinaryProperty
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Property>
,Property
- Author:
- Bogdan Stefanescu
- See Also:
-
Field Summary
Fields inherited from class org.nuxeo.ecm.core.api.model.impl.ScalarProperty
field, value
Fields inherited from class org.nuxeo.ecm.core.api.model.impl.AbstractProperty
flags, forceDirty, IS_DEPRECATED, IS_READONLY, IS_SECURED, NON_CANON_INDEX, parent
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
-
Method Summary
Modifier and TypeMethodDescription<T> T
convertTo
(Serializable value, Class<T> toType) Converts the given normalized value to the given type.boolean
isNormalized
(Object value) Checks if the given value is a normalized one.Creates a new and empty instance of a normalized 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, getType, internalGetValue, internalSetValue, isContainer, isSameAs, set, toString
Methods inherited from class org.nuxeo.ecm.core.api.model.impl.AbstractProperty
appendDirtyFlags, areFlagsSet, clearDirtyFlags, clearFlags, collectPath, computeRemovedProperty, getDefaultValue, getDeprecatedFallback, getDeprecatedParent, getDirtyFlags, getObjectResolver, getParent, getRoot, getSchema, getValue, getValue, getValue, getValue, getValueDeprecation, getValueForWrite, getXPath, getXPath, hasDefaultValue, init, isComplex, isDeprecated, isDirty, isForceDirty, isList, isModified, isMoved, isNew, isPhantom, isReadOnly, isRemoved, isSameValue, isScalar, isSecured, isSecuredForContext, iterator, moveTo, newDeprecatedMessage, remove, removePhantomFlag, resolvePath, resolvePath, setDirtyFlags, setFlags, setForceDirty, setIsModified, setIsMoved, setIsNew, setIsRemoved, setReadOnly, setValue, setValue, setValue, setValueDeprecation, size, validateType
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BinaryProperty
-
-
Method Details
-
isNormalized
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 interfaceProperty
- Overrides:
isNormalized
in classAbstractProperty
- Parameters:
value
- the value to check- Returns:
- true if the value is normalized false otherwise
-
normalize
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 interfaceProperty
- Overrides:
normalize
in classAbstractProperty
- Parameters:
value
- the value to normalize according to the property type- Returns:
- the normalized value
- Throws:
PropertyConversionException
-
convertTo
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 interfaceProperty
- Overrides:
convertTo
in classAbstractProperty
- 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
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 interfaceProperty
- Overrides:
newInstance
in classAbstractProperty
- Returns:
- the empty instance the empty instance, or null for some implementations
-