Package de.dlr.proseo.ui.gui.service
Class StatisticsService
java.lang.Object
de.dlr.proseo.ui.gui.service.StatisticsService
A bridge between the GUI frontend and the backend services, providing methods to retrieve statistics related to job steps and
orders by making HTTP requests to the appropriate endpoints
- Author:
- Ernst Melchinger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.reactive.function.client.WebClient.ResponseSpecgetJobsteps(String status, Long last) Retrieves job steps based on a specified status and optional last parametergetOrderIdentifierOfJob(String jobId, GUIAuthenticationToken auth) Retrieves the order identifier associated with a job based on its IDgetOrderIdOfIdentifier(String identifier, GUIAuthenticationToken auth) Retrieves the order ID based on its identifier
-
Constructor Details
-
StatisticsService
public StatisticsService()
-
-
Method Details
-
getJobsteps
public org.springframework.web.reactive.function.client.WebClient.ResponseSpec getJobsteps(String status, Long last) Retrieves job steps based on a specified status and optional last parameter- Parameters:
status- the job step statuslast- the last job step to return- Returns:
- a ResponseSpec; providing access to the response status and headers, and as well as methods to consume the response body
-
getOrderIdentifierOfJob
public String getOrderIdentifierOfJob(String jobId, GUIAuthenticationToken auth) throws org.springframework.web.client.RestClientResponseException, RuntimeException Retrieves the order identifier associated with a job based on its ID- Parameters:
jobId- the job idauth- a GUIAuthenticationToken- Returns:
- the associated order identifier
- Throws:
org.springframework.web.client.RestClientResponseException- if the call to the order manager was unsuccessfulRuntimeException
-
getOrderIdOfIdentifier
public String getOrderIdOfIdentifier(String identifier, GUIAuthenticationToken auth) throws org.springframework.web.client.RestClientResponseException, RuntimeException Retrieves the order ID based on its identifier- Parameters:
identifier- the order identifierauth- a GUIAuthenticationToken- Returns:
- the order identifier
- Throws:
org.springframework.web.client.RestClientResponseException- if the call to the order manager was unsuccessfulRuntimeException
-