public class JobSpecification extends AstNode
Constructor and Description |
---|
JobSpecification(java.lang.String jobDefinitionText,
JobNode jobNode,
ArgumentNode[] globalOptions) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format()
Pretty print the text for this job specification, including appropriate
newlines and indentation.
|
java.util.Map<java.lang.String,java.lang.String> |
getGlobalOptionsMap() |
JobDefinition |
getJobDefinition(java.lang.String jobName) |
java.util.List<JobDefinition> |
getJobDefinitions()
A shortcut (avoiding traversing the tree) that returns the list
of all job definitions inlined somewhere in this AST.
|
java.lang.String |
getJobDefinitionText() |
JobNode |
getJobNode() |
java.util.List<JobReference> |
getJobReferences()
A shortcut (avoiding traversing the tree) that returns the list
of all job references somewhere in this AST (references in
transitions do not count).
|
java.lang.String |
stringify(boolean includePositionInfo) |
Graph |
toGraph() |
java.lang.String |
toXML(java.lang.String batchJobId) |
java.lang.String |
toXML(java.lang.String batchJobId,
boolean prettyPrint) |
void |
validate(JobDefinitionRepository jobDefinitionRepository)
Performs validation of the AST.
|
format, getEndPos, getStartPos, stringify
public JobSpecification(java.lang.String jobDefinitionText, JobNode jobNode, ArgumentNode[] globalOptions)
public java.util.Map<java.lang.String,java.lang.String> getGlobalOptionsMap()
public java.lang.String stringify(boolean includePositionInfo)
public java.lang.String getJobDefinitionText()
public JobNode getJobNode()
public java.util.List<JobDefinition> getJobDefinitions()
public java.util.List<JobReference> getJobReferences()
public void validate(JobDefinitionRepository jobDefinitionRepository)
jobDefinitionRepository
- a repository to check job definitions againstJobSpecificationException
- if validation failspublic Graph toGraph()
public java.lang.String toXML(java.lang.String batchJobId)
batchJobId
- the id that will be inserted into the XML document for the batch:job elementpublic java.lang.String toXML(java.lang.String batchJobId, boolean prettyPrint)
batchJobId
- the id that will be inserted into the XML document for the batch:job elementprettyPrint
- determine if the XML should be human readable.public JobDefinition getJobDefinition(java.lang.String jobName)
public java.lang.String format()