|
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.Objectorg.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 Typevalidate in class AbstractTypeobject - 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 SimpleTypepublic boolean isPrimitive()
SimpleType
isPrimitive in interface SimpleTypepublic boolean isSimpleType()
Type
isSimpleType in interface TypeisSimpleType in class AbstractTypepublic Object decode(String str)
TypeReturns null if the string can not be decoded.
decode in interface Typedecode in class AbstractTypestr - the string to decode
public String encode(Object value)
TypeNull is returned if the object cannot be converted.
encode in interface Typeencode in class AbstractTypevalue - the object to convert
public Object convert(Object value)
throws TypeException
ValueConverter
convert in interface ValueConvertervalue - the value to convert
TypeException - if the value to convert is not compatible with the associated typepublic Object newInstance()
Type
newInstance in interface TypenewInstance in class AbstractTypepublic TypeRef<? extends SimpleType> getRef()
Type
getRef in interface SimpleTypegetRef in interface TypegetRef 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 | |||||||||