|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.digester3.plugins.PluginManager
public class PluginManager
Coordinates between PluginDeclarationRule and PluginCreateRule objects, providing a place to share data between instances of these rules.
One instance of this class exists per PluginRules instance.
Constructor Summary | |
---|---|
PluginManager(PluginContext r)
Construct a "root" PluginManager, ie one with no parent. |
|
PluginManager(PluginManager parent)
Construct a "child" PluginManager. |
Method Summary | |
---|---|
void |
addDeclaration(Declaration decl)
Add the declaration to the set of known declarations. |
RuleLoader |
findLoader(Digester digester,
String id,
Class<?> pluginClass,
Properties props)
Given a plugin class and some associated properties, scan the list of known RuleFinder instances until one detects a source of custom rules for this plugin (aka a RuleLoader). |
Declaration |
getDeclarationByClass(String className)
Return the declaration object with the specified class. |
Declaration |
getDeclarationById(String id)
Return the declaration object with the specified id. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginManager(PluginContext r)
r
- The object containing data that should only exist once for each Digester instance.public PluginManager(PluginManager parent)
parent
- must be non-null.Method Detail |
---|
public void addDeclaration(Declaration decl)
TODO: somehow get a reference to a Digester object so that we can really log here. Currently, all logging is disabled from this method.
decl
- an object representing a plugin class.public Declaration getDeclarationByClass(String className)
className
- The Declaration
class name
public Declaration getDeclarationById(String id)
id
- Description of the Parameter
public RuleLoader findLoader(Digester digester, String id, Class<?> pluginClass, Properties props) throws PluginException
If no source of custom rules can be found, null is returned.
digester
- The digester instance where locating plugin classesid
- The id that the user associated with a particular plugin declaration in the input xmlpluginClass
- The plugin Java classprops
- The properties object that holds any xml attributes the user may have specified on the plugin
declaration in order to indicate how to locate the plugin rules.
PluginException
- if any error occurs while finding the loader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |