Java Doc for BaseConfiguredValidator.java in  » Development » iScreen » org » iscreen » impl » 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 » Development » iScreen » org.iscreen.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.iscreen.impl.BaseConfiguredValidator

All known Subclasses:   org.iscreen.mvel.MvelConfiguredValidator,  org.iscreen.ognl.OgnlConfiguredValidator,
BaseConfiguredValidator
abstract public class BaseConfiguredValidator implements ValidatorWrapper(Code)
This base class represents a wrapper around a validator that handles the actual call to the validator. This class is subclassed by OGNL or MVEL to handle the actual interpretation of how to handle mappings, etc.
author:
   Shellman, Dan


Field Summary
protected  ValidationServicecontainingService
    
protected  Stringdoc
    
protected  booleanfailFastFlag
    
protected  Stringid
    
protected  ResourceValuelabel
    
protected  Setmappings
    
protected  Stringname
    
protected  StringparsedDoc
    
protected  BaseConfiguredValidatorref
    
protected  SetstaticProperties
    
protected  Validatorvalidator
    
protected  ClassvalidatorClass
    

Constructor Summary
public  BaseConfiguredValidator()
     Default constructor.

Method Summary
abstract public  voidaddMapping(String from, String to)
     Adds a mapping for mapping the object being validated to the beanToValidate object (that the Validator created).
abstract public  voidaddStaticProperty(String property, Object obj)
     Adds a "static" property to set on the underlying Validator.
abstract protected  StringconvertDoc(Object contextBean, String unconvertedDoc)
     Convert the documentation text using the embedded markers.
Parameters:
  contextBean - The context bean (root) for converting the doc.
Parameters:
  unconvertedDoc - The raw documentation text.
abstract protected  voidexecuteMappings(Object from, Object to)
     Maps the appropriate properties from one object to another.
abstract public  ValidatorgetConfiguredValidator()
     Creates the Validator and configures it.
public  DocumentationIteratorgetDoc()
     Retrieves the documentation (parsed and updated) for this validator.
abstract protected  CollectiongetFields()
     Retrieves the Collection of fields (the 'getter' OGNL expressions) that are used in mapping properties from the JavaBean/Object being validated to the validation bean.
public  StringgetId()
     Gets the id of this wrapper.
public  StringgetLabel(Locale locale)
     Gets the value of the label for this Validator wrapper.
public  SetgetMappings()
     Gets the Set of mappings for this Validator and any Validator this Validator references.
public  StringgetName()
    
protected  StringgetRawDoc()
     Retrieves the raw documentation for this.
protected  StringgetServiceId()
    
public  SetgetStaticProperties()
     Retrieves the Set of static properties (which are OgnlPropertyMapping objects).
public  ClassgetValidatorClass()
     Returns the Class of the Validator this class is wrapping (this may retrieve the Class from another wrapper this wrapper references).
public  booleanisFailFast()
     Whether this wrapper should report to the validation service not to continue validating if this wrapper finds a failure.
public  voidsetClassName(String className)
     Sets the class name of the Validator this class is wrapping.
public  voidsetDoc(String documentation)
     Sets the documentation for this configured validator.
public  voidsetFailFast(boolean flag)
     Sets whether this wrapper should report to the validation service not to continue validating if this wrapper finds a failure.
public  voidsetId(String theId)
     Sets the id of this wrapper.
public  voidsetLabel(Resource resource, String key)
     Sets the Label for this Validator wrapper.
public  voidsetLabel(String labelValue)
     Sets the label for this Validator wrapper.
public  voidsetName(String theName)
     Sets the name of the validator.
public  voidsetRef(BaseConfiguredValidator configuredValidatorRef)
     Sets a wrapper this wrapper may reference.
public  voidsetValidationService(ValidationService service)
     Sets the ValidationService (ValidationSet) that contains this Validator wrapper.
public  booleanvalidate(InternalValidatorContext context, ContextBean contextBean, Object obj)
    

Field Detail
containingService
protected ValidationService containingService(Code)



doc
protected String doc(Code)



failFastFlag
protected boolean failFastFlag(Code)



id
protected String id(Code)



label
protected ResourceValue label(Code)



mappings
protected Set mappings(Code)



name
protected String name(Code)



parsedDoc
protected String parsedDoc(Code)



ref
protected BaseConfiguredValidator ref(Code)



staticProperties
protected Set staticProperties(Code)



validator
protected Validator validator(Code)



validatorClass
protected Class validatorClass(Code)




Constructor Detail
BaseConfiguredValidator
public BaseConfiguredValidator()(Code)
Default constructor.




Method Detail
addMapping
abstract public void addMapping(String from, String to)(Code)
Adds a mapping for mapping the object being validated to the beanToValidate object (that the Validator created).
Parameters:
  from - The OGNL from expression (getter)
Parameters:
  to - The OGNL to expression (setter)



addStaticProperty
abstract public void addStaticProperty(String property, Object obj)(Code)
Adds a "static" property to set on the underlying Validator. A "static" property is really an OGNL expression that will set some value on the Validator once (such as a constraint, service, or failure message).

