public class WS extends Object implements WSInterface
| Constructor and Description |
|---|
WS() |
| Modifier and Type | Method and Description |
|---|---|
Alive |
alive()
Get information about the engine
|
void |
checkIfLocal() |
boolean |
deleteBatch(String batchId)
Delete all jobs with the given batchId
|
boolean |
deleteClient(String clientId)
Delete a client
|
boolean |
deleteJob(String jobId)
Delete a single job
|
List<Job> |
getBatch(String batchId)
Get all jobs with the given batchId
|
Client |
getClient(String clientId)
Get a client
|
List<Client> |
getClients()
List all clients
|
DataType |
getDataType(String dataTypeId)
Get a single data type
|
Map<String,String> |
getDataTypes()
Get all data types
|
String |
getEndpoint()
Return which Pipeline 2 Web API endpoint is currently used
|
Job |
getJob(String jobId,
long msgSeq)
Get a single job
|
String |
getJobLog(String jobId)
Get the log file for a job
|
File |
getJobResultAsFile(String jobId,
String href)
Get results from a job as a File
|
InputStream |
getJobResultAsStream(String jobId,
String href)
Get results from a job as an InputStream
|
List<Job> |
getJobs()
Get all jobs
|
List<Property> |
getProperties()
Get the properties used in the Pipeline 2 engine
|
JobQueue |
getQueue()
Get the job queue
|
Script |
getScript(String scriptId)
Get a single script
|
List<Script> |
getScripts()
Get all scripts
|
String |
getShutDownKey()
Get the key meant to be used when invoking /admin/halt
|
JobSizes |
getSizes()
Get the size used to store each job
|
String |
getUsername()
Get the username used to authenticate with the Pipeline 2 Web API
|
boolean |
halt()
Stop the web service
|
JobQueue |
moveDownQueue(String jobId)
Move job down the queue
|
JobQueue |
moveUpQueue(String jobId)
Move job up the queue
|
Job |
postJob(Job job)
Submit a job to the engine
|
void |
setCredentials(String username,
String secret)
Set the credentials to use for the Pipeline 2 Web API.
|
void |
setEndpoint(String endpoint)
Set which Pipeline 2 Web API endpoint to use.
|
void |
setShutDownKey(String shutDownKey)
Set the key used when invoking /admin/halt to shut down the engine.
|
public void setEndpoint(String endpoint)
setEndpoint in interface WSInterface
endpoint - the endpoint to usepublic String getEndpoint()
WSInterfacegetEndpoint in interface WSInterface
public void setCredentials(String username, String secret)
setCredentials in interface WSInterface
username - the username to usesecret - the secret to usepublic String getUsername()
WSInterfacegetUsername in interface WSInterface
public void setShutDownKey(String shutDownKey)
setShutDownKey in interface WSInterface
shutDownKey - the shutdown key to usepublic String getShutDownKey()
WSInterfacegetShutDownKey in interface WSInterface
public Alive alive()
WSInterfacealive in interface WSInterface
public boolean halt()
WSInterfacehalt in interface WSInterface
public List<Property> getProperties()
WSInterfacegetProperties in interface WSInterface
public List<Script> getScripts()
WSInterfacegetScripts in interface WSInterface
public Script getScript(String scriptId)
WSInterfacegetScript in interface WSInterface
scriptId - the ID of the scriptpublic Map<String,String> getDataTypes()
WSInterfacegetDataTypes in interface WSInterface
public DataType getDataType(String dataTypeId)
WSInterfacegetDataType in interface WSInterface
dataTypeId - the ID of the datatypepublic List<Job> getJobs()
WSInterfacegetJobs in interface WSInterface
public Job getJob(String jobId, long msgSeq)
WSInterfacegetJob in interface WSInterface
jobId - the job IDmsgSeq - the number of the first message to includepublic Job postJob(Job job)
WSInterfacepostJob in interface WSInterface
job - the job to postpublic boolean deleteJob(String jobId)
WSInterfacedeleteJob in interface WSInterface
jobId - the job IDpublic JobSizes getSizes()
WSInterfacegetSizes in interface WSInterface
public List<Job> getBatch(String batchId)
WSInterfacegetBatch in interface WSInterface
batchId - the batch IDpublic boolean deleteBatch(String batchId)
WSInterfacedeleteBatch in interface WSInterface
batchId - the batch IDpublic String getJobLog(String jobId)
WSInterfacegetJobLog in interface WSInterface
jobId - the job IDpublic InputStream getJobResultAsStream(String jobId, String href)
WSInterfacegetJobResultAsStream in interface WSInterface
jobId - the job IDhref - the relative path to the desired job result filepublic File getJobResultAsFile(String jobId, String href)
WSInterfacegetJobResultAsFile in interface WSInterface
jobId - the job IDhref - the relative path to the desired job result filepublic JobQueue getQueue()
WSInterfacegetQueue in interface WSInterface
public JobQueue moveUpQueue(String jobId)
WSInterfacemoveUpQueue in interface WSInterface
jobId - the job IDpublic JobQueue moveDownQueue(String jobId)
WSInterfacemoveDownQueue in interface WSInterface
jobId - the job IDpublic List<Client> getClients()
WSInterfacegetClients in interface WSInterface
public Client getClient(String clientId)
WSInterfacegetClient in interface WSInterface
clientId - the client IDpublic boolean deleteClient(String clientId)
WSInterfacedeleteClient in interface WSInterface
clientId - the client IDpublic void checkIfLocal()
Copyright © 2012–2022 The DAISY Consortium. All rights reserved.