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
Abstract class for boolean element types
-
Field Summary
Fields inherited from class org.ametys.core.model.type.AbstractElementType
_jsonUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertValue
(Object value) Try to convert the given value, that is not of the managed typefromJSONForClient
(Object json, DataContext context) 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, _isMultiple, _isSingle, _isValueFromXMLMultiple, _singleValueFromXML, _singleValueToJSON, _singleValueToJSONForEdition, _singleValueToSAX, _useJSONForEdition, _valueToJSON, _valueToSAX, _valueToSAX, _valueToSAXForEdition, castValue, compareValues, getManagedClass, getManagedClassArray, parseConfiguration, service, toString, valueFromXML, valueToJSONForClient, valueToJSONForEdition, 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 Details
-
AbstractBooleanElementType
public AbstractBooleanElementType()
-
-
Method Details
-
convertValue
Description copied from class:AbstractElementType
Try to convert the given value, that is not of the managed type- Overrides:
convertValue
in classAbstractElementType<Boolean>
- Parameters:
value
- the value to convert- Returns:
- the converted value or null if it's not possible.
- Throws:
BadItemTypeException
- if the given value is not compatible with the current type
-
fromJSONForClient
Description copied from interface:ElementType
Convert the given client side JSON object to the types value- Parameters:
json
- the JSON object to convertcontext
- the context of the data to retrieve- Returns:
- the typed value corresponding to the JSON object
-
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
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
-