Package org.chenile.base.response
Interface WarningAware
- All Known Implementing Classes:
ChenileExchange
,GenericResponse
public interface WarningAware
Extract and set warnings to response objects (either objects or maps)
It allows for checking of warnings to objects and also to add warnings to objects which are capable of accommodating warnings.
Currently, all objects capable of accommodating warnings will either implement this interface or be a map (in which case a warningMessages key is created in the map)
- Author:
- Raja Shankar Kolluru
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addWarningMessage
(Object data, ResponseMessage message) Adds a warning message to the context.void
static void
addWarningMessages
(Object data, List<ResponseMessage> warnings) static List<ResponseMessage>
obtainWarnings
(Object data) void
static void
removeAllWarnings
(Object data)
-
Field Details
-
WARNING_MESSAGES_KEY
- See Also:
-
-
Method Details
-
getWarningMessages
List<ResponseMessage> getWarningMessages() -
addWarningMessage
-
removeAllWarnings
void removeAllWarnings() -
obtainWarnings
-
addWarningMessage
Adds a warning message to the context. This method can add warnings toWarningAware
data types or map data types- Parameters:
data
-message
-
-
removeAllWarnings
-
addWarningMessages
-