Package org.ametys.web.skin
Class SkinDisableCondition
java.lang.Object
org.ametys.runtime.model.disableconditions.AbstractRelativeDisableCondition
org.ametys.runtime.model.disableconditions.AbstractStaticRelativeDisableCondition
org.ametys.web.skin.SkinDisableCondition
- All Implemented Interfaces:
DisableCondition
,Initializable
,Component
,Configurable
DisableCondition
for Skin
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.runtime.model.disableconditions.AbstractRelativeDisableCondition
AbstractRelativeDisableCondition.RelativeDefinitionAndValue
Nested classes/interfaces inherited from interface org.ametys.runtime.model.disableconditions.DisableCondition
DisableCondition.OPERATOR
-
Field Summary
Fields inherited from class org.ametys.runtime.model.disableconditions.AbstractRelativeDisableCondition
_id, _name, _operator, _value
Fields inherited from interface org.ametys.runtime.model.disableconditions.DisableCondition
EXTERNAL_CONDITION_ID_PREFIX
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
containsRelativeValue
(ModelItemAccessor modelItemAccessor, String conditionDataPath, Map<String, Object> values, Map<String, Object> contextualParameters) Check if the valuesMap
contains a value for the relative conditionprotected Object
getRelativeValueFromMap
(ModelItemAccessor modelItemAccessor, String conditionDataPath, Map<String, Object> values, Map<String, Object> contextualParameters) Retrieves the relative condition value from the valuesMap
protected <T> Object
getStoredRelativeValue
(String conditionDataPath, Optional<String> oldConditionDataPath, T object, Map<String, Object> contextualParameters) Retrieves the condition value from data stored in the given objectMethods inherited from class org.ametys.runtime.model.disableconditions.AbstractStaticRelativeDisableCondition
configure, initialize
Methods inherited from class org.ametys.runtime.model.disableconditions.AbstractRelativeDisableCondition
_emptyStringToNull, _getConditionDefinitionAndValue, checkModelItemPathSegment, evaluate, evaluateDisableConditionValue, getAllModelItemsInPath, getId, getModelItem, getName, getOperator, getValue, init
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.disableconditions.DisableCondition
isExternal
-
Constructor Details
-
SkinDisableCondition
public SkinDisableCondition()
-
-
Method Details
-
containsRelativeValue
protected boolean containsRelativeValue(ModelItemAccessor modelItemAccessor, String conditionDataPath, Map<String, Object> values, Map<String, Object> contextualParameters) Description copied from class:AbstractRelativeDisableCondition
Check if the valuesMap
contains a value for the relative condition- Overrides:
containsRelativeValue
in classAbstractRelativeDisableCondition
- Parameters:
modelItemAccessor
- the relative accessor to the given condition pathconditionDataPath
- the absolute data path of the conditionvalues
- the valuesMap
contextualParameters
- the contextual parameters- Returns:
true
if there is a value (even empty) for the condition in the valuesMap
,false
otherwise
-
getRelativeValueFromMap
protected Object getRelativeValueFromMap(ModelItemAccessor modelItemAccessor, String conditionDataPath, Map<String, Object> values, Map<String, Object> contextualParameters) Description copied from class:AbstractRelativeDisableCondition
Retrieves the relative condition value from the valuesMap
- Overrides:
getRelativeValueFromMap
in classAbstractRelativeDisableCondition
- Parameters:
modelItemAccessor
- the relative accessor to the given condition pathconditionDataPath
- the absolute data path of the conditionvalues
- the valuesMap
contextualParameters
- the contextual parameters- Returns:
- the condition value found in the values
Map
-
getStoredRelativeValue
protected <T> Object getStoredRelativeValue(String conditionDataPath, Optional<String> oldConditionDataPath, T object, Map<String, Object> contextualParameters) Description copied from class:AbstractRelativeDisableCondition
Retrieves the condition value from data stored in the given object- Specified by:
getStoredRelativeValue
in classAbstractRelativeDisableCondition
- Type Parameters:
T
- Type of object holding the data to evaluate- Parameters:
conditionDataPath
- the absolute data path of the conditionoldConditionDataPath
- the absolute old data path of the conditionobject
- the object holding the data to evaluate and the condition valuecontextualParameters
- the contextual parameters- Returns:
- the condition value from data stored in the object
-