Class FieldCondition

  • Direct Known Subclasses:
    DisableCondition, VisibleCondition

    @JsonData
    public abstract class FieldCondition
    extends java.lang.Object
    Defines a condition for a field, e.g. visibility according to the value of another field
    Since:
    taskplanner 3.0
    • Constructor Detail

      • FieldCondition

        protected FieldCondition​(FieldCondition.TYPE type)
        Creates the field condition for the specified type
        Parameters:
        type - the type of the condition
        Since:
        taskplanner 3.0
    • Method Detail

      • getType

        protected FieldCondition.TYPE getType()
        Returns the type of the condition like e.g. FieldType.visible
        Returns:
        the type of the condition
        Since:
        taskplanner 3.0
      • setType

        protected void setType​(FieldCondition.TYPE type)
        Sets the type of the condition like e.g. FieldType.visible
        Parameters:
        type - the type of the condition
        Since:
        taskplanner 3.0
      • visible

        public static FieldCondition visible​(Field field,
                                             FieldCondition.OP operation,
                                             java.lang.String value)
        Creates a visible field condition. If the condition is fulfilled, the field the condition is set to, will be visible.
        Parameters:
        field - the field the value is checked from
        operation - the operation to be applied
        value - the value the field must have set
        Returns:
        the created field condition
        Since:
        taskplanner 3.0
      • disabled

        public static FieldCondition disabled​(Field field,
                                              FieldCondition.OP operation,
                                              java.lang.String value)
        Creates a disabled field condition. If the condition is fulfilled, the field the condition is set to, will be disabled.
        Parameters:
        field - the field the value is checked from
        operation - the operation to be applied
        value - the value the field must have set
        Returns:
        the created field condition
        Since:
        taskplanner 3.0