Class FieldCondition
- java.lang.Object
-
- com.inet.taskplanner.server.api.field.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FieldCondition.OP
The operation on the values to be appliedstatic class
FieldCondition.TYPE
The type of a field condition
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldCondition(FieldCondition.TYPE type)
Creates the field condition for the specified type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FieldCondition
disabled(Field field, FieldCondition.OP operation, java.lang.String value)
Creates a disabled field condition.protected FieldCondition.TYPE
getType()
Returns the type of the condition like e.g.protected void
setType(FieldCondition.TYPE type)
Sets the type of the condition like e.g.static FieldCondition
visible(Field field, FieldCondition.OP operation, java.lang.String value)
Creates a visible field condition.
-
-
-
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 fromoperation
- the operation to be appliedvalue
- 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 fromoperation
- the operation to be appliedvalue
- the value the field must have set- Returns:
- the created field condition
- Since:
- taskplanner 3.0
-
-