public class JobTemplate extends java.lang.Object implements JobOperations
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DEPLOYMENTS_URI |
protected java.util.Map<java.lang.String,java.net.URI> |
resources
Holds discovered URLs of the API.
|
protected org.springframework.web.client.RestTemplate |
restTemplate
A template used for http interaction.
|
Modifier and Type | Method and Description |
---|---|
JobDefinitionResource |
createJob(java.lang.String name,
java.lang.String definition,
java.lang.Boolean deploy)
Create a new Job, optionally deploying it.
|
void |
deploy(java.lang.String name)
Deploy an already created resource.
|
void |
deployAll()
Deploy all the resources known to the system.
|
void |
deployJob(java.lang.String name,
java.lang.String dateFormat,
java.lang.String numberFormat,
java.lang.Boolean makeUnique)
Deploy an already created job with additional JobParameters.
|
void |
destroy(java.lang.String name)
Destroy an existing resource.
|
void |
destroyAll()
Undeploy all the resources known to the system.
|
JobDefinitionResource.Page |
list()
List jobs known to the system.
|
java.lang.String |
toString() |
void |
undeploy(java.lang.String name)
Undeploy a deployed resource, retaining its definition.
|
void |
undeployAll()
Undeploy all the resources known to the system.
|
protected static final java.lang.String DEPLOYMENTS_URI
protected org.springframework.web.client.RestTemplate restTemplate
protected java.util.Map<java.lang.String,java.net.URI> resources
public JobDefinitionResource createJob(java.lang.String name, java.lang.String definition, java.lang.Boolean deploy)
JobOperations
createJob
in interface JobOperations
public void destroy(java.lang.String name)
ResourceOperations
destroy
in interface ResourceOperations
public void deployJob(java.lang.String name, java.lang.String dateFormat, java.lang.String numberFormat, java.lang.Boolean makeUnique)
JobOperations
deployJob
in interface JobOperations
public void deploy(java.lang.String name)
ResourceOperations
deploy
in interface ResourceOperations
public void undeploy(java.lang.String name)
ResourceOperations
undeploy
in interface ResourceOperations
public JobDefinitionResource.Page list()
JobOperations
list
in interface JobOperations
public void undeployAll()
ResourceOperations
undeployAll
in interface ResourceOperations
public void deployAll()
ResourceOperations
deployAll
in interface ResourceOperations
public void destroyAll()
ResourceOperations
destroyAll
in interface ResourceOperations
public java.lang.String toString()
toString
in class java.lang.Object