Class ConditionDefinition
- java.lang.Object
-
- com.inet.taskplanner.server.api.job.ConditionDefinition
-
@JsonData public final class ConditionDefinition extends java.lang.ObjectRepresents a condition for ajobwhich decides whether the result of the job must be processed byresultActionsor 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 thejobinstance.- Since:
- taskplanner 3.0
-
-
Constructor Summary
Constructors Constructor Description ConditionDefinition()Creates a new ConditionDefinition instance.ConditionDefinition(java.util.Map<java.lang.String,java.lang.String> properties)Creates a new ConditionDefinition instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConditionDefinitioncopyDefinition()Makes a deep copy of this condition definition.booleanequals(java.lang.Object obj)java.util.Map<java.lang.String,java.lang.String>getProperties()Get the properties object from this condition definition.java.lang.StringgetProperty(java.lang.String key)Returns the value of a property of this definitioninthashCode()java.lang.StringremoveProperty(java.lang.String key)Removes a property of this definitionvoidsetProperty(java.lang.String key, java.lang.String value)Sets a property, defined by the key, to this definition
-
-
-
Constructor Detail
-
ConditionDefinition
public ConditionDefinition()
Creates a new ConditionDefinition instance.- Since:
- taskplanner 3.0
-
ConditionDefinition
public ConditionDefinition(@Nullable java.util.Map<java.lang.String,java.lang.String> properties)Creates a new ConditionDefinition instance.- Parameters:
properties- the initial properties to be set,nullwill have no effect- Since:
- taskplanner 3.0
-
-
Method Detail
-
getProperties
@Nonnull public final java.util.Map<java.lang.String,java.lang.String> getProperties()
Get the properties object from this condition definition.- Returns:
- properties for this definition.
- Since:
- taskplanner 3.0
-
getProperty
public java.lang.String getProperty(java.lang.String key)
Returns the value of a property of this definition- Parameters:
key- the key of the property- Returns:
- the value or
nullif there is no such property - Since:
- taskplanner 3.0
-
setProperty
public void setProperty(@Nullable java.lang.String key, @Nullable java.lang.String value)Sets a property, defined by the key, to this definition- Parameters:
key- the key of the propertyvalue- the value to be set,nullwill not remove but setnull- Since:
- taskplanner 3.0
-
removeProperty
public java.lang.String removeProperty(java.lang.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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-