Package org.ametys.odf.course
Class NotShared2DisableCondition
java.lang.Object
org.ametys.runtime.model.disableconditions.AbstractExternalDisableCondition
org.ametys.odf.course.NotShared2DisableCondition
- All Implemented Interfaces:
DisableCondition,Component,Serviceable
public class NotShared2DisableCondition
extends AbstractExternalDisableCondition
implements Component, Serviceable
Disable condition used to block attribute on not shared program items
-
Nested Class Summary
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.AbstractExternalDisableCondition
_idFields inherited from interface org.ametys.runtime.model.disableconditions.DisableCondition
EXTERNAL_CONDITION_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> booleanevaluate(ModelItem definition, String dataPath, Optional<String> oldDataPath, Map<String, Object> values, Optional<T> object, Map<String, Object> contextualParameters) Evaluate the currentDisableConditionagainst the given valuesvoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.model.disableconditions.AbstractExternalDisableCondition
getId, getName, getOperator, getValue, hideIfDisabled, init, isExternal
-
Constructor Details
-
NotShared2DisableCondition
public NotShared2DisableCondition()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
evaluate
public <T> boolean evaluate(ModelItem definition, String dataPath, Optional<String> oldDataPath, Map<String, Object> values, Optional<T> object, Map<String, Object> contextualParameters) Description copied from interface:DisableConditionEvaluate the currentDisableConditionagainst the given values- Specified by:
evaluatein interfaceDisableCondition- Type Parameters:
T- Type of object holding the data to evaluate- Parameters:
definition- the definition of the evaluated datadataPath- the path of the evaluated data. Needed to get the value to compare as condition ids are relative to this oneoldDataPath- the old path of the evaluated data. Needed to get stored value if the data has been movedvalues- values to check conditions onobject- the object holding the data to evaluate and the condition valuecontextualParameters- the contextual parameters- Returns:
trueif the disable condition istrue,falseotherwise
-