public class GiftRegistryRequestFieldsValidator
extends java.lang.Object
When you use the property file, ensure you are familiar with the following logic within the file. The properties file parameter names used:
30.Name=firstName 30.Required=yes 30.addressType=REach property contains at least two lines of information: the name of the parameter (or field), and whether or not the parameter is required. For example, in the following excerpt, the properties file has defined that the parameter description is required:
1.Name=description 1.Required=yesThis means an event description for the gift registry must be provided.
The following is the list of all the rules:
1.Name=firstName 1.Required=no 1.addressType=C 1.RequiredIfFieldEntered=relationship.C
1.Name=phone1 1.pattern=[0-9]{6,10}
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CLASS_NAME
The name of this class
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.String | FIELD_RULE_DELIMITER
The delimiter used for field rules.
|
Constructor and Description |
---|
GiftRegistryRequestFieldsValidator(java.lang.String propertyFileName)
Validates that uses rules from the file that has the given file name
|
Modifier and Type | Method and Description |
---|---|
TypedProperty | getRequestProperties()
Gets the request properties.
|
java.lang.String | getRulePropertyFileName() |
java.lang.String | getStoreDirectory() |
void | setPathSeparator(java.lang.String astrPathSeparator)
Sets the path separator.
|
void | setRequestProperties(javax.servlet.http.HttpServletRequest request)
Sets the request properties from the request object
|
void | setRequestProperties(TypedProperty aRequestProperties)
Sets the request properties
|
void | setRulePropertyFileName(java.lang.String astrPropertyFileName)
Sets the name of the rule property file.
|
void | setStoreDirectory(java.lang.String astrStoreDirectory)
This method sets the name of store directory.
|
org.apache.struts.action.ActionErrors | validateFields(javax.servlet.http.HttpServletRequest request)
Validates URL fields using rules specified in a property file
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public static final java.lang.String FIELD_RULE_DELIMITER
public GiftRegistryRequestFieldsValidator(java.lang.String propertyFileName)
public void setPathSeparator(java.lang.String astrPathSeparator)
"store1/UserRegistration""/" is the path separator.
public void setRulePropertyFileName(java.lang.String astrPropertyFileName)
public void setRequestProperties(TypedProperty aRequestProperties)
public void setRequestProperties(javax.servlet.http.HttpServletRequest request)
public TypedProperty getRequestProperties()
public void setStoreDirectory(java.lang.String astrStoreDirectory)
public org.apache.struts.action.ActionErrors validateFields(javax.servlet.http.HttpServletRequest request)
public java.lang.String getRulePropertyFileName()
public java.lang.String getStoreDirectory()