Interface JobsManagementService
-
- All Known Implementing Classes:
JobsManagementServiceImpl
public interface JobsManagementService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancelJob(java.lang.String jobId)
Cancels the job with the specified ID.Job
createJob(Job job)
This method creates a database entity.Job
createJob(java.util.LinkedHashMap<java.lang.String,java.lang.Object> jobAsMap)
This method creates a database entity from a map-representation.Job
decrementJob(java.lang.String jobId, int step)
This method save an updates of database entity.JobRepository
getRepository()
Job
incrementJob(java.lang.String jobId, int step)
This method save an updates of database entity.void
removeJobAndClean(java.lang.String jobId)
This method removes a database entity and clean all relationships from another entities.void
removeJobsByIds(java.util.ArrayList<java.lang.String> jobsIds)
This method removes a list of database entities.Job
saveJob(Job job)
This method save an updates of database entity.Job
saveJob(java.util.LinkedHashMap<java.lang.String,java.lang.Object> jobAsMap)
This method save an updates of database entity.co.mastermindcms.modules.beans.SearchResponse
searchJobs(co.mastermindcms.modules.beans.SearchRequest request)
This method does search requests and returns data as list.co.mastermindcms.modules.beans.SearchResponse
searchJobs(java.util.LinkedHashMap<java.lang.String,java.lang.Object> request)
This method does search requests and returns data as list.void
setUnfinishedJobsToFailed()
This method updates a list of database entities.Job
startJob(java.lang.String type, int total)
This method save an updates of database entity.Job
toCanceled(java.lang.String jobId)
This method save an updates of database entity.Job
toDone(java.lang.String jobId)
This method save an updates of database entity.Job
toFailed(java.lang.String jobId)
This method save an updates of database entity.Job
updateProgress(java.lang.String jobId, int progress)
This method save an updates of database entity.
-
-
-
Method Detail
-
getRepository
JobRepository getRepository()
-
searchJobs
co.mastermindcms.modules.beans.SearchResponse searchJobs(java.util.LinkedHashMap<java.lang.String,java.lang.Object> request)
This method does search requests and returns data as list.- Parameters:
request
- JSON-object of request contains an instructions for search queries- Returns:
- data transport entities as list
-
searchJobs
co.mastermindcms.modules.beans.SearchResponse searchJobs(co.mastermindcms.modules.beans.SearchRequest request)
This method does search requests and returns data as list.- Parameters:
request
- JSON-object of request contains an instructions for search queries- Returns:
- data transport entities as list
-
createJob
Job createJob(java.util.LinkedHashMap<java.lang.String,java.lang.Object> jobAsMap)
This method creates a database entity from a map-representation.- Parameters:
jobAsMap
- map-representation of database entity- Returns:
- created instance of database entity
-
createJob
Job createJob(Job job)
This method creates a database entity.- Parameters:
job
- database entity- Returns:
- created instance of database entity
-
saveJob
Job saveJob(java.util.LinkedHashMap<java.lang.String,java.lang.Object> jobAsMap)
This method save an updates of database entity.- Parameters:
jobAsMap
- map-representation of database entity- Returns:
- saved instance of database entity
-
saveJob
Job saveJob(Job job)
This method save an updates of database entity.- Parameters:
job
- database entity for a update- Returns:
- saved instance of database entity
-
startJob
Job startJob(java.lang.String type, int total)
This method save an updates of database entity.- Parameters:
type
- database entity type for a updatetotal
- count of iterations- Returns:
- saved instance of database entity
-
cancelJob
void cancelJob(java.lang.String jobId)
Cancels the job with the specified ID.- Parameters:
jobId
- the ID of the job to be canceled
-
toCanceled
Job toCanceled(java.lang.String jobId)
This method save an updates of database entity.- Parameters:
jobId
- database entity id for a update- Returns:
- saved instance of database entity
-
toDone
Job toDone(java.lang.String jobId)
This method save an updates of database entity.- Parameters:
jobId
- database entity id for a update- Returns:
- saved instance of database entity
-
updateProgress
Job updateProgress(java.lang.String jobId, int progress)
This method save an updates of database entity.- Parameters:
jobId
- database entity id for a updateprogress
- percentage of job is done- Returns:
- saved instance of database entity
-
incrementJob
Job incrementJob(java.lang.String jobId, int step)
This method save an updates of database entity.- Parameters:
jobId
- database entity id for a updatestep
- step of incremental- Returns:
- saved instance of database entity
-
decrementJob
Job decrementJob(java.lang.String jobId, int step)
This method save an updates of database entity.- Parameters:
jobId
- database entity id for a updatestep
- step of decremental- Returns:
- saved instance of database entity
-
toFailed
Job toFailed(java.lang.String jobId)
This method save an updates of database entity.- Parameters:
jobId
- database entity id for a update- Returns:
- saved instance of database entity
-
setUnfinishedJobsToFailed
void setUnfinishedJobsToFailed()
This method updates a list of database entities.
-
removeJobsByIds
void removeJobsByIds(java.util.ArrayList<java.lang.String> jobsIds)
This method removes a list of database entities.- Parameters:
jobsIds
- the list of database entities which will be removed
-
removeJobAndClean
void removeJobAndClean(java.lang.String jobId)
This method removes a database entity and clean all relationships from another entities.- Parameters:
jobId
- identification for database entity which will be removed
-
-