Class ConditionDefinition

java.lang.Object
com.inet.taskplanner.server.api.job.ConditionDefinition

@JsonData public final class ConditionDefinition extends Object
Represents a condition for a job which decides whether the result of the job must be processed by resultActions or not.

A condition is identified with its key. The available conditions for a Job are included in AbstractFactory.getInformation(GUID). When a job was executed, the condition is checked in the job instance.

Since:
taskplanner 3.0
  • Constructor Details

    • ConditionDefinition

      public ConditionDefinition()
      Creates a new ConditionDefinition instance.
      Since:
      taskplanner 3.0
    • ConditionDefinition

      public ConditionDefinition(@Nullable Map<String,String> properties)
      Creates a new ConditionDefinition instance.
      Parameters:
      properties - the initial properties to be set, null will have no effect
      Since:
      taskplanner 3.0
  • Method Details

    • getProperties

      @Nonnull public final Map<String,String> getProperties()
      Get the properties object from this condition definition.
      Returns:
      properties for this definition.
      Since:
      taskplanner 3.0
    • getProperty

      public String getProperty(String key)
      Returns the value of a property of this definition
      Parameters:
      key - the key of the property
      Returns:
      the value or null if there is no such property
      Since:
      taskplanner 3.0
    • setProperty

      public void setProperty(@Nullable String key, @Nullable String value)
      Sets a property, defined by the key, to this definition
      Parameters:
      key - the key of the property
      value - the value to be set, null will not remove but set null
      Since:
      taskplanner 3.0
    • removeProperty

      public String removeProperty(String key)
      Removes a property of this definition
      Parameters:
      key - the key of the property
      Returns:
      the previously set value
      Since:
      taskplanner 3.0
    • copyDefinition

      @Nonnull public ConditionDefinition copyDefinition()
      Makes a deep copy of this condition definition.
      Returns:
      a copy of this object
      Since:
      taskplanner 3.0
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object