T
- Type of the element valuepublic interface ElementType<T> extends ModelItemType
Modifier and Type | Method and Description |
---|---|
T |
castValue(String value)
Cast an untyped value (string) to an object of the corresponding type
|
Object |
fromJSONForClient(Object json)
Convert the given client side JSON object to the types value
|
Class |
getManagedClass()
Get the class managed by the implementation
|
Class |
getManagedClassArray()
Get the class representing an array of managed class by the implementation
|
boolean |
isCompatible(Object value)
Checks if the value is compatible with the element type
|
boolean |
isSimple()
Determines if this type is simple or not.
|
T |
parseConfiguration(Configuration configuration)
Parses the given configuration to get the typed value
|
String |
toString(T value)
Cast a typed value to a String
|
Object |
valueToJSONForClient(Object value)
Convert the value into a JSON object to use client side
|
getId, valueToSAX
setPluginInfo
T castValue(String value) throws BadItemTypeException
value
- the value to castBadItemTypeException
- if the String value can't be cast to the typeString toString(T value)
value
- the value to castObject valueToJSONForClient(Object value)
value
- the value to convertObject fromJSONForClient(Object json)
json
- the JSON object to convertT parseConfiguration(Configuration configuration) throws ConfigurationException
configuration
- the configuration to parseConfigurationException
- if an error occurs while parsing the configurationboolean isSimple()
true
if the type is simple, false
otherwiseClass getManagedClass()
Class getManagedClassArray()
boolean isCompatible(Object value)
value
- the value to checktrue
if the value matches the current type, false
otherwise