public interface JobService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
JOB_DESCRIPTOR |
static java.lang.String |
JOB_LOG |
static java.lang.String |
JOB_PARAMETER |
| Modifier and Type | Method and Description |
|---|---|
SJobDescriptor |
createJobDescriptor(SJobDescriptor sJobDescriptor,
long tenantId)
Create a new job descriptor for a specific tenant
|
SJobLog |
createJobLog(SJobLog sJobLog)
Create a new job log for a specific tenant
|
SJobParameter |
createJobParameter(SJobParameter sJobParameter,
long tenantId,
long jobDescriptorId)
Create a new job parameter for a specific tenant
|
java.util.List<SJobParameter> |
createJobParameters(java.util.List<SJobParameter> parameters,
long tenantId,
long jobDescriptorId)
Create new job parameters for a specific tenant
|
void |
deleteAllJobDescriptors()
Delete all job descriptors for a specific tenant
|
void |
deleteJobDescriptor(long id)
Delete the specified job descriptor
|
void |
deleteJobDescriptor(SJobDescriptor sJobDescriptor)
Delete the specified job descriptor
|
void |
deleteJobDescriptorByJobName(java.lang.String jobName)
Delete a job descriptor corresponding to the given job name
|
void |
deleteJobLog(long id)
Delete the specified job log
|
void |
deleteJobLog(SJobLog sJobLog)
Delete the specified job log
|
void |
deleteJobLogs(long jobDescriptorId)
Delete all
SJobLog of a specific SJobDescriptor |
void |
deleteJobParameter(long id)
Delete the specified job parameter
|
void |
deleteJobParameter(SJobParameter sJobParameter)
Delete the specified job parameter
|
java.util.List<SFailedJob> |
getFailedJobs(int startIndex,
int maxResults)
Get list of failed jobs
|
SJobDescriptor |
getJobDescriptor(long id)
Get a specific job descriptor
|
SJobLog |
getJobLog(long id)
Get a specific job log
|
java.util.List<SJobLog> |
getJobLogs(long jobDescriptorId,
int fromIndex,
int maxResults)
Get all
SJobLog of a specific SJobDescriptor |
SJobParameter |
getJobParameter(long id)
Get a specific job parameter
|
java.util.List<SJobParameter> |
getJobParameters(java.lang.Long jobDescriptorId)
get parameters of a job
|
long |
getNumberOfJobDescriptors(QueryOptions queryOptions)
Get total number of job descriptors
|
long |
getNumberOfJobLogs(QueryOptions queryOptions)
Get total number of job logs
|
void |
logJobError(java.lang.Throwable jobException,
java.lang.Long jobDescriptorId)
log an error on a job
|
java.util.List<SJobDescriptor> |
searchJobDescriptors(QueryOptions queryOptions)
Search all job descriptors according to specific criteria
|
java.util.List<SJobLog> |
searchJobLogs(QueryOptions queryOptions)
Search all job logs according to specific criteria
|
java.util.List<SJobParameter> |
setJobParameters(long tenantId,
long jobDescriptorId,
java.util.List<SJobParameter> parameters)
Delete jobs parameters corresponding to tenant and job descriptor, if exist.
|
void |
updateJobLog(SJobLog jobLog,
EntityUpdateDescriptor descriptor)
Update a
SJobLog |
static final java.lang.String JOB_DESCRIPTOR
static final java.lang.String JOB_PARAMETER
static final java.lang.String JOB_LOG
SJobDescriptor createJobDescriptor(SJobDescriptor sJobDescriptor, long tenantId) throws SJobDescriptorCreationException
sJobDescriptor - JobDescriptor to createtenantId - Identifier of tenantSJobDescriptorCreationExceptionvoid deleteJobDescriptor(long id)
throws SJobDescriptorNotFoundException,
SJobDescriptorReadException,
SJobDescriptorDeletionException
id - Identifier of job descriptor to deleteSJobDescriptorReadExceptionSJobDescriptorNotFoundExceptionSJobDescriptorDeletionExceptionvoid deleteJobDescriptor(SJobDescriptor sJobDescriptor) throws SJobDescriptorDeletionException
sJobDescriptor - JobDescriptor to deleteSJobDescriptorDeletionExceptionvoid deleteAllJobDescriptors()
throws SJobDescriptorDeletionException
SJobDescriptorDeletionExceptionvoid deleteJobDescriptorByJobName(java.lang.String jobName)
throws SJobDescriptorDeletionException
jobName - name of job we want the jobDsecriptor to be deletedSJobDescriptorDeletionExceptionSJobDescriptor getJobDescriptor(long id) throws SJobDescriptorReadException
id - Identifier of job descriptorSJobDescriptor corresponding to the identifierSJobDescriptorReadExceptionlong getNumberOfJobDescriptors(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - a map of specific parameters of a querySBonitaReadExceptionjava.util.List<SJobDescriptor> searchJobDescriptors(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - a map of specific parameters of a querySBonitaReadExceptionjava.util.List<SJobParameter> createJobParameters(java.util.List<SJobParameter> parameters, long tenantId, long jobDescriptorId) throws SJobParameterCreationException
parameters - JobParameters to createtenantId - Identifier of tenantjobDescriptorId - Identifier of job descriptorSJobParameterCreationExceptionjava.util.List<SJobParameter> setJobParameters(long tenantId, long jobDescriptorId, java.util.List<SJobParameter> parameters) throws SJobParameterCreationException
tenantId - jobDescriptorId - parameters - SJobParameterCreationExceptionSJobParameter createJobParameter(SJobParameter sJobParameter, long tenantId, long jobDescriptorId) throws SJobParameterCreationException
sJobParameter - JobParameter to createtenantId - Identifier of tenantjobDescriptorId - Identifier of job descriptorSJobParameterCreationExceptionvoid deleteJobParameter(long id)
throws SJobParameterNotFoundException,
SJobParameterReadException,
SJobParameterDeletionException
id - Identifier of job parameter to deleteSJobParameterReadExceptionSJobParameterNotFoundExceptionSJobParameterDeletionExceptionvoid deleteJobParameter(SJobParameter sJobParameter) throws SJobParameterDeletionException
sJobParameter - JobParameter to deleteSJobParameterDeletionExceptionSJobParameter getJobParameter(long id) throws SJobParameterNotFoundException, SJobParameterReadException
id - Identifier of job parameterSJobParameterReadExceptionSJobParameterNotFoundExceptionjava.util.List<SJobParameter> getJobParameters(java.lang.Long jobDescriptorId) throws SBonitaReadException
SBonitaReadExceptionSJobLog createJobLog(SJobLog sJobLog) throws SJobLogCreationException
sJobLog - JobLog to createSJobLogCreationExceptionvoid deleteJobLog(long id)
throws SJobLogDeletionException,
SBonitaReadException
id - Identifier of job log to deleteSBonitaReadExceptionSJobLogDeletionExceptionvoid deleteJobLog(SJobLog sJobLog) throws SJobLogDeletionException
sJobLog - JobLog to deleteSJobLogDeletionExceptionSJobLog getJobLog(long id) throws SBonitaReadException
id - Identifier of job logSBonitaReadExceptionlong getNumberOfJobLogs(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - a map of specific parameters of a querySBonitaReadExceptionjava.util.List<SJobLog> searchJobLogs(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - a map of specific parameters of a querySBonitaReadExceptionjava.util.List<SFailedJob> getFailedJobs(int startIndex, int maxResults) throws SFailedJobReadException
startIndex - maxResults - SFailedJobReadExceptionvoid updateJobLog(SJobLog jobLog, EntityUpdateDescriptor descriptor) throws SJobLogUpdatingException
SJobLogjobLog - The log to updatedescriptor - SJobLogUpdatingExceptionvoid deleteJobLogs(long jobDescriptorId)
throws SJobLogDeletionException,
SBonitaReadException
SJobLog of a specific SJobDescriptorjobDescriptorId - The identifier of the SJobDescriptorSBonitaReadExceptionSJobLogDeletionExceptionjava.util.List<SJobLog> getJobLogs(long jobDescriptorId, int fromIndex, int maxResults) throws SBonitaReadException
SJobLog of a specific SJobDescriptorjobDescriptorId - The identifier of the SJobDescriptorfromIndex - The index of the first element of the listmaxResults - The nulber max of elements of the listSJobLogSBonitaReadExceptionvoid logJobError(java.lang.Throwable jobException,
java.lang.Long jobDescriptorId)
throws SBonitaReadException,
SJobLogUpdatingException,
SJobLogCreationException,
SJobDescriptorReadException
jobException - the exceptionjobDescriptorId - the id of the jobSBonitaReadExceptionSJobLogUpdatingExceptionSJobLogCreationExceptionSJobDescriptorReadException