Class VoidRelativeDisableCondition

java.lang.Object
org.ametys.runtime.model.disableconditions.AbstractRelativeDisableCondition
org.ametys.runtime.model.disableconditions.VoidRelativeDisableCondition
All Implemented Interfaces:
DisableCondition

Disable condition referencing a relative model item. The condition can not be evaluated on a stored object. It can evaluated only on a Map of values
  • Constructor Details

    • VoidRelativeDisableCondition

      Creates a disable condition
      Parameters:
      name - The condition name
      operator - comparison operator of the condition ('eq'...)
      value - value to compare to
    • VoidRelativeDisableCondition

      public VoidRelativeDisableCondition(String name, DisableCondition.OPERATOR operator, String value, boolean hideIfDisabled)
      Creates a disable condition
      Parameters:
      name - The condition name
      operator - comparison operator of the condition ('eq'...)
      value - value to compare to
      hideIfDisabled - true to hide the item if the condition is verified, false otherwise
  • Method Details

    • 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 class AbstractRelativeDisableCondition
      Type Parameters:
      T - Type of object holding the data to evaluate
      Parameters:
      conditionDataPath - the absolute data path of the condition
      oldConditionDataPath - the absolute old data path of the condition
      object - the object holding the data to evaluate and the condition value
      contextualParameters - the contextual parameters
      Returns:
      the condition value from data stored in the object