|
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.schema.types.AbstractType org.nuxeo.ecm.core.schema.types.SimpleTypeImpl
public class SimpleTypeImpl
Field Summary |
---|
Fields inherited from class org.nuxeo.ecm.core.schema.types.AbstractType |
---|
EMPTY_SUPERTYPES, F_NOTNULL, F_READONLY |
Fields inherited from interface org.nuxeo.ecm.core.schema.types.Type |
---|
ANY |
Constructor Summary | |
---|---|
SimpleTypeImpl(SimpleType superType,
String schema,
String name)
|
|
SimpleTypeImpl(TypeRef<? extends SimpleType> superType,
String schema,
String name)
|
Method Summary | |
---|---|
Object |
convert(Object value)
Converts the given value to an object compatible with the associated type. |
Object |
decode(String str)
Decodes the string representation into an object of this type. |
String |
encode(Object value)
Encodes the given object that is assumed to be of this type into a string representation. |
Constraint[] |
getConstraints()
|
SimpleType |
getPrimitiveType()
|
TypeRef<? extends SimpleType> |
getRef()
Gets a proxy (or reference to this type). |
boolean |
isPrimitive()
Tests whether this type is a primitive type. |
boolean |
isSimpleType()
Tests whether this type is a simple type. |
Object |
newInstance()
Creates a new instance according to this type and filled with default values. |
void |
setConstraints(Constraint[] constraints)
|
boolean |
validate(Object object)
Tests whether the given object is of this type. |
Methods inherited from class org.nuxeo.ecm.core.schema.types.AbstractType |
---|
getHelper, getName, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAny, isAnyType, isComplexType, isCompositeType, isListType, isNotNull, isReadOnly, isSuperTypeOf, setNotNull, setReadOnly |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.nuxeo.ecm.core.schema.types.Type |
---|
getHelper, getName, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isComplexType, isCompositeType, isListType, isNotNull, isReadOnly, isSuperTypeOf |
Constructor Detail |
---|
public SimpleTypeImpl(SimpleType superType, String schema, String name)
public SimpleTypeImpl(TypeRef<? extends SimpleType> superType, String schema, String name)
Method Detail |
---|
public boolean validate(Object object) throws TypeException
Type
validate
in interface Type
validate
in class AbstractType
object
- the object to test
TypeException
- if an error occurs trying to retrieve the
supertypespublic void setConstraints(Constraint[] constraints)
public Constraint[] getConstraints()
public SimpleType getPrimitiveType()
getPrimitiveType
in interface SimpleType
public boolean isPrimitive()
SimpleType
isPrimitive
in interface SimpleType
public boolean isSimpleType()
Type
isSimpleType
in interface Type
isSimpleType
in class AbstractType
public Object decode(String str)
Type
Returns null if the string can not be decoded.
decode
in interface Type
decode
in class AbstractType
str
- the string to decode
public String encode(Object value)
Type
Null is returned if the object cannot be converted.
encode
in interface Type
encode
in class AbstractType
value
- the object to convert
public Object convert(Object value) throws TypeException
ValueConverter
convert
in interface ValueConverter
value
- the value to convert
TypeException
- if the value to convert is not compatible with the associated typepublic Object newInstance()
Type
newInstance
in interface Type
newInstance
in class AbstractType
public TypeRef<? extends SimpleType> getRef()
Type
getRef
in interface SimpleType
getRef
in interface Type
getRef
in class AbstractType
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |