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


java.lang.Object
   org.iscreen.ValidationFactory

All known Subclasses:   org.iscreen.impl.xml.XmlServiceFactory,  org.iscreen.MockValidationFactory,
ValidationFactory
public class ValidationFactory (Code)
This class represents factories that can generate validation services from configuration files (or however the factory generates them). The static portion of this factory implementation is thread-safe.
author:
   Shellman, Dan


Field Summary
final public static  StringFACTORY_DEFAULT_XML
    
final public static  StringFACTORY_MVEL_XML
    
final public static  StringFACTORY_OGNL_XML
    
protected  StringconfigLocation
    
protected  LocaledefaultLocale
    
protected  MapserviceMap
    

Constructor Summary
protected  ValidationFactory()
     Protected constructor.

Method Summary
public static  ValidationFactorybuildFactory(String factoryId, String configLocation, Locale theDefaultLocale, Map services)
     Builds a registered factory.
public static  ValidationFactorybuildFactory(String factoryId, String configLocation, Map services)
     Builds a registered factory.
protected  StringgetConfigLocation()
     Retrieves the configuration file location for this validation factory. Returns the location of the config file.
protected  LocalegetDefaultLocale()
     Retrieves the default locale for this factory.
protected  MapgetServices()
     Retrieves the map of services available to this factory.
public  ValidationServicegetValidationService(String serviceName)
     Retrieves a validation service with the given service name.
Parameters:
  serviceName - The name of the validation service.
protected  voidloadConfig()
     This method is called to initialize the factory.
public static  voidregisterFactory(Class factoryClass, String factoryId)
     Registers a factory with a given factory id.
protected  voidsetConfigLocation(String location)
     This is called right after the validation factory is instantiated and the services call (setServices()) has been called.
protected  voidsetDefaultLocale(Locale locale)
     Sets the default locale for this factory.
protected  voidsetServices(Map theServices)
     This is called right after the validation factory is instantiated.

Field Detail
FACTORY_DEFAULT_XML
final public static String FACTORY_DEFAULT_XML(Code)



FACTORY_MVEL_XML
final public static String FACTORY_MVEL_XML(Code)



FACTORY_OGNL_XML
final public static String FACTORY_OGNL_XML(Code)



configLocation
protected String configLocation(Code)



defaultLocale
protected Locale defaultLocale(Code)



serviceMap
protected Map serviceMap(Code)




Constructor Detail
ValidationFactory
protected ValidationFactory()(Code)
Protected constructor. In general, validation factories shouldn't be constructed directly (hence the need to register them, etc.).




Method Detail
buildFactory
public static ValidationFactory buildFactory(String factoryId, String configLocation, Locale theDefaultLocale, Map services)(Code)
Builds a registered factory. The factory is tied to the configuration type (such as XML, etc.). Pre-defined factories (constants defined as FACTORY_xxx) are always available.
Parameters:
  factoryId - The id of the factory to retrieve.
Parameters:
  configLocation - Classpath location of the configuration
Parameters:
  theDefaultLocale - The default locale
Parameters:
  services - Services that are necessary for the factory Returns a ValidationFactory. If none exist with the givenid, then a runtime exception is thrown.



buildFactory
public static ValidationFactory buildFactory(String factoryId, String configLocation, Map services)(Code)
Builds a registered factory. The factory is tied to the configuration type (such as XML, etc.). Pre-defined factories (constants defined as FACTORY_xxx) are always available.
Parameters:
  factoryId - The id of the factory to retrieve.
Parameters:
  configLocation - Classpath location of the configuration
Parameters:
  services - Services that are necessary for the factory Returns a ValidationFactory. If none exist with the givenid, then a runtime exception is thrown.



getConfigLocation
protected String getConfigLocation()(Code)
Retrieves the configuration file location for this validation factory. Returns the location of the config file. This may be null.



getDefaultLocale
protected Locale getDefaultLocale()(Code)
Retrieves the default locale for this factory. Returns the default locale for this factory.



getServices
protected Map getServices()(Code)
Retrieves the map of services available to this factory. Returns the map of services.



getValidationService
public ValidationService getValidationService(String serviceName)(Code)
Retrieves a validation service with the given service name.
Parameters:
  serviceName - The name of the validation service. Returns the validation service with the given name.



loadConfig
protected void loadConfig()(Code)
This method is called to initialize the factory. It is called after the services and configuration location have been set. After this call, the factory should be in a state that it can retrieve validation services.



registerFactory
public static void registerFactory(Class factoryClass, String factoryId)(Code)
Registers a factory with a given factory id. Use this method to register a custom-built factory. If a factory of the given id already exists, it will be replaced.
Parameters:
  factoryClass - The class of the factory to register
Parameters:
  factoryId - The id of the factory (used to retrieve it later)



setConfigLocation
protected void setConfigLocation(String location)(Code)
This is called right after the validation factory is instantiated and the services call (setServices()) has been called. This method informs the factory of the config file that will be used. If it's not in the format that the factory expects, the factory should throw an unchecked exception.
Parameters:
  location - The location of the configuration file for the factory.The location is classpath-based.



setDefaultLocale
protected void setDefaultLocale(Locale locale)(Code)
Sets the default locale for this factory.
Parameters:
  locale - The default locale for this factory.



setServices
protected void setServices(Map theServices)(Code)
This is called right after the validation factory is instantiated. This map of services is meant to provide the factory with additional, external services that the factory can make available to validation services.
Parameters:
  theServices - The services to provide to the factory.



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.