Class ProcessResponse
java.lang.Object
fr.gouv.vitam.processing.common.model.ProcessResponse
- All Implemented Interfaces:
EngineResponse
- Direct Known Subclasses:
ExtractUriResponse
Process Response class
Contains global process status, messages and list of action results
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
static String
getGlobalProcessOutcomeMessage
(List<EngineResponse> responses) getGlobalProcessOutcomeMessage, return the all outcome message of workflow processinggetGlobalProcessStatusCode
(List<EngineResponse> responses) getGlobalProcessStatusCode, return the global status of workflow processingstatic String
getMessageIdentifierFromResponse
(List<EngineResponse> responses) getMessageFromResponse return message id from list of responseimplementation of getMessage() of EngineResponse API classimplementation of getStatus() of EngineResponse API classgetStepResponses given the response of each step of workflow processinggetValue()
implementation of getValue() of EngineResponse API classsetErrorNumber
(int number) setMessageIdentifier
(String message) setOutcomeMessages
(String handlerId, OutcomeMessage message) implementation of setMessage() of EngineResponse API classsetProcessId
(String processId) setStatus
(StatusCode status) implementation of setStatus() of EngineResponse API classsetStepResponses
(Map<String, List<EngineResponse>> stepResponses) setStepResponses, set the response at each step of workflow processing
-
Constructor Details
-
ProcessResponse
public ProcessResponse()
-
-
Method Details
-
getStatus
implementation of getStatus() of EngineResponse API class- Specified by:
getStatus
in interfaceEngineResponse
- Returns:
- Enum StatusCode {OK,KO,FATAL}
-
setStatus
implementation of setStatus() of EngineResponse API class- Specified by:
setStatus
in interfaceEngineResponse
- Parameters:
status
- ENUM statusCode- Returns:
- EngineResponse
-
getOutcomeMessages
implementation of getMessage() of EngineResponse API class- Specified by:
getOutcomeMessages
in interfaceEngineResponse
- Returns:
- list of functional error message
-
setOutcomeMessages
implementation of setMessage() of EngineResponse API class- Specified by:
setOutcomeMessages
in interfaceEngineResponse
- Parameters:
handlerId
- handler name or idmessage
- Outcome Messages of response- Returns:
- EngineResponse
-
getStepResponses
getStepResponses given the response of each step of workflow processing- Returns:
- the stepResponses
-
setStepResponses
setStepResponses, set the response at each step of workflow processing- Parameters:
stepResponses
- the stepResponses to set- Returns:
- the updated ProcessResponse object
-
getGlobalProcessStatusCode
getGlobalProcessStatusCode, return the global status of workflow processing- Parameters:
responses
- list of step response- Returns:
- the status of StatusCode type
-
getGlobalProcessOutcomeMessage
getGlobalProcessOutcomeMessage, return the all outcome message of workflow processing- Parameters:
responses
- message list- Returns:
- the global message
-
getMessageIdentifierFromResponse
getMessageFromResponse return message id from list of response- Parameters:
responses
- list of step response- Returns:
- message id
-
getValue
implementation of getValue() of EngineResponse API class- Specified by:
getValue
in interfaceEngineResponse
- Returns:
- StatusCode value {OK,KO,FATAL}
-
getMessageIdentifier
- Specified by:
getMessageIdentifier
in interfaceEngineResponse
- Returns:
- message identifier of seda
-
setMessageIdentifier
- Specified by:
setMessageIdentifier
in interfaceEngineResponse
- Parameters:
message
- identifier of seda- Returns:
- EngineResponse
-
getErrorNumber
public int getErrorNumber()- Specified by:
getErrorNumber
in interfaceEngineResponse
- Returns:
- list of functional error message
-
setErrorNumber
- Specified by:
setErrorNumber
in interfaceEngineResponse
- Parameters:
number
- the number of errors during the workflow- Returns:
- EngineResponse
-
getProcessId
- Returns:
- the processId
-
setProcessId
- Parameters:
processId
- the processId to set- Returns:
- the updated ProcessResponse object
-