Class ConditionDefinition
- java.lang.Object
-
- com.inet.taskplanner.server.api.job.ConditionDefinition
-
@JsonData public final class ConditionDefinition extends java.lang.Object
Represents a condition for ajob
which decides whether the result of the job must be processed byresultActions
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 thejob
instance.- 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 ConditionDefinition
copyDefinition()
Makes a deep copy of this condition definition.boolean
equals(java.lang.Object obj)
java.util.Map<java.lang.String,java.lang.String>
getProperties()
Get the properties object from this condition definition.java.lang.String
getProperty(java.lang.String key)
Returns the value of a property of this definitionint
hashCode()
java.lang.String
removeProperty(java.lang.String key)
Removes a property of this definitionvoid
setProperty(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,null
will 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
null
if 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,null
will 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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-