For failures, the object type should be an OgnlMessage. For a constraint or service, any object type is fine (as long as it maps to the underlying Validator property).
Parameters:
  property - The OGNL expression to set a value
Parameters:
  obj - The value to set, once, on the Validator to configure it.



convertDoc
abstract protected String convertDoc(Object contextBean, String unconvertedDoc)(Code)
Convert the documentation text using the embedded markers.
Parameters:
  contextBean - The context bean (root) for converting the doc.
Parameters:
  unconvertedDoc - The raw documentation text. Returns the converted documentation text.



executeMappings
abstract protected void executeMappings(Object from, Object to)(Code)
Maps the appropriate properties from one object to another.
Parameters:
  from - The object to map from.
Parameters:
  to - The object to map to.



getConfiguredValidator
abstract public Validator getConfiguredValidator()(Code)
Creates the Validator and configures it. Multiple calls will NOT construct a new Validator each call, but will return the same instance created the first time. Returns a created and configured Validator.



getDoc
public DocumentationIterator getDoc()(Code)
Retrieves the documentation (parsed and updated) for this validator. Returns the documentation for this validator.



getFields
abstract protected Collection getFields()(Code)
Retrieves the Collection of fields (the 'getter' OGNL expressions) that are used in mapping properties from the JavaBean/Object being validated to the validation bean. Returns the Collection of fields.



getId
public String getId()(Code)
Gets the id of this wrapper. If one hasn't been set, the validator this references will be returned. However, if there is no id, then an empty string is returned. Returns the id of this wrapper.



getLabel
public String getLabel(Locale locale)(Code)
Gets the value of the label for this Validator wrapper. Based upon the locale, the value of the label *may* be different (if a static one was set, then it won't be different from what was set). Returns the value of the label, based onthe current locale.



getMappings
public Set getMappings()(Code)
Gets the Set of mappings for this Validator and any Validator this Validator references. Returns the Set of mappings for this Validator.



getName
public String getName()(Code)



getRawDoc
protected String getRawDoc()(Code)
Retrieves the raw documentation for this. The referenced validator is also checked, if necessary. Returns the raw documentation.



getServiceId
protected String getServiceId()(Code)



getStaticProperties
public Set getStaticProperties()(Code)
Retrieves the Set of static properties (which are OgnlPropertyMapping objects). This method is used to retrieve not only this wrapper's Set of static properties (see the addStaticProperty() method for what a static property is), but to also get the properties from any wrapper that this wrapper references, returning a combined Set (it's a Set to ensure that there are no duplicates based upon the property, or OGNL expression, of the OgnlPropertyMapping objects). Returns the Set of "static" properties for this wrapper andany referenced wrapper (no duplicates, though).



getValidatorClass
public Class getValidatorClass()(Code)
Returns the Class of the Validator this class is wrapping (this may retrieve the Class from another wrapper this wrapper references). Returns the Validator this class is wrapping.



isFailFast
public boolean isFailFast()(Code)
Whether this wrapper should report to the validation service not to continue validating if this wrapper finds a failure. Returns if a failure will result in no further validations.



setClassName
public void setClassName(String className)(Code)
Sets the class name of the Validator this class is wrapping.
Parameters:
  className - The class name of the Validator



setDoc
public void setDoc(String documentation)(Code)
Sets the documentation for this configured validator.
Parameters:
  documentation - The documentation for this validator.



setFailFast
public void setFailFast(boolean flag)(Code)
Sets whether this wrapper should report to the validation service not to continue validating if this wrapper finds a failure.
Parameters:
  flag - If true, a failure will result in no further validations.



setId
public void setId(String theId)(Code)
Sets the id of this wrapper. A Validator may or may not have an id. If this wrapper represents a configured validator that's configured as part of a validation set, then it won't have an id.
Parameters:
  theId - The id of this wrapper.



setLabel
public void setLabel(Resource resource, String key)(Code)
Sets the Label for this Validator wrapper. This label is based upon a Resource and a key into that resource.
Parameters:
  resource - The Resource the label's value is in
Parameters:
  key - The key to the label's value



setLabel
public void setLabel(String labelValue)(Code)
Sets the label for this Validator wrapper. This label is a static string.
Parameters:
  labelValue - The value of the label.



setName
public void setName(String theName)(Code)
Sets the name of the validator. This name is a non-unique identifier used to report back on validation failures the validator that was involved in the failure.
Parameters:
  theName - The name of the validator.



setRef
public void setRef(BaseConfiguredValidator configuredValidatorRef)(Code)
Sets a wrapper this wrapper may reference. Consider this reference as a delegated parent.
Parameters:
  configuredValidatorRef - The delegated parent of this wrapper.



setValidationService
public void setValidationService(ValidationService service)(Code)
Sets the ValidationService (ValidationSet) that contains this Validator wrapper.
Parameters:
  service - The ValidationService that contains this wrapper.



validate
public boolean validate(InternalValidatorContext context, ContextBean contextBean, Object obj)(Code)



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.