Class JobDefinition
java.lang.Object
com.inet.taskplanner.server.api.common.AbstractDefinition<JobDefinition>
com.inet.taskplanner.server.api.job.JobDefinition
Definition of a job for a
TaskDefinition
with settings required for the job. A job does some work and often produces
some Result
s which is than passed to the adjacent ResultAction
s.
Jobs are created from the definition roughly as:
JobDefinition
——extensionName
—⟶JobFactory
——createFrom()
—⟶Job
To map from a JobDefinition
to a JobFactory
the method AbstractDefinition.getExtensionName()
has to return a name
for which a JobFactory
is registered in the ServerPluginManager
.
This definition also includes settings for the job, i.e. for a report-job the path to the rpt-file. The extension name
and the valid properties are usually defined and documented in the corresponding JobFactory
.
- Since:
- taskplanner 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionJobDefinition
(String extensionName) Creates a new JobDefinition instance.JobDefinition
(String extensionName, @Nullable Map<String, String> properties) Creates a new JobDefinition instance. -
Method Summary
Modifier and TypeMethodDescriptionMakes a deep copy of this definition.boolean
@Nullable ConditionDefinition
Get the condition of this Job.int
hashCode()
void
setCondition
(@Nullable ConditionDefinition condition) Sets the condition of this JobDefinition.Methods inherited from class com.inet.taskplanner.server.api.common.AbstractDefinition
copyDefinitions, getExtensionName, getProperties, getProperty, getUid, removeProperty, setProperty, setUid
-
Constructor Details
-
JobDefinition
Creates a new JobDefinition instance.- Parameters:
extensionName
- the unique extensionName, there must be aJobFactory
for this extensionName.- Since:
- taskplanner 3.0
-
JobDefinition
Creates a new JobDefinition instance.- Parameters:
properties
- the initial properties to be set,null
will have no effectextensionName
- the unique extensionName, there must be aJobFactory
for this extensionName.- Since:
- taskplanner 3.0
-
-
Method Details
-
getCondition
Get the condition of this Job.- Returns:
- the condition of this job, can be null.
- Since:
- taskplanner 3.0
-
setCondition
Sets the condition of this JobDefinition. The condition defines if the result of this job must be handled or not.- Parameters:
condition
- the condition to set- Since:
- taskplanner 3.0
-
copyDefinition
Makes a deep copy of this definition.- Specified by:
copyDefinition
in classAbstractDefinition<JobDefinition>
- Returns:
- a deep copy of this definition.
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractDefinition<JobDefinition>
-
equals
- Overrides:
equals
in classAbstractDefinition<JobDefinition>
-