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


java.lang.Object
   org.iscreen.ValidationFactory
      org.iscreen.impl.xml.XmlServiceFactory

All known Subclasses:   org.iscreen.mvel.MvelXmlServiceFactory,  org.iscreen.ognl.OgnlXmlServiceFactory,
XmlServiceFactory
abstract public class XmlServiceFactory extends ValidationFactory (Code)
This is a base class used by the parser for registering configuration events with a ValidationFactory. It's meant to be subclassed by a service factory that understands the XML configuration file and can construct the internal configuration of it.
author:
   Shellman, Dan


Field Summary
protected  MapresourceMap
    
protected  MapsetMap
    
protected  MapvalidatorMap
    

Constructor Summary
public  XmlServiceFactory()
     Default constructor.

Method Summary
abstract public  voidaddValidationSetToSet(String setId, String setRefId, boolean failFastFlag, String name, String ifExp, String iterateExp, String mapExp)
     Adds a validation set reference call to a validation set.
abstract public  voidaddValidatorToSet(String setId, String globalDefaultResource, String defaultResource, String validatorRef, boolean failFastFlag, String validatorName, XmlConfigLabel label, XmlConfigDoc doc, Set mappings, Set constraints, Set failures)
     Adds a 'use-validator' to a Validation Set.
public  ConfiguredResourcegetResource(String id)
     Retrieves a ConfiguredResource for the given id.
public  ConfiguredResourcegetResource(String id1, String id2, String id3)
     Retrieves a resource based upon a set of id's.
public  ValidationServicegetValidationService(String serviceName)
     Retrieves a validation service with the given service name.
Parameters:
  serviceName - The name of the validation service.
protected  voidloadConfig()
     Called to initialize the configuration (loads the XML config file).
public  voidregisterInclude(String location)
     Registers an included file (for parsing).
public  voidregisterResource(String id, String ref, Set messages, Set resourceFiles)
     Registers a resource with its id (and parent ref, if there is one), hard-coded messages, and resource bundle locations.
public  voidregisterService(String serviceId, Object service)
     Registers a service with the factory.
abstract public  voidregisterValidationSet(String id)
     Registers a Validation Set.
abstract public  voidregisterValidator(String globalDefaultResource, String id, String ref, String className, String defaultResource, XmlConfigLabel label, XmlConfigDoc doc, Set mappings, Set constraints, Set failures)
     Registers an individual Validator configuration.

Field Detail
resourceMap
protected Map resourceMap(Code)



setMap
protected Map setMap(Code)



validatorMap
protected Map validatorMap(Code)




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




Method Detail
addValidationSetToSet
abstract public void addValidationSetToSet(String setId, String setRefId, boolean failFastFlag, String name, String ifExp, String iterateExp, String mapExp)(Code)
Adds a validation set reference call to a validation set.
Parameters:
  setId - The id of the containing Validation Set.
Parameters:
  setRefId - The id of the Validation Set being referenced.
Parameters:
  failFastFlag - Whether to continue validations if the setreports a failure.
Parameters:
  ifExp - Whether to execute the validations in the referenced set.
Parameters:
  iterateExp - Whether to iterate over the objects being mappedand validate each one.
Parameters:
  mapExp - The mapping expression.



addValidatorToSet
abstract public void addValidatorToSet(String setId, String globalDefaultResource, String defaultResource, String validatorRef, boolean failFastFlag, String validatorName, XmlConfigLabel label, XmlConfigDoc doc, Set mappings, Set constraints, Set failures)(Code)
Adds a 'use-validator' to a Validation Set. The 'use-validator' must reference a Validator.
Parameters:
  setId - The Validation Set id.
Parameters:
  globalDefaultResource - The configuration file's default resource(can be null/empty).
Parameters:
  defaultResource - The Validation Set's default resource (optional).
Parameters:
  validatorRef - The reference to a Validator (required).
Parameters:
  failFastFlag - Whether to stop validations if this validator fails.
Parameters:
  label - The label for this validator.
Parameters:
  doc - The documentation for this validator.
Parameters:
  mappings - The mappings for this validator.
Parameters:
  constraints - The constraints for this validator.
Parameters:
  failures - The failures for this validator.



getResource
public ConfiguredResource getResource(String id)(Code)
Retrieves a ConfiguredResource for the given id. If no resource exists with that id, then a blank one is created and returned.
Parameters:
  id - The id of the resource Returns a ConfiguredResource for the given id.



getResource
public ConfiguredResource getResource(String id1, String id2, String id3)(Code)
Retrieves a resource based upon a set of id's. If the 'id1' is a valid resource id, then return that one. If not, and 'id2' is a valid resource id, then return that one. If not, and 'id3' is a valid resource id, then return that one. If none of the id's are valid, then throw an exception.
Parameters:
  id1 - The first resource id to look for.
Parameters:
  id2 - The second resource id to look for.
Parameters:
  id3 - The third resource id to look for. Returns the ConfiguredResource of the first valid resource id.



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)
Called to initialize the configuration (loads the XML config file).



registerInclude
public void registerInclude(String location)(Code)
Registers an included file (for parsing). The location defines a classpath-based location of the XML file.
Parameters:
  location - The location of the XML file.



registerResource
public void registerResource(String id, String ref, Set messages, Set resourceFiles)(Code)
Registers a resource with its id (and parent ref, if there is one), hard-coded messages, and resource bundle locations. Note that the Set of messages and resource files MUST NOT be null (if there are none, just pass in an empty Set).
Parameters:
  id - The unique id of the resource.
Parameters:
  ref - The unique id of the parent resource this resource is referencing.
Parameters:
  messages - Set of XmlConfigMessage objects (can't be null)
Parameters:
  resourceFiles - Set of Strings representing resource bundle locations.



registerService
public void registerService(String serviceId, Object service)(Code)
Registers a service with the factory. This service can then be referenced by validators via configuration.
Parameters:
  serviceId - The service id
Parameters:
  service - The service



registerValidationSet
abstract public void registerValidationSet(String id)(Code)
Registers a Validation Set.
Parameters:
  id - The validation set's unique id.



registerValidator
abstract public void registerValidator(String globalDefaultResource, String id, String ref, String className, String defaultResource, XmlConfigLabel label, XmlConfigDoc doc, Set mappings, Set constraints, Set failures)(Code)
Registers an individual Validator configuration. This will create a configured Validator that can be referenced by other Validators or by adding a Validator to a Validation Set.
Parameters:
  globalDefaultResource - The resource id, when all else fails.
Parameters:
  id - The unique id of the Validator
Parameters:
  ref - The unique id of the Validator this Validator references.This can be null and is optional.
Parameters:
  className - The class name of the Validator (optional, but ifthere MUST be a valid ref).
Parameters:
  defaultResource - The resource id if no id is defined locally.
Parameters:
  label - The Label for the Validator. This is optional.
Parameters:
  doc - The documentation for the Validator. This is optional.
Parameters:
  mappings - The Set of mappings (can't be null, but can be empty).
Parameters:
  constraints - The Set of constraints (can't be null, but can be empty).
Parameters:
  failures - The Set of failures (can't be null, but can be empty).



Fields inherited from org.iscreen.ValidationFactory
final public static String FACTORY_DEFAULT_XML(Code)(Java Doc)
final public static String FACTORY_MVEL_XML(Code)(Java Doc)
final public static String FACTORY_OGNL_XML(Code)(Java Doc)
protected String configLocation(Code)(Java Doc)
protected Locale defaultLocale(Code)(Java Doc)
protected Map serviceMap(Code)(Java Doc)

Methods inherited from org.iscreen.ValidationFactory
public static ValidationFactory buildFactory(String factoryId, String configLocation, Locale theDefaultLocale, Map services)(Code)(Java Doc)
public static ValidationFactory buildFactory(String factoryId, String configLocation, Map services)(Code)(Java Doc)
protected String getConfigLocation()(Code)(Java Doc)
protected Locale getDefaultLocale()(Code)(Java Doc)
protected Map getServices()(Code)(Java Doc)
public ValidationService getValidationService(String serviceName)(Code)(Java Doc)
protected void loadConfig()(Code)(Java Doc)
public static void registerFactory(Class factoryClass, String factoryId)(Code)(Java Doc)
protected void setConfigLocation(String location)(Code)(Java Doc)
protected void setDefaultLocale(Locale locale)(Code)(Java Doc)
protected void setServices(Map theServices)(Code)(Java Doc)

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.