|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork2.ValidationAwareSupport
public class ValidationAwareSupport
Provides a default implementation of ValidationAware. Returns new collections for errors and messages (defensive copy).
| Constructor Summary | |
|---|---|
ValidationAwareSupport()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValidationAwareSupport()
| Method Detail |
|---|
public void setActionErrors(Collection<String> errorMessages)
ValidationAware
setActionErrors in interface ValidationAwareerrorMessages - Collection of String error messagespublic Collection<String> getActionErrors()
ValidationAware
getActionErrors in interface ValidationAwarepublic void setActionMessages(Collection<String> messages)
ValidationAware
setActionMessages in interface ValidationAwaremessages - Collection of String messages (not errors).public Collection<String> getActionMessages()
ValidationAware
getActionMessages in interface ValidationAwarepublic void setFieldErrors(Map<String,List<String>> errorMap)
ValidationAware
setFieldErrors in interface ValidationAwareerrorMap - field error mappublic Map<String,List<String>> getFieldErrors()
ValidationAware
getFieldErrors in interface ValidationAwarepublic void addActionError(String anErrorMessage)
ValidationAware
addActionError in interface ValidationAwareanErrorMessage - the error messagepublic void addActionMessage(String aMessage)
ValidationAware
addActionMessage in interface ValidationAwareaMessage - the message
public void addFieldError(String fieldName,
String errorMessage)
ValidationAware
addFieldError in interface ValidationAwarefieldName - name of fielderrorMessage - the error messagepublic boolean hasActionErrors()
ValidationAware
hasActionErrors in interface ValidationAwarepublic boolean hasActionMessages()
ValidationAware
hasActionMessages in interface ValidationAwarepublic boolean hasErrors()
ValidationAware
hasErrors in interface ValidationAware(hasActionErrors() || hasFieldErrors())public boolean hasFieldErrors()
ValidationAware
hasFieldErrors in interface ValidationAwarepublic void clearFieldErrors()
public void clearActionErrors()
public void clearMessages()
public void clearErrors()
public void clearErrorsAndMessages()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||