Package de.dlr.proseo.procmgr.rest
Klasse WorkflowMgr
java.lang.Object
de.dlr.proseo.procmgr.rest.WorkflowMgr
Service methods required to create, modify and delete workflows in the prosEO database, and to query the database about such
workflows
- Autor:
- Katharina Bassler
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibung(Package privat) ProcessorManagerConfigurationThe processor manager configuration(Package privat) org.springframework.boot.web.client.RestTemplateBuilderREST template builder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcountWorkflows(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled) Count the workflows matching the specified workflowName, workflowVersion, inputProductClass, or configured processor.createWorkflow(RestWorkflow restWorkflow) Create a new workflowvoidDelete a workflow by IDgetWorkflowById(Long id) Get a workflow by IDgetWorkflows(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled, Integer recordFrom, Integer recordTo, String[] orderBy) Get workflows by mission, name and version (user-defined version, not database version)modifyWorkflow(Long id, RestWorkflow restWorkflow) Update a workflow by ID
-
Felddetails
-
rtb
@Autowired org.springframework.boot.web.client.RestTemplateBuilder rtbREST template builder -
config
The processor manager configuration
-
-
Konstruktordetails
-
WorkflowMgr
public WorkflowMgr()
-
-
Methodendetails
-
countWorkflows
public String countWorkflows(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled) Count the workflows matching the specified workflowName, workflowVersion, inputProductClass, or configured processor.- 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 workflows found as string
- Löst aus:
SecurityException- if a cross-mission data access was attempted
-
createWorkflow
public RestWorkflow createWorkflow(RestWorkflow restWorkflow) throws IllegalArgumentException, SecurityException Create a new workflow- Parameter:
restWorkflow- a Json representation of the new workflow- Gibt zurück:
- a Json representation of the workflow after creation (with ID and version number)
- Löst aus:
IllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attempted
-
deleteWorkflowById
public void deleteWorkflowById(Long id) throws javax.persistence.EntityNotFoundException, SecurityException, IllegalArgumentException, RuntimeException Delete a workflow by ID- Parameter:
id- the ID of the workflow to delete- Löst aus:
javax.persistence.EntityNotFoundException- if the workflow to delete does not exist in the databaseRuntimeException- if the deletion was not performed as expectedIllegalArgumentException- if the ID of the workflow to delete was not given, or if dependent objects existSecurityException- if a cross-mission data access was attempted
-
getWorkflowById
public RestWorkflow getWorkflowById(Long id) throws IllegalArgumentException, javax.persistence.NoResultException, SecurityException Get a workflow by ID- Parameter:
id- the workflow ID- Gibt zurück:
- a Json object corresponding to the workflow found
- Löst aus:
IllegalArgumentException- if no workflow ID was givenjavax.persistence.NoResultException- if no workflow with the given ID existsSecurityException- if a cross-mission data access was attempted
-
modifyWorkflow
public RestWorkflow modifyWorkflow(Long id, RestWorkflow restWorkflow) throws javax.persistence.EntityNotFoundException, IllegalArgumentException, SecurityException, ConcurrentModificationException Update a workflow by ID- Parameter:
id- the ID of the workflow to updaterestWorkflow- a Json object containing the modified (and unmodified) attributes- Gibt zurück:
- a response containing a Json object corresponding to the workflow after modification (with ID and version for all contained objects)
- Löst aus:
javax.persistence.EntityNotFoundException- if no workflow with the given ID existsIllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attemptedConcurrentModificationException- if the workflow has been modified since retrieval by the client
-
getWorkflows
public List<RestWorkflow> getWorkflows(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled, Integer recordFrom, Integer recordTo, String[] orderBy) throws javax.persistence.NoResultException, SecurityException Get workflows by mission, name and version (user-defined version, not database version)- Parameter:
missionCode- the mission codeworkflowName- the name of the workflow (class)workflowVersion- 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 returnorderBy- an array of strings containing a column name and an optional sort direction (ASC/DESC), separated by white space- Gibt zurück:
- a list of Json objects representing workflows satisfying the search criteria
- Löst aus:
javax.persistence.NoResultException- if no workflows matching the given search criteria could be foundSecurityException- if a cross-mission data access was attempted
-