public class ValidationAwareSupport extends Object implements ValidationAware, Serializable
| Constructor and Description |
|---|
ValidationAwareSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
addActionError(String anErrorMessage)
Add an Action-level error message to this Action.
|
void |
addActionMessage(String aMessage)
Add an Action-level message to this Action.
|
void |
addFieldError(String fieldName,
String errorMessage)
Add an error message for a given field.
|
void |
clearActionErrors()
Clears action errors list.
|
void |
clearErrors()
Clears all error list/maps.
|
void |
clearErrorsAndMessages()
Clears all error and messages list/maps.
|
void |
clearFieldErrors()
Clears field errors map.
|
void |
clearMessages()
Clears messages list.
|
Collection<String> |
getActionErrors()
Get the Collection of Action-level error messages for this action.
|
Collection<String> |
getActionMessages()
Get the Collection of Action-level messages for this action.
|
Map<String,List<String>> |
getFieldErrors()
Get the field specific errors associated with this action.
|
boolean |
hasActionErrors()
Check whether there are any Action-level error messages.
|
boolean |
hasActionMessages()
Checks whether there are any Action-level messages.
|
boolean |
hasErrors()
Checks whether there are any action errors or field errors.
|
boolean |
hasFieldErrors()
Check whether there are any field errors associated with this action.
|
void |
setActionErrors(Collection<String> errorMessages)
Set the Collection of Action-level String error messages.
|
void |
setActionMessages(Collection<String> messages)
Set the Collection of Action-level String messages (not errors).
|
void |
setFieldErrors(Map<String,List<String>> errorMap)
Set the field error map of fieldname (String) to Collection of String error messages.
|
public void setActionErrors(Collection<String> errorMessages)
ValidationAwaresetActionErrors in interface ValidationAwareerrorMessages - Collection of String error messagespublic Collection<String> getActionErrors()
ValidationAwaregetActionErrors in interface ValidationAwarepublic void setActionMessages(Collection<String> messages)
ValidationAwaresetActionMessages in interface ValidationAwaremessages - Collection of String messages (not errors).public Collection<String> getActionMessages()
ValidationAwaregetActionMessages in interface ValidationAwarepublic void setFieldErrors(Map<String,List<String>> errorMap)
ValidationAwaresetFieldErrors in interface ValidationAwareerrorMap - field error mappublic Map<String,List<String>> getFieldErrors()
ValidationAwaregetFieldErrors in interface ValidationAwarepublic void addActionError(String anErrorMessage)
ValidationAwareaddActionError in interface ValidationAwareanErrorMessage - the error messagepublic void addActionMessage(String aMessage)
ValidationAwareaddActionMessage in interface ValidationAwareaMessage - the messagepublic void addFieldError(String fieldName, String errorMessage)
ValidationAwareaddFieldError in interface ValidationAwarefieldName - name of fielderrorMessage - the error messagepublic boolean hasActionErrors()
ValidationAwarehasActionErrors in interface ValidationAwarepublic boolean hasActionMessages()
ValidationAwarehasActionMessages in interface ValidationAwarepublic boolean hasErrors()
ValidationAwarehasErrors in interface ValidationAware(hasActionErrors() || hasFieldErrors())public boolean hasFieldErrors()
ValidationAwarehasFieldErrors in interface ValidationAwarepublic void clearFieldErrors()
Will clear the map that contains field errors.
public void clearActionErrors()
Will clear the list that contains action errors.
public void clearMessages()
Will clear the list that contains action messages.
public void clearErrors()
Will clear the map and list that contain field errors and action errors.
public void clearErrorsAndMessages()
Will clear the maps/lists that contain field errors, action errors and action messages.
Copyright © 2000–2018 Apache Software Foundation. All rights reserved.