Java Doc for FormValidatorHelper.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » transformation » helpers » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.transformation.helpers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.transformation.helpers.FormValidatorHelper

FormValidatorHelper
public class FormValidatorHelper (Code)
The ValidatorActionResult object helper
author:
   Christian Haul
version:
   CVS $Id: FormValidatorHelper.java 433543 2006-08-22 06:22:54Z crossley $


Field Summary
 Stringcurrent_constraint_set
    
 Stringcurrent_descriptor
    
 Loggercurrent_logger
    
 Stringcurrent_parameter
    
 booleancurrent_reloadable
    
 SourceResolvercurrent_resolver
    

Constructor Summary
public  FormValidatorHelper(String descriptor, boolean reloadable, Logger logger, SourceResolver resolver)
    
public  FormValidatorHelper(String descriptor, boolean reloadable, Logger logger, SourceResolver resolver, String constraintset)
    

Method Summary
public static  ObjectgetAttribute(Map objectModel, String name)
    
protected static  ConfigurationgetConfiguration(String descriptor, SourceResolver resolver, boolean reloadable, Logger logger)
     Set up the complementary configuration file.
protected static  ConfigurationgetConfigurationByName(Configuration[] conf, String name, Logger logger)
     Iterate over a set of configurations and return the one whose name matches the given one.
public static  ValidatorActionResultgetParamResult(Map objectModel, String name)
    
public  ValidatorActionResultgetParamResult(Map objectModel)
    
public  StringgetParameterAttribute(String attribute)
     Get an attribute for the context's current parameter as specified in descriptor.xml.
public  StringgetParameterAttribute(String parameter, String attribute)
     Get an attribute for a parameter as specified in descriptor.xml.
public static  StringgetParameterAttributes(String descriptor, SourceResolver resolver, boolean reloadable, String constraintset, String parameter, String attribute, Logger logger)
     Get an attribute for a parameter as specified in descriptor.xml.
Parameters:
  descriptor - URL of descriptor.xml file @see org.apache.cocoon.acting.AbstractComplimentaryConfigurableAction
Parameters:
  resolver -
Parameters:
  reloadable - set to true if changes ofdescriptor should trigger a reload.
public static  MapgetResults(Map objectModel)
    
public static  booleanisError(Map objectModel, String name)
     Test whether the validation returned an error for this parameter.
public  booleanisError(Map objectModel)
     Test whether the validation returned an error for the context's current parameter.
public static  booleanisNoMatch(Map objectModel, String name)
     Test whether the validated parameter wasn't matched by the requested regular expression.
public  booleanisNoMatch(Map objectModel)
     Test whether the context's current parameter wasn't matched by the requested regular expression.
public static  booleanisNotPresent(Map objectModel, String name)
    
public  booleanisNotPresent(Map objectModel)
    
public static  booleanisNull(Map objectModel, String name)
     Test whether the validated parameter was null but wasn't allowed to.
public  booleanisNull(Map objectModel)
     Test whether the context's current parameter as validated was null but wasn't allowed to.
public static  booleanisOK(Map objectModel, String name)
     Test whether the validation returned no error for this parameter.
public  booleanisOK(Map objectModel)
     Test whether the validation returned no error for the context's current parameter.
public static  booleanisTooLarge(Map objectModel, String name)
     Test whether the validated parameter was too large.
public  booleanisTooLarge(Map objectModel)
     Test whether the context's current parameter was too large.
public static  booleanisTooSmall(Map objectModel, String name)
     Test whether the validated parameter was too small.
public  booleanisTooSmall(Map objectModel)
     Test whether the context's current parameter was too small.
public  voidsetConstraintSet(String constraintset)
    
public  voidsetParameter(String parameter)
    

Field Detail
current_constraint_set
String current_constraint_set(Code)



current_descriptor
String current_descriptor(Code)
these make it easier for the xsl



current_logger
Logger current_logger(Code)



current_parameter
String current_parameter(Code)



current_reloadable
boolean current_reloadable(Code)



current_resolver
SourceResolver current_resolver(Code)




Constructor Detail
FormValidatorHelper
public FormValidatorHelper(String descriptor, boolean reloadable, Logger logger, SourceResolver resolver)(Code)



FormValidatorHelper
public FormValidatorHelper(String descriptor, boolean reloadable, Logger logger, SourceResolver resolver, String constraintset)(Code)




Method Detail
getAttribute
public static Object getAttribute(Map objectModel, String name)(Code)
Get the specified attribute
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - The parameter name



getConfiguration
protected static Configuration getConfiguration(String descriptor, SourceResolver resolver, boolean reloadable, Logger logger) throws ConfigurationException(Code)
Set up the complementary configuration file. Please note that multiple Actions can share the same configurations. By using this approach, we can limit the number of config files. Also note that the configuration file does not have to be a file. This is based on the similar named functions in org.apache.cocoon.acting.AbstractComplimentaryConfigurableAction with the addition of reloadable configuration files, reloadable flagg, manager, and logger parameter.
Parameters:
  descriptor - URL of descriptor.xml file @see org.apache.cocoon.acting.AbstractComplimentaryConfigurableAction
Parameters:
  resolver -
Parameters:
  reloadable - set to true if changes ofdescriptor should trigger a reload. Note that thisonly works if Source is able to determine themodification time @see org.apache.cocoon.environment.Source
Parameters:
  logger - used to send debug and error messages to up-to-date configuration, either (re)loaded or cached.



