Class ProcessResponse
- java.lang.Object
-
- fr.gouv.vitam.processing.common.model.ProcessResponse
-
- All Implemented Interfaces:
EngineResponse
- Direct Known Subclasses:
ExtractUriResponse
public class ProcessResponse extends java.lang.Object implements EngineResponse
Process Response class Contains global process status, messages and list of action results
-
-
Constructor Summary
Constructors Constructor Description ProcessResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetErrorNumber()static java.lang.StringgetGlobalProcessOutcomeMessage(java.util.List<EngineResponse> responses)getGlobalProcessOutcomeMessage, return the all outcome message of workflow processingStatusCodegetGlobalProcessStatusCode(java.util.List<EngineResponse> responses)getGlobalProcessStatusCode, return the global status of workflow processingjava.lang.StringgetMessageIdentifier()static java.lang.StringgetMessageIdentifierFromResponse(java.util.List<EngineResponse> responses)getMessageFromResponse return message id from list of responsejava.util.Map<java.lang.String,OutcomeMessage>getOutcomeMessages()implementation of getMessage() of EngineResponse API classjava.lang.StringgetProcessId()StatusCodegetStatus()implementation of getStatus() of EngineResponse API classjava.util.Map<java.lang.String,java.util.List<EngineResponse>>getStepResponses()getStepResponses given the response of each step of workflow processingjava.lang.StringgetValue()implementation of getValue() of EngineResponse API classEngineResponsesetErrorNumber(int number)EngineResponsesetMessageIdentifier(java.lang.String message)ProcessResponsesetOutcomeMessages(java.lang.String handlerId, OutcomeMessage message)implementation of setMessage() of EngineResponse API classProcessResponsesetProcessId(java.lang.String processId)ProcessResponsesetStatus(StatusCode status)implementation of setStatus() of EngineResponse API classProcessResponsesetStepResponses(java.util.Map<java.lang.String,java.util.List<EngineResponse>> stepResponses)setStepResponses, set the response at each step of workflow processing
-
-
-
Method Detail
-
getStatus
public StatusCode getStatus()
implementation of getStatus() of EngineResponse API class- Specified by:
getStatusin interfaceEngineResponse- Returns:
- Enum StatusCode {OK,KO,FATAL}
-
setStatus
public ProcessResponse setStatus(StatusCode status)
implementation of setStatus() of EngineResponse API class- Specified by:
setStatusin interfaceEngineResponse- Parameters:
status- ENUM statusCode- Returns:
- EngineResponse
-
getOutcomeMessages
public java.util.Map<java.lang.String,OutcomeMessage> getOutcomeMessages()
implementation of getMessage() of EngineResponse API class- Specified by:
getOutcomeMessagesin interfaceEngineResponse- Returns:
- list of functional error message
-
setOutcomeMessages
public ProcessResponse setOutcomeMessages(java.lang.String handlerId, OutcomeMessage message)
implementation of setMessage() of EngineResponse API class- Specified by:
setOutcomeMessagesin interfaceEngineResponse- Parameters:
handlerId- handler name or idmessage- Outcome Messages of response- Returns:
- EngineResponse
-
getStepResponses
public java.util.Map<java.lang.String,java.util.List<EngineResponse>> getStepResponses()
getStepResponses given the response of each step of workflow processing- Returns:
- the stepResponses
-
setStepResponses
public ProcessResponse setStepResponses(java.util.Map<java.lang.String,java.util.List<EngineResponse>> stepResponses)
setStepResponses, set the response at each step of workflow processing- Parameters:
stepResponses- the stepResponses to set- Returns:
- the updated ProcessResponse object
-
getGlobalProcessStatusCode
public StatusCode getGlobalProcessStatusCode(java.util.List<EngineResponse> responses)
getGlobalProcessStatusCode, return the global status of workflow processing- Parameters:
responses- list of step response- Returns:
- the status of StatusCode type
-
getGlobalProcessOutcomeMessage
public static java.lang.String getGlobalProcessOutcomeMessage(java.util.List<EngineResponse> responses)
getGlobalProcessOutcomeMessage, return the all outcome message of workflow processing- Parameters:
responses- message list- Returns:
- the global message
-
getMessageIdentifierFromResponse
public static java.lang.String getMessageIdentifierFromResponse(java.util.List<EngineResponse> responses)
getMessageFromResponse return message id from list of response- Parameters:
responses- list of step response- Returns:
- message id
-
getValue
public java.lang.String getValue()
implementation of getValue() of EngineResponse API class- Specified by:
getValuein interfaceEngineResponse- Returns:
- StatusCode value {OK,KO,FATAL}
-
getMessageIdentifier
public java.lang.String getMessageIdentifier()
- Specified by:
getMessageIdentifierin interfaceEngineResponse- Returns:
- message identifier of seda
-
setMessageIdentifier
public EngineResponse setMessageIdentifier(java.lang.String message)
- Specified by:
setMessageIdentifierin interfaceEngineResponse- Parameters:
message- identifier of seda- Returns:
- EngineResponse
-
getErrorNumber
public int getErrorNumber()
- Specified by:
getErrorNumberin interfaceEngineResponse- Returns:
- list of functional error message
-
setErrorNumber
public EngineResponse setErrorNumber(int number)
- Specified by:
setErrorNumberin interfaceEngineResponse- Parameters:
number- the number of errors during the workflow- Returns:
- EngineResponse
-
getProcessId
public java.lang.String getProcessId()
- Returns:
- the processId
-
setProcessId
public ProcessResponse setProcessId(java.lang.String processId)
- Parameters:
processId- the processId to set- Returns:
- the updated ProcessResponse object
-
-