Package org.ametys.web.skin
Class SkinDisableConditionsEvaluator
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.model.disableconditions.AbstractDisableConditionsEvaluator<Skin>
org.ametys.web.skin.SkinDisableConditionsEvaluator
- All Implemented Interfaces:
DisableConditionsEvaluator<Skin>,LogEnabled,Component
Evaluator for
DisableConditions on Skin-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.runtime.model.disableconditions.AbstractDisableConditionsEvaluator
AbstractDisableConditionsEvaluator.DefinitionAndValue -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancontainsValue(ModelItemAccessor modelItemAccessor, String conditionDataPath, Map<String, Object> values, Map<String, Object> contextualParameters) Check if the valuesMapcontains a value for the conditionprotected ObjectgetStoredValue(String conditionDataPath, Optional<String> oldConditionDataPath, Skin object, Map<String, Object> contextualParameters) Retrieves the condition value from data stored in the given objectprotected ObjectgetValueFromMap(ModelItemAccessor modelItemAccessor, String conditionDataPath, Map<String, Object> values, Map<String, Object> contextualParameters) Retrieves the condition value from the valuesMapMethods inherited from class org.ametys.runtime.model.disableconditions.AbstractDisableConditionsEvaluator
_emptyStringToNull, _getConditionDefinitionAndValue, _resultIsSufficient, evaluateDisableCondition, evaluateDisableConditions, evaluateDisableConditions, evaluateDisableConditions, evaluateDisableConditions, evaluateDisableConditionValue, getModelItemMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role
-
-
Constructor Details
-
SkinDisableConditionsEvaluator
public SkinDisableConditionsEvaluator()
-
-
Method Details
-
containsValue
protected boolean containsValue(ModelItemAccessor modelItemAccessor, String conditionDataPath, Map<String, Object> values, Map<String, Object> contextualParameters) Description copied from class:AbstractDisableConditionsEvaluatorCheck if the valuesMapcontains a value for the condition- Specified by:
containsValuein classAbstractDisableConditionsEvaluator<Skin>- Parameters:
modelItemAccessor- the relative accessor to the given condition pathconditionDataPath- the absolute data path of the conditionvalues- the valuesMapcontextualParameters- the contextual parameters- Returns:
trueif there is a value (even empty) for the condition in the valuesMap,falseotherwise
-
getValueFromMap
protected Object getValueFromMap(ModelItemAccessor modelItemAccessor, String conditionDataPath, Map<String, Object> values, Map<String, Object> contextualParameters) Description copied from class:AbstractDisableConditionsEvaluatorRetrieves the condition value from the valuesMap- Specified by:
getValueFromMapin classAbstractDisableConditionsEvaluator<Skin>- Parameters:
modelItemAccessor- the relative accessor to the given condition pathconditionDataPath- the absolute data path of the conditionvalues- the valuesMapcontextualParameters- the contextual parameters- Returns:
- the condition value found in the values
Map
-
getStoredValue
protected Object getStoredValue(String conditionDataPath, Optional<String> oldConditionDataPath, Skin object, Map<String, Object> contextualParameters) Description copied from class:AbstractDisableConditionsEvaluatorRetrieves the condition value from data stored in the given object- Specified by:
getStoredValuein classAbstractDisableConditionsEvaluator<Skin>- 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
-