Package de.dlr.proseo.procmgr.rest
Klasse WorkflowControllerImpl
java.lang.Object
de.dlr.proseo.procmgr.rest.WorkflowControllerImpl
- Alle implementierten Schnittstellen:
WorkflowController
Spring MVC controller for the prosEO Workflow Manager; implements the services required to manage workflows.
- Autor:
- Katharina Bassler
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<String> countWorkflows
(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled) Count the workflows matching the specified name, workflow version, input product class, or configured processor.org.springframework.http.ResponseEntity
<RestWorkflow> createWorkflow
(@Valid RestWorkflow workflow) Create a workflow from the given Json objectorg.springframework.http.ResponseEntity
<?> Delete a workflow by IDorg.springframework.http.ResponseEntity
<RestWorkflow> getWorkflowById
(Long id) Find the workflow with the given IDorg.springframework.http.ResponseEntity
<List<RestWorkflow>> getWorkflows
(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled, Integer recordFrom, Integer recordTo) Get a list of all workflows with the specified mission, workflow name, workflow version, input product class and configured processororg.springframework.http.ResponseEntity
<RestWorkflow> modifyWorkflow
(Long id, RestWorkflow workflow) Update the workflow with the given ID with the attribute values of the given Json object.
-
Konstruktordetails
-
WorkflowControllerImpl
public WorkflowControllerImpl()
-
-
Methodendetails
-
countWorkflows
public org.springframework.http.ResponseEntity<String> countWorkflows(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled) Count the workflows matching the specified name, workflow version, input product class, or configured processor.- Angegeben von:
countWorkflows
in SchnittstelleWorkflowController
- Parameter:
missionCode
- the mission codeworkflowName
- the workflow nameworkflowVersion
- the workflow versioninputProductClass
- the input product classconfiguredProcessor
- the configured processorenabled
- whether the workflow is enabled- Gibt zurück:
- the number of matching workflows as a String (may be zero) or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted
-
getWorkflows
public org.springframework.http.ResponseEntity<List<RestWorkflow>> getWorkflows(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled, Integer recordFrom, Integer recordTo) Get a list of all workflows with the specified mission, workflow name, workflow version, input product class and configured processor- Angegeben von:
getWorkflows
in SchnittstelleWorkflowController
- Parameter:
missionCode
- the mission codeworkflowName
- the workflow nameworkflowVersion
- the workflow versioninputProductClass
- the input product classconfiguredProcessor
- the configured processorenabled
- whether the workflow is enabledrecordFrom
- first record of filtered and ordered result to returnrecordTo
- last record of filtered and ordered result to return- Gibt zurück:
- HTTP status "OK" and a list of workflows or HTTP status "NOT_FOUND" and an error message, if no workflows match the search criteria, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "TOO MANY REQUESTS" if the result list exceeds a configured maximum
-
createWorkflow
public org.springframework.http.ResponseEntity<RestWorkflow> createWorkflow(@Valid @Valid RestWorkflow workflow) Create a workflow from the given Json object- Angegeben von:
createWorkflow
in SchnittstelleWorkflowController
- Parameter:
workflow
- the Json object from which to create the workflow- Gibt zurück:
- HTTP status "CREATED" and a response containing a Json object corresponding to the workflow after persistence (with ID and version for all contained objects) or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "BAD_REQUEST", if any of the input data was invalid
-
getWorkflowById
Find the workflow with the given ID- Angegeben von:
getWorkflowById
in SchnittstelleWorkflowController
- Parameter:
id
- the ID to look for- Gibt zurück:
- HTTP status "OK" and a Json object corresponding to the found order or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND", if no workflow with the given ID exists
-
deleteWorkflowById
Delete a workflow by ID- Angegeben von:
deleteWorkflowById
in SchnittstelleWorkflowController
- Parameter:
id
- the ID of the workflow to delete- Gibt zurück:
- a response entity with HTTP status "NO_CONTENT", if the deletion was successful, or HTTP status "NOT_FOUND" and an error message, if the workflow did not exist, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_MODIFIED" and an error message, if the deletion was unsuccessful
-
modifyWorkflow
public org.springframework.http.ResponseEntity<RestWorkflow> modifyWorkflow(Long id, RestWorkflow workflow) Update the workflow with the given ID with the attribute values of the given Json object.- Angegeben von:
modifyWorkflow
in SchnittstelleWorkflowController
- Parameter:
id
- the ID of the workflow to updateworkflow
- a Json object containing the modified (and unmodified) attributes- Gibt zurück:
- a response containing HTTP status "OK" and a Json object corresponding to the workflow after modification (with ID and version for all contained objects) or HTTP status "NOT_MODIFIED" and the unchanged workflow, if no attributes were actually changed, or HTTP status "NOT_FOUND" and an error message, if no workflow with the given ID exists, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted
-