|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.webapps.struts.FieldValidators
public class FieldValidators
Static methods used in the Struts validation framework that implement custom validation actions. The static methods are configured in validator-rules.xml and applied to a specific form in your app using validation.xml, which are typically located in the WEB-INF directory of your web application.
Constructor Summary | |
---|---|
FieldValidators()
|
Method Summary | |
---|---|
static String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout: |
static String |
getSimpleDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout: |
static void |
setDebug(boolean db)
Sets the debug attribute object |
static boolean |
validateDirectoryNotInRepository(Object bean,
org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field,
org.apache.struts.action.ActionMessages messages,
org.apache.commons.validator.Validator validator,
HttpServletRequest request,
ServletContext servletContext)
Validates that the field value is a directory that is not already configured in the repository (RepositoryManager). |
static boolean |
validateIsDirectory(Object bean,
org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field,
org.apache.struts.action.ActionMessages messages,
org.apache.commons.validator.Validator validator,
HttpServletRequest request,
ServletContext servletContext)
Validates that the field value is an existing directory on the server that the application is running on. |
static boolean |
validateNamespaceIdentifier(Object bean,
org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field,
org.apache.struts.action.ActionMessages messages,
org.apache.commons.validator.Validator validator,
HttpServletRequest request,
ServletContext servletContext)
Validates that the String is a valid namespace identifier for OAI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldValidators()
Method Detail |
---|
public static boolean validateIsDirectory(Object bean, org.apache.commons.validator.ValidatorAction va, org.apache.commons.validator.Field field, org.apache.struts.action.ActionMessages messages, org.apache.commons.validator.Validator validator, HttpServletRequest request, ServletContext servletContext)
bean
- The Struts beanva
- the ValidatorActionfield
- The Fieldmessages
- The ActionMessagesvalidator
- The Validatorrequest
- The HttpServletRequestservletContext
- The ServletContext
public static boolean validateNamespaceIdentifier(Object bean, org.apache.commons.validator.ValidatorAction va, org.apache.commons.validator.Field field, org.apache.struts.action.ActionMessages messages, org.apache.commons.validator.Validator validator, HttpServletRequest request, ServletContext servletContext)
bean
- The Struts beanva
- the ValidatorActionfield
- The Fieldmessages
- The ActionMessagesvalidator
- The Validatorrequest
- The HttpServletRequestservletContext
- The ServletContext
public static boolean validateDirectoryNotInRepository(Object bean, org.apache.commons.validator.ValidatorAction va, org.apache.commons.validator.Field field, org.apache.struts.action.ActionMessages messages, org.apache.commons.validator.Validator validator, HttpServletRequest request, ServletContext servletContext)
bean
- The Struts beanva
- the ValidatorActionfield
- The Fieldmessages
- The ActionMessagesvalidator
- The Validatorrequest
- The HttpServletRequestservletContext
- The ServletContext
public static String getSimpleDateStamp()
public static String getDateStamp()
public static void setDebug(boolean db)
db
- The new debug value
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |