Java Doc for ParameterChecks.java in  » UML » AndroMDA-3.2 » org » andromda » cartridges » jsf » validator » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » UML » AndroMDA 3.2 » org.andromda.cartridges.jsf.validator 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.andromda.cartridges.jsf.validator.ParameterChecks

ParameterChecks
public class ParameterChecks implements Serializable(Code)

This class contains the default validations that are used in the validator-rules.xml file.

In general passing in a null or blank will return a null Object or a false boolean. However, nulls and blanks do not result in an error being added to the errors.



Field Summary
final public static  StringFIELD_TEST_EQUAL
    
final public static  StringFIELD_TEST_NOTNULL
    
final public static  StringFIELD_TEST_NULL
    


Method Summary
public static  voidvalidateByte(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field can safely be converted to a byte primitive.
public static  voidvalidateCreditCard(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field is a valid credit card number.
public static  voidvalidateDate(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field is a valid date.
public static  voidvalidateDouble(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field can safely be converted to a double primitive.
public static  voidvalidateDoubleRange(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if a fields value is within a range (min & max specified in the vars attribute).
public static  voidvalidateEmail(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if a field has a valid exception-mail address.
public static  voidvalidateEqual(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field's value is equal to another field's value on the same form.
public static  voidvalidateFloat(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field can safely be converted to a float primitive.
public static  voidvalidateFloatRange(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if a fields value is within a range (min & max specified in the vars attribute).
public static  voidvalidateInteger(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field can safely be converted to an int primitive.
public static  voidvalidateLong(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field can safely be converted to a long primitive.
public static  voidvalidateLongRange(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if a fields value is within a range (min & max specified in the vars attribute).
public static  voidvalidateMask(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the parameter matches the regular expression in the field's mask attribute.
public static  voidvalidateMaxLength(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field's length is less than or equal to the maximum value.
public static  voidvalidateMinLength(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field's length is greater than or equal to the minimum value.
public static  voidvalidateRequired(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field isn't null and length of the field is greater than zero not including whitespace.
public static  voidvalidateRequiredIf(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the parameter isn't null based on the values of other fields.
public static  voidvalidateShort(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field can safely be converted to a short primitive.
public static  voidvalidateTime(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
     Checks if the field is a valid time.
public static  voidvalidateUrl(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)
    

Validates whether the URL string passed in is a valid URL or not.


Field Detail
FIELD_TEST_EQUAL
final public static String FIELD_TEST_EQUAL(Code)



FIELD_TEST_NOTNULL
final public static String FIELD_TEST_NOTNULL(Code)



FIELD_TEST_NULL
final public static String FIELD_TEST_NULL(Code)





Method Detail
validateByte
public static void validateByte(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field can safely be converted to a byte primitive.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateCreditCard
public static void validateCreditCard(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field is a valid credit card number.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateDate
public static void validateDate(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field is a valid date. If the field has a datePattern variable, that will be used to format java.text.SimpleDateFormat. If the field has a datePatternStrict variable, that will be used to format java.text.SimpleDateFormat and the length will be checked so '2/12/1999' will not pass validation with the format 'MM/dd/yyyy' because the month isn't two digits. If no datePattern variable is specified, then the field gets the DateFormat.SHORT format for the locale. The setLenient method is set to false for all variations. If the object is a date instance, then validation is not performed.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateDouble
public static void validateDouble(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field can safely be converted to a double primitive.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateDoubleRange
public static void validateDoubleRange(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateEmail
public static void validateEmail(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if a field has a valid exception-mail address.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateEqual
public static void validateEqual(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field's value is equal to another field's value on the same form.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateFloat
public static void validateFloat(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field can safely be converted to a float primitive.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateFloatRange
public static void validateFloatRange(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateInteger
public static void validateInteger(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field can safely be converted to an int primitive.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateLong
public static void validateLong(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field can safely be converted to a long primitive.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateLongRange
public static void validateLongRange(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateMask
public static void validateMask(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the parameter matches the regular expression in the field's mask attribute.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateMaxLength
public static void validateMaxLength(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field's length is less than or equal to the maximum value. A Null will be considered an error.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateMinLength
public static void validateMinLength(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field's length is greater than or equal to the minimum value. A Null will be considered an error.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateRequired
public static void validateRequired(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field isn't null and length of the field is greater than zero not including whitespace.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateRequiredIf
public static void validateRequiredIf(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the parameter isn't null based on the values of other fields.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateShort
public static void validateShort(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field can safely be converted to a short primitive.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateTime
public static void validateTime(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)
Checks if the field is a valid time. If the field has a timePattern variable, that will be used to format java.text.SimpleDateFormat.
Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



validateUrl
public static void validateUrl(FacesContext context, Object object, Map parameters, Collection errors, ValidatorAction action, Field field)(Code)

Validates whether the URL string passed in is a valid URL or not. Does this by attempting to construct a java.net.URL instance and checking whether or not, it's valid.


Parameters:
  context - the faces context
Parameters:
  object - the value of the field being validated.
Parameters:
  parameters - Any field parameters from the validation.xml.
Parameters:
  errors - The Map object to add errors to if anyvalidation errors occur.
Parameters:
  action - The ValidatorAction that is currently beingperformed.
Parameters:
  field - The Field object associated with the currentfield being validated.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.