getConfigurationByName
protected static Configuration getConfigurationByName(Configuration[] conf, String name, Logger logger)(Code)
Iterate over a set of configurations and return the one whose name matches the given one.
Parameters:
  conf - set of configurations
Parameters:
  name - name of configuration
Parameters:
  logger - specified configuration or null if not found.



getParamResult
public static ValidatorActionResult getParamResult(Map objectModel, String name)(Code)
Extracts the validation results from the request attribute for a specific request parameter
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - Request parameter's name
See Also:   org.apache.cocoon.acting.ValidatorActionResult



getParamResult
public ValidatorActionResult getParamResult(Map objectModel)(Code)
Extracts the validation results from the request attribute for the context's current request parameter
Parameters:
  objectModel - The Map objectModel
See Also:   org.apache.cocoon.acting.ValidatorActionResult



getParameterAttribute
public String getParameterAttribute(String attribute)(Code)
Get an attribute for the context's current parameter as specified in descriptor.xml.
Parameters:
  attribute - attribute name attribute value or null



getParameterAttribute
public String getParameterAttribute(String parameter, String attribute)(Code)
Get an attribute for a parameter as specified in descriptor.xml.
Parameters:
  attribute - attribute name attribute value or null



getParameterAttributes
public static String getParameterAttributes(String descriptor, SourceResolver resolver, boolean reloadable, String constraintset, String parameter, String attribute, Logger logger)(Code)
Get an attribute for a parameter as specified in descriptor.xml.
Parameters:
  descriptor - URL of descriptor.xml file @see org.apache.cocoon.acting.AbstractComplimentaryConfigurableAction
Parameters:
  resolver -
Parameters:
  reloadable - set to true if changes ofdescriptor should trigger a reload. Note that thisonly works if Source is able to determine themodification time @see org.apache.cocoon.environment.Source
Parameters:
  logger - used to send debug and error messages to
Parameters:
  attribute - attribute name attribute value or null



getResults
public static Map getResults(Map objectModel)(Code)
Extracts the validation results from the request attribute
Parameters:
  objectModel - The Map objectModel Map with ValidatorActionResults
See Also:   org.apache.cocoon.acting.ValidatorActionResult



isError
public static boolean isError(Map objectModel, String name)(Code)
Test whether the validation returned an error for this parameter.
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - Request parameter's name true if the parameter was either not validated or the validationreturned an error.



isError
public boolean isError(Map objectModel)(Code)
Test whether the validation returned an error for the context's current parameter.
Parameters:
  objectModel - The Map objectModel true if the parameter was either not validated or the validationreturned an error.



isNoMatch
public static boolean isNoMatch(Map objectModel, String name)(Code)
Test whether the validated parameter wasn't matched by the requested regular expression.
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - Request parameter's name true if the parameter was validated and the validationreturned an error because its value wasn't matched by the requestedregular expression.



isNoMatch
public boolean isNoMatch(Map objectModel)(Code)
Test whether the context's current parameter wasn't matched by the requested regular expression.
Parameters:
  objectModel - The Map objectModel true if the parameter was validated and the validationreturned an error because its value wasn't matched by the requestedregular expression.



isNotPresent
public static boolean isNotPresent(Map objectModel, String name)(Code)
Test whether the validated parameter wasn't validated
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - Request parameter's name true if the parameter was not validated.



isNotPresent
public boolean isNotPresent(Map objectModel)(Code)
Test whether the context's current parameter wasn't validated
Parameters:
  objectModel - The Map objectModel true if the parameter was not validated.



isNull
public static boolean isNull(Map objectModel, String name)(Code)
Test whether the validated parameter was null but wasn't allowed to.
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - Request parameter's name true if the parameter was validated and the validationreturned an error because the parameter was null but wasn't allowd to.



isNull
public boolean isNull(Map objectModel)(Code)
Test whether the context's current parameter as validated was null but wasn't allowed to.
Parameters:
  objectModel - The Map objectModel true if the parameter was validated and the validationreturned an error because the parameter was null but wasn't allowd to.



isOK
public static boolean isOK(Map objectModel, String name)(Code)
Test whether the validation returned no error for this parameter.
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - Request parameter's name true only if the parameter was validated and the validationdid not return an error.



isOK
public boolean isOK(Map objectModel)(Code)
Test whether the validation returned no error for the context's current parameter.
Parameters:
  objectModel - The Map objectModel true only if the parameter was validated and the validationdid not return an error.



isTooLarge
public static boolean isTooLarge(Map objectModel, String name)(Code)
Test whether the validated parameter was too large.
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - Request parameter's name true if the parameter was validated and the validationreturned an error because either its value or its length wastoo large.



isTooLarge
public boolean isTooLarge(Map objectModel)(Code)
Test whether the context's current parameter was too large.
Parameters:
  objectModel - The Map objectModel true if the parameter was validated and the validationreturned an error because either its value or its length wastoo large.



isTooSmall
public static boolean isTooSmall(Map objectModel, String name)(Code)
Test whether the validated parameter was too small.
Parameters:
  objectModel - The Map objectModel
Parameters:
  name - Request parameter's name true if the parameter was validated and the validationreturned an error because either its value or its length wastoo small.



isTooSmall
public boolean isTooSmall(Map objectModel)(Code)
Test whether the context's current parameter was too small.
Parameters:
  objectModel - The Map objectModel true if the parameter was validated and the validationreturned an error because either its value or its length wastoo small.



setConstraintSet
public void setConstraintSet(String constraintset)(Code)
keep track of current constraint-set context (probably this is not needed?)



setParameter
public void setParameter(String parameter)(Code)
keep track of current parameter context



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.