Java Doc for PluginCreateRule.java in  » Library » Apache-commons-digester-1.8-src » org » apache » commons » digester » 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 » Library » Apache commons digester 1.8 src » org.apache.commons.digester.plugins 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.digester.Rule
      org.apache.commons.digester.plugins.PluginCreateRule

PluginCreateRule
public class PluginCreateRule extends Rule implements InitializableRule(Code)
Allows the original rules for parsing the configuration file to define points at which plugins are allowed, by configuring a PluginCreateRule with the appropriate pattern.
since:
   1.6



Constructor Summary
public  PluginCreateRule(Class baseClass)
     Create a plugin rule where the user must specify a plugin-class or plugin-id.
public  PluginCreateRule(Class baseClass, Class dfltPluginClass)
     Create a plugin rule where the user may specify a plugin. If the user doesn't specify a plugin, then the default class specified in this constructor is used.
Parameters:
  baseClass - is the class which any specified plugin must bedescended from.
Parameters:
  dfltPluginClass - is the class which will be used if the userdoesn't specify any plugin-class or plugin-id.
public  PluginCreateRule(Class baseClass, Class dfltPluginClass, RuleLoader dfltPluginRuleLoader)
     Create a plugin rule where the user may specify a plugin. If the user doesn't specify a plugin, then the default class specified in this constructor is used.
Parameters:
  baseClass - is the class which any specified plugin must bedescended from.
Parameters:
  dfltPluginClass - is the class which will be used if the userdoesn't specify any plugin-class or plugin-id.

Method Summary
public  voidbegin(String namespace, String name, org.xml.sax.Attributes attributes)
     Invoked when the Digester matches this rule against an xml element.

A new instance of the target class is created, and pushed onto the stack.

public  voidbody(String namespace, String name, String text)
     Process the body text of this element.
public  voidend(String namespace, String name)
     Invoked by the digester when the closing tag matching this Rule's pattern is encountered.
public  voidfireBeginMethods(List rules, String namespace, String name, org.xml.sax.Attributes list)
     Duplicate the processing that the Digester does when firing the begin methods of rules.
public  voidfireEndMethods(List rules, String namespaceURI, String name)
     Duplicate the processing that the Digester does when firing the end methods of rules.
public  StringgetPattern()
     Return the pattern that this Rule is associated with.

In general, Rule instances can be associated with multiple patterns.

public  voidpostRegisterInit(String matchPattern)
     Invoked after this rule has been added to the set of digester rules, associated with the specified pattern.
public  voidsetPluginClassAttribute(String namespaceUri, String attrName)
     Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which class should be instantiated.
public  voidsetPluginIdAttribute(String namespaceUri, String attrName)
     Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which plugin declaration is being referenced.


Constructor Detail
PluginCreateRule
public PluginCreateRule(Class baseClass)(Code)
Create a plugin rule where the user must specify a plugin-class or plugin-id.
Parameters:
  baseClass - is the class which any specified plugin must bedescended from.



PluginCreateRule
public PluginCreateRule(Class baseClass, Class dfltPluginClass)(Code)
Create a plugin rule where the user may specify a plugin. If the user doesn't specify a plugin, then the default class specified in this constructor is used.
Parameters:
  baseClass - is the class which any specified plugin must bedescended from.
Parameters:
  dfltPluginClass - is the class which will be used if the userdoesn't specify any plugin-class or plugin-id. This class will havecustom rules installed for it just like a declared plugin.



PluginCreateRule
public PluginCreateRule(Class baseClass, Class dfltPluginClass, RuleLoader dfltPluginRuleLoader)(Code)
Create a plugin rule where the user may specify a plugin. If the user doesn't specify a plugin, then the default class specified in this constructor is used.
Parameters:
  baseClass - is the class which any specified plugin must bedescended from.
Parameters:
  dfltPluginClass - is the class which will be used if the userdoesn't specify any plugin-class or plugin-id. This class will havecustom rules installed for it just like a declared plugin.
Parameters:
  dfltPluginRuleLoader - is a RuleLoader instance which knows howto load the custom rules associated with this default plugin.




Method Detail
begin
public void begin(String namespace, String name, org.xml.sax.Attributes attributes) throws java.lang.Exception(Code)
Invoked when the Digester matches this rule against an xml element.

A new instance of the target class is created, and pushed onto the stack. A new "private" PluginRules object is then created and set as the digester's default Rules object. Any custom rules associated with the plugin class are then loaded into that new Rules object. Finally, any custom rules that are associated with the current pattern (such as SetPropertiesRules) have their begin methods executed.
Parameters:
  namespace -
Parameters:
  name -
Parameters:
  attributes -
throws:
  ClassNotFoundException -
throws:
  PluginInvalidInputException -
throws:
  PluginConfigurationException -




body
public void body(String namespace, String name, String text) throws Exception(Code)
Process the body text of this element.
Parameters:
  text - The body text of this element



end
public void end(String namespace, String name) throws Exception(Code)
Invoked by the digester when the closing tag matching this Rule's pattern is encountered.


Parameters:
  namespace - Description of the Parameter
Parameters:
  name - Description of the Parameter
exception:
  Exception - Description of the Exception
See Also:   PluginCreateRule.begin



fireBeginMethods
public void fireBeginMethods(List rules, String namespace, String name, org.xml.sax.Attributes list) throws java.lang.Exception(Code)
Duplicate the processing that the Digester does when firing the begin methods of rules. It would be really nice if the Digester class provided a way for this functionality to just be invoked directly.



fireEndMethods
public void fireEndMethods(List rules, String namespaceURI, String name) throws Exception(Code)
Duplicate the processing that the Digester does when firing the end methods of rules. It would be really nice if the Digester class provided a way for this functionality to just be invoked directly.



getPattern
public String getPattern()(Code)
Return the pattern that this Rule is associated with.

In general, Rule instances can be associated with multiple patterns. A PluginCreateRule, however, will only function correctly when associated with a single pattern. It is possible to fix this, but I can't be bothered just now because this feature is unlikely to be used.

The pattern value



postRegisterInit
public void postRegisterInit(String matchPattern) throws PluginConfigurationException(Code)
Invoked after this rule has been added to the set of digester rules, associated with the specified pattern. Check all configuration data is valid and remember the pattern for later.
Parameters:
  matchPattern - is the digester match pattern that is associated with this rule instance, eg "root/widget".
exception:
  PluginConfigurationException -



setPluginClassAttribute
public void setPluginClassAttribute(String namespaceUri, String attrName)(Code)
Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which class should be instantiated.

See PluginRules.setPluginClassAttribute for more info.




setPluginIdAttribute
public void setPluginIdAttribute(String namespaceUri, String attrName)(Code)
Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which plugin declaration is being referenced.

See PluginRules.setPluginIdAttribute for more info.




Fields inherited from org.apache.commons.digester.Rule
protected Digester digester(Code)(Java Doc)
protected String namespaceURI(Code)(Java Doc)

Methods inherited from org.apache.commons.digester.Rule
public void begin(Attributes attributes) throws Exception(Code)(Java Doc)
public void begin(String namespace, String name, Attributes attributes) throws Exception(Code)(Java Doc)
public void body(String text) throws Exception(Code)(Java Doc)
public void body(String namespace, String name, String text) throws Exception(Code)(Java Doc)
public void end() throws Exception(Code)(Java Doc)
public void end(String namespace, String name) throws Exception(Code)(Java Doc)
public void finish() throws Exception(Code)(Java Doc)
public Digester getDigester()(Code)(Java Doc)
public String getNamespaceURI()(Code)(Java Doc)
public void setDigester(Digester digester)(Code)(Java Doc)
public void setNamespaceURI(String namespaceURI)(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.