Package org.wso2.carbon.utils
Class DiagnosticLog.DiagnosticLogBuilder
java.lang.Object
org.wso2.carbon.utils.DiagnosticLog.DiagnosticLogBuilder
- Enclosing class:
DiagnosticLog
Builder class for DiagnosticLog.
This class follows the Builder design pattern, providing a way to construct a DiagnosticLog object step by step.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs a DiagnosticLog object using the set parameters.configParam(String key, Object value) Adds a new key-value pair to the configurations map of the DiagnosticLog.configParams(Map<String, ?> configurations) Adds all entries from the provided map to the configurations map of the DiagnosticLog.inputParam(String key, Object value) Adds a new key-value pair to the input map of the DiagnosticLog.inputParams(Map<String, ?> input) Adds all entries from the provided map to the input map of the DiagnosticLog.logDetailLevel(DiagnosticLog.LogDetailLevel logDetailLevel) Sets the log detail level of the DiagnosticLog.resultMessage(String resultMessage) Sets the result message of the DiagnosticLog.resultStatus(DiagnosticLog.ResultStatus resultStatus) Sets the result status of the DiagnosticLog.
-
Constructor Details
-
DiagnosticLogBuilder
-
-
Method Details
-
resultStatus
Sets the result status of the DiagnosticLog.- Parameters:
resultStatus- the result message to be set.- Returns:
- the current DiagnosticLogBuilder instance.
-
resultMessage
Sets the result message of the DiagnosticLog.- Parameters:
resultMessage- the action ID to be set.- Returns:
- the current DiagnosticLogBuilder instance.
-
inputParam
Adds a new key-value pair to the input map of the DiagnosticLog. If the input map has not been initialized yet, this method will initialize it.- Parameters:
key- the key to be added to the input map.value- the value to be associated with the key in the input map.- Returns:
- the current DiagnosticLogBuilder instance.
-
configParam
Adds a new key-value pair to the configurations map of the DiagnosticLog. If the configurations map has not been initialized yet, this method will initialize it.- Parameters:
key- the key to be added to the configurations map.value- the value to be associated with the key in the configurations map.- Returns:
- the current DiagnosticLogBuilder instance.
-
inputParams
Adds all entries from the provided map to the input map of the DiagnosticLog. If the input map has not been initialized yet, this method will initialize it.- Parameters:
input- the map containing entries to be added to the input map.- Returns:
- the current DiagnosticLogBuilder instance.
-
configParams
Adds all entries from the provided map to the configurations map of the DiagnosticLog. If the configurations map has not been initialized yet, this method will initialize it.- Parameters:
configurations- the map containing entries to be added to the configurations map.- Returns:
- the current DiagnosticLogBuilder instance.
-
logDetailLevel
public DiagnosticLog.DiagnosticLogBuilder logDetailLevel(DiagnosticLog.LogDetailLevel logDetailLevel) Sets the log detail level of the DiagnosticLog.- Parameters:
logDetailLevel- the log detail level to be set.- Returns:
- the current DiagnosticLogBuilder instance.
-
build
Constructs a DiagnosticLog object using the set parameters.- Returns:
- a new DiagnosticLog object.
-