| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjet.validation.ValidationRule
public class ValidationRule
Class providinginterface to commons validation
| Field Summary | |
|---|---|
static java.lang.String | 
AJAX
indicates ajax validation  | 
private  java.util.List<java.lang.String> | 
args
args  | 
static java.lang.String | 
CLIENT
indicates client side validation  | 
private  java.lang.String | 
componentNameKey
validation rule component name key  | 
private  java.lang.String | 
messageKey
validation rule message key  | 
private  java.lang.String | 
name
validation rule name  | 
static java.lang.String | 
SERVER
indicates server side validation  | 
 java.lang.String | 
type
type of validation server or client side  | 
| Constructor Summary | |
|---|---|
ValidationRule(java.lang.String name,
               java.lang.String type)
Constructor  | 
|
ValidationRule(java.lang.String name,
               java.lang.String componentNameKey,
               java.lang.String type)
Constructor  | 
|
| Method Summary | |
|---|---|
 void | 
addParam(java.lang.String arg)
Method to add arguments  | 
 java.lang.String | 
getComponentNameKey()
Returns the component key which we should validate (also needed to localise the field name in validation message)  | 
 java.lang.String | 
getMessageKey()
Returns the message key  | 
 java.lang.String | 
getName()
Get the name of the validation  | 
 java.lang.String | 
getParam(int i)
Returns the argument on given pos  | 
 java.util.List | 
getParams()
Returns the arguments  | 
 java.lang.String | 
getType()
Get the type of the validation  | 
 boolean | 
hasArgs()
Indicates if arguments exists  | 
 boolean | 
hasClientSideValidation()
indicates server or client side valdiation  | 
 boolean | 
isAjaxValidation()
indicates ajax valdiation  | 
 void | 
setMessageKey(java.lang.String messageKey)
Sets the message key  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String SERVER
public static final java.lang.String CLIENT
public static final java.lang.String AJAX
private java.lang.String name
private java.lang.String componentNameKey
private java.lang.String messageKey
public java.lang.String type
private java.util.List<java.lang.String> args
| Constructor Detail | 
|---|
public ValidationRule(java.lang.String name,
                      java.lang.String type)
name - name of the rule to usetype - the type
public ValidationRule(java.lang.String name,
                      java.lang.String componentNameKey,
                      java.lang.String type)
name - name of the rule to usecomponentNameKey - the localizer key for name of componenttype - the type| Method Detail | 
|---|
public java.lang.String getName()
public java.lang.String getType()
public void addParam(java.lang.String arg)
arg - argumentpublic java.lang.String getParam(int i)
i - position
public java.util.List getParams()
public boolean hasArgs()
public boolean hasClientSideValidation()
public boolean isAjaxValidation()
public java.lang.String getComponentNameKey()
public java.lang.String getMessageKey()
public void setMessageKey(java.lang.String messageKey)
messageKey - key used for localized message
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||