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 the settings required for the job. A job does some work and
often produces results that are then passed to the adjacent result actions.
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 ConditionDefinitionGets the condition of this job.inthashCode()voidsetCondition(@Nullable ConditionDefinition condition) Sets the condition of this job definition.Methods inherited from class AbstractDefinition
copyDefinitions, getExtensionName, getProperties, getProperty, getUid, removeProperty, setProperty, setUid
-
Constructor Details
-
JobDefinition
Creates a new JobDefinition instance.- Parameters:
extensionName- the unique extension name; there must be aJobFactoryfor this extension name.- Since:
- taskplanner 3.0
-
JobDefinition
Creates a new JobDefinition instance.- Parameters:
extensionName- the unique extension name; there must be aJobFactoryfor this extension name.properties- the initial properties to be set;nullhas no effect- Since:
- taskplanner 3.0
-
-
Method Details
-
getCondition
Gets the condition of this job. The condition defines whether the result of this job must be handled.- Returns:
- the condition of this job, or null
- Since:
- taskplanner 3.0
-
setCondition
Sets the condition of this job definition. The condition defines whether the result of this job must be handled.- Parameters:
condition- the condition to set, can be null- Since:
- taskplanner 3.0
-
copyDefinition
Makes a deep copy of this definition.- Specified by:
copyDefinitionin classAbstractDefinition<JobDefinition>- Returns:
- a deep copy of this definition.
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractDefinition<JobDefinition>
-
equals
- Overrides:
equalsin classAbstractDefinition<JobDefinition>
-