Package de.dlr.proseo.ordermgr.rest
Class OrderjobControllerImpl
java.lang.Object
de.dlr.proseo.ordermgr.rest.OrderjobControllerImpl
- All Implemented Interfaces:
OrderjobController
Controller for the prosEO Order Manager, implements the services required to manage jobs. Provides methods for retrieving and
counting jobs, as well as finding the index of a job within an ordered list. The class also includes utility methods for creating
JPA queries.
- Author:
- Ernst Melchinger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> Retrieves the number of production planner jobs based on the specified states and order ID.getJobs(Long orderId, Integer recordFrom, Integer recordTo, Boolean logs, String[] states, String[] orderBy) Retrieves production planner jobs, optionally filtered by job state and/or order ID.org.springframework.http.ResponseEntity<String> Retrieves the index of a job in an ordered list of all jobs of an order.
-
Constructor Details
-
OrderjobControllerImpl
public OrderjobControllerImpl()
-
-
Method Details
-
getJobs
@Transactional(isolation=REPEATABLE_READ, readOnly=true) public org.springframework.http.ResponseEntity<List<RestJob>> getJobs(Long orderId, Integer recordFrom, Integer recordTo, Boolean logs, String[] states, String[] orderBy) Retrieves production planner jobs, optionally filtered by job state and/or order ID. At the moment the states parameter accepts COMPLETED or NON-COMPLETED. It is prepared to accept a list of job states for selection.- Specified by:
getJobsin interfaceOrderjobController- Parameters:
orderId- The order ID to filter by.recordFrom- The first record of the filtered and ordered result to return.recordTo- The last record of the filtered and ordered result to return.logs- Whether or not logs are included in the REST job step.states- The grouped job states (COMPLETED or NON-COMPLETED) to filter by.orderBy- An array of strings containing a column name and an optional sort direction (ASC/DESC), separated by whitespace.- Returns:
- A list of JSON objects describing jobs.
-
countJobs
@Transactional(isolation=REPEATABLE_READ, readOnly=true) public org.springframework.http.ResponseEntity<String> countJobs(String[] states, Long orderId) Retrieves the number of production planner jobs based on the specified states and order ID. At the moment the states parameter accepts COMPLETED or NON-COMPLETED. It is prepared to accept a list of job states for selection.- Specified by:
countJobsin interfaceOrderjobController- Parameters:
states- The grouped job states (COMPLETED or NON-COMPLETED) to filter by.orderId- The order ID of the jobs.- Returns:
- The number of jobs.
-
indexOfJob
@Transactional(isolation=REPEATABLE_READ, readOnly=true) public org.springframework.http.ResponseEntity<String> indexOfJob(Long orderId, Long jobId, Long jobStepId, String[] states, String[] orderBy) Retrieves the index of a job in an ordered list of all jobs of an order. At the moment the states parameter accepts COMPLETED or NON-COMPLETED. It is prepared to accept a list of job states for selection.- Specified by:
indexOfJobin interfaceOrderjobController- Parameters:
orderId- The persistent id of the processing order.jobId- The persistent id of the job.jobStepId- The persistent id of the job step.states- The grouped job states (COMPLETED or NON-COMPLETED) to filter by.orderBy- An array of strings containing a column name and an optional sort direction (ASC/DESC), separated by whitespace.- Returns:
- The index of the job in the ordered list (0 based).
-