Java Doc for DigestingPlugIn.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » plugins » 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 » Web Framework » struts 1.3.8 » org.apache.struts.plugins 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.struts.plugins.DigestingPlugIn

DigestingPlugIn
public class DigestingPlugIn implements PlugIn(Code)

An implementation of PlugIn which can be configured to instantiate a graph of objects using the Commons Digester and place the root object of that graph into the Application context.


version:
   $Rev: 471754 $
See Also:   org.apache.struts.action.PlugIn
since:
   Struts 1.2


Field Summary
final protected static  StringSOURCE_CLASSPATH
    
final protected static  StringSOURCE_FILE
    
final protected static  StringSOURCE_SERVLET
    
protected  StringconfigPath
    
protected  StringconfigSource
    
protected  StringdigesterPath
    
protected  StringdigesterSource
    
protected  Stringkey
    
protected  ModuleConfigmoduleConfig
    
protected  booleanpush
    
protected  Stringrulesets
    
protected  ActionServletservlet
    

Constructor Summary
public  DigestingPlugIn()
     Constructor for DigestingPlugIn.

Method Summary
protected  voidapplyRuleSets(Digester digester)
     Instantiate any RuleSet classes defined in the rulesets property and use them to add rules to our Digester.
public  voiddestroy()
     Receive notification that our owning module is being shut down.
protected  DigesterdigesterFromXml(String path, String source)
    
protected  URLgetClassPathURL(String path)
     Given a string, return a URL to a classpath resource of that name.
Parameters:
  path - a Classpath-relative string identifying a resource.
public  StringgetConfigPath()
    
public  StringgetConfigSource()
    
protected  URLgetConfigURL(String path, String source)
    
public  StringgetDigesterPath()
    
public  StringgetDigesterSource()
    
protected  URLgetFileURL(String path)
     Given a string, return a URL to a Filesystem resource of that name.
Parameters:
  path - a path to a file.
public  StringgetKey()
    
public  booleangetPush()
    
public  StringgetRulesets()
    
protected  URLgetServletContextURL(String path)
     Given a string, return a URL to a Servlet Context resource of that name.
Parameters:
  path - a Classpath-relative string identifying a resource.
public  voidinit(ActionServlet servlet, ModuleConfig config)
    
protected  DigesterinitializeDigester()
     Initialize the Digester which will be used to process the main configuration.
protected  DigesternewDigesterInstance()
    
public  voidsetConfigPath(String configPath)
    
public  voidsetConfigSource(String configSource)
     Set the source of the config file.
public  voidsetDigesterPath(String digesterPath)
    

The path to a Digester XML configuration file, relative to the digesterSource property.

public  voidsetDigesterSource(String digesterSource)
    

The lookup mechanism to be used to resolve digesterPath (optional).

public  voidsetKey(String key)
    
public  voidsetPush(boolean push)
    
public  voidsetRulesets(String ruleSets)
    

A comma-delimited list of one or more classes which implement org.apache.commons.digester.RuleSet.

protected  voidstoreGeneratedObject(Object obj)
     This method is called after the Digester runs to store the generated object somewhere.

Field Detail
SOURCE_CLASSPATH
final protected static String SOURCE_CLASSPATH(Code)



SOURCE_FILE
final protected static String SOURCE_FILE(Code)



SOURCE_SERVLET
final protected static String SOURCE_SERVLET(Code)



configPath
protected String configPath(Code)



configSource
protected String configSource(Code)



digesterPath
protected String digesterPath(Code)



digesterSource
protected String digesterSource(Code)



key
protected String key(Code)



moduleConfig
protected ModuleConfig moduleConfig(Code)



push
protected boolean push(Code)



rulesets
protected String rulesets(Code)



servlet
protected ActionServlet servlet(Code)




Constructor Detail
DigestingPlugIn
public DigestingPlugIn()(Code)
Constructor for DigestingPlugIn.




Method Detail
applyRuleSets
protected void applyRuleSets(Digester digester) throws ServletException(Code)
Instantiate any RuleSet classes defined in the rulesets property and use them to add rules to our Digester.
Parameters:
  digester - the Digester instance to add RuleSet objects to.
throws:
  ServletException -



destroy
public void destroy()(Code)
Receive notification that our owning module is being shut down.



digesterFromXml
protected Digester digesterFromXml(String path, String source) throws IOException(Code)

Instantiate a Digester from an XML input stream using the Commons DigesterLoader.


Parameters:
  path - the path to the digester rules XML to be found usingsource
Parameters:
  source - a string indicating the lookup method to be used withpath a configured Digester
throws:
  FileNotFoundException -
throws:
  MalformedURLException -
See Also:   DigestingPlugIn.getConfigURL(String,String)



getClassPathURL
protected URL getClassPathURL(String path)(Code)
Given a string, return a URL to a classpath resource of that name.
Parameters:
  path - a Classpath-relative string identifying a resource. a URL identifying the resource on the classpath. TODO Do weneed to be smarter about ClassLoaders?



getConfigPath
public String getConfigPath()(Code)
the configPath property
See Also:   DigestingPlugIn.configSource



getConfigSource
public String getConfigSource()(Code)
the string describing which access method should be used toresolve configPath.
See Also:   DigestingPlugIn.configPath



getConfigURL
protected URL getConfigURL(String path, String source) throws IOException(Code)

Look up a resource path using one of a set of known path resolution mechanisms and return a URL to the resource.


Parameters:
  path - a String which is meaningful to one of the knownresolution mechanisms.
Parameters:
  source - one of the known path resolution mechanisms:
  • file - the path is a fully-qualified filesystempath.
  • servlet - the path is a servlet-context relativepath.
  • classpath - the path is a classpath-relativepath.
a URL pointing to the given path in the given mechanism.
throws:
  java.io.FileNotFoundException -
throws:
  java.net.MalformedURLException -



getDigesterPath
public String getDigesterPath()(Code)
the configured path to a Digester XML config file, or null.
See Also:   DigestingPlugIn.digesterSource
See Also:   DigestingPlugIn.getConfigURL(String,String)



getDigesterSource
public String getDigesterSource()(Code)
the configured lookup mechanism for resolvingdigesterPath.
See Also:   DigestingPlugIn.getConfigURL(String,String)



getFileURL
protected URL getFileURL(String path) throws IOException(Code)
Given a string, return a URL to a Filesystem resource of that name.
Parameters:
  path - a path to a file. a URL identifying the resource in the in the file system.
throws:
  MalformedURLException -
throws:
  FileNotFoundException -



getKey
public String getKey()(Code)
The ServletContext attribute name the generated object isstored under.



getPush
public boolean getPush()(Code)
Whether or not this PlugIn instance will be pushedonto the Digester stack beforedigester.parse() is called.



getRulesets
public String getRulesets()(Code)
The configured list of RuleSet classes.



getServletContextURL
protected URL getServletContextURL(String path) throws IOException(Code)
Given a string, return a URL to a Servlet Context resource of that name.
Parameters:
  path - a Classpath-relative string identifying a resource. a URL identifying the resource in the Servlet Context
throws:
  MalformedURLException -



init
public void init(ActionServlet servlet, ModuleConfig config) throws ServletException(Code)

Initialize a Digester and use it to parse a configuration file, resulting in a root object which will be placed into the ServletContext.


Parameters:
  servlet - ActionServlet that is managing all the modules in thisweb application
Parameters:
  config - ModuleConfig for the module with which this plug-in isassociated
throws:
  ServletException - if this PlugIn cannot besuccessfully initialized



initializeDigester
protected Digester initializeDigester() throws ServletException(Code)
Initialize the Digester which will be used to process the main configuration. a Digester, ready to use.
throws:
  ServletException -



newDigesterInstance
protected Digester newDigesterInstance()(Code)

Instantiate a Digester.

Subclasses may wish to override this to provide a subclass of Digester, or to configure the Digester using object methods.

a basic instance of org.apache.commons.digester.Digester



setConfigPath
public void setConfigPath(String configPath)(Code)

Parameters:
  configPath - the path to configuration information for thisPlugIn.
See Also:   DigestingPlugIn.configSource



setConfigSource
public void setConfigSource(String configSource)(Code)
Set the source of the config file. Should be one of the following:
  • "classpath" - indicates that the configPath will be resolved by the ClassLoader.
  • "file" - indicates that the configPath is a fully-qualified filesystem path.
  • "servlet" - indicates that the configPath will be found by the ServletContext.

Parameters:
  configSource - the source (lookup method) for the config file.
See Also:   DigestingPlugIn.configPath



setDigesterPath
public void setDigesterPath(String digesterPath)(Code)

The path to a Digester XML configuration file, relative to the digesterSource property. (Optional)


See Also:   DigestingPlugIn.digesterSource
See Also:   DigestingPlugIn.getConfigURL(String,String)



setDigesterSource
public void setDigesterSource(String digesterSource)(Code)

The lookup mechanism to be used to resolve digesterPath (optional).


Parameters:
  digesterSource -
See Also:   DigestingPlugIn.getConfigURL(String,String)



setKey
public void setKey(String key)(Code)

Parameters:
  key - The ServletContext attribute name to store the generatedobject under.



setPush
public void setPush(boolean push)(Code)

If set to true, this PlugIn will be pushed onto the Digester stack before the digester parse method is called.

Defaults to false


Parameters:
  push -



setRulesets
public void setRulesets(String ruleSets)(Code)

A comma-delimited list of one or more classes which implement org.apache.commons.digester.RuleSet. (Optional)




storeGeneratedObject
protected void storeGeneratedObject(Object obj)(Code)
This method is called after the Digester runs to store the generated object somewhere. This implementation places the given object into the ServletContext under the attribute name as defined in key.
Parameters:
  obj - The object to save.



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.