Package org.ametys.core.model.type
Class AbstractBooleanElementType
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.model.type.AbstractModelItemType
-
- org.ametys.core.model.type.AbstractElementType<Boolean>
-
- org.ametys.core.model.type.AbstractBooleanElementType
-
- All Implemented Interfaces:
ElementType<Boolean>
,ModelItemType
,LogEnabled
,PluginAware
,Component
,Serviceable
- Direct Known Subclasses:
BooleanRepositoryElementType
,BooleanXMLElementType
public abstract class AbstractBooleanElementType extends AbstractElementType<Boolean>
Abstract class for boolean element types
-
-
Field Summary
-
Fields inherited from class org.ametys.core.model.type.AbstractElementType
_jsonUtils
-
-
Constructor Summary
Constructors Constructor Description AbstractBooleanElementType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
convertValue(Object value)
Try to convert the given value.Object
fromJSONForClient(Object json)
Convert the given client side JSON object to the types valueboolean
isCompatible(Object value)
Checks if the value is compatible with the element typeboolean
isSimple()
Determines if this type is simple or not.-
Methods inherited from class org.ametys.core.model.type.AbstractElementType
_compareMultipleValues, _compareSingleValues, _getValueAttributes, _isValueFromXMLMultiple, _singleValueFromXML, _singleValueToJSON, _singleValueToSAX, _useJSONForEdition, _valueToSAX, _valueToSAX, _valueToSAXForEdition, castValue, compareValues, getManagedClass, getManagedClassArray, parseConfiguration, service, toString, valueFromXML, valueToJSONForClient, valueToSAX, valueToSAXForEdition
-
Methods inherited from class org.ametys.core.model.type.AbstractModelItemType
_getContextAttributes, getId, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.runtime.model.type.ModelItemType
getId, valueToSAX
-
Methods inherited from interface org.ametys.runtime.plugin.component.PluginAware
setPluginInfo
-
-
-
-
Constructor Detail
-
AbstractBooleanElementType
public AbstractBooleanElementType()
-
-
Method Detail
-
convertValue
public Boolean convertValue(Object value)
Description copied from class:AbstractElementType
Try to convert the given value.- Overrides:
convertValue
in classAbstractElementType<Boolean>
- Parameters:
value
- the value to convert- Returns:
- the converted value or null if it's not possible.
-
fromJSONForClient
public Object fromJSONForClient(Object json)
Description copied from interface:ElementType
Convert the given client side JSON object to the types value- Parameters:
json
- the JSON object to convert- Returns:
- the typed value corresponding to the JSON object
-
isSimple
public boolean isSimple()
Description copied from interface:ElementType
Determines if this type is simple or not. A simple element type is a type of elements that can be edited in a grid- Returns:
true
if the type is simple,false
otherwise
-
isCompatible
public boolean isCompatible(Object value)
Description copied from interface:ElementType
Checks if the value is compatible with the element type- Specified by:
isCompatible
in interfaceElementType<Boolean>
- Overrides:
isCompatible
in classAbstractElementType<Boolean>
- Parameters:
value
- the value to check- Returns:
true
if the value matches the current type,false
otherwise
-
-