|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ephman.abra.tools.plugins.GeneratorPlugin
this class will describe the basics for adding a plugin to the abra generation framework callbacks when parsing xml for information storage and generation calls to run
Constructor Summary | |
GeneratorPlugin()
|
Method Summary | |
protected void |
assertMandatory(java.lang.String field,
java.lang.String name)
|
abstract void |
close()
incase files need to be closed or whatever |
protected abstract ClassPluginData |
createDefault(JClass currentClass)
create a default plugin (ie base taglib, validator |
abstract void |
generate(JClass currentClass)
close and generate are part of Generator inteface |
abstract java.lang.String[] |
getClassLevelNodeNames()
returns the names which are registered to this generator ie. |
java.lang.String |
getDefaultFormatName()
|
abstract java.lang.String[] |
getFieldLevelNodeNames()
returns the names which are registered to this generator but at the field level ie. |
abstract java.lang.String |
getName()
|
protected java.util.HashMap |
getNamedMap(JClass currentClass)
|
protected ClassPluginData |
getPlugin(JClass currentClass,
java.lang.String formatName)
|
abstract void |
handleClassLevelNode(java.lang.String nodeName,
java.util.Map attributes,
JClass currentClass)
call back when the node 'nodeName' which has been registered by this class is encountered |
abstract void |
handleFieldLevelNode(java.lang.String nodeName,
java.util.Map attributes,
JClass currentClass,
JField currentField)
call back when the node 'nodeName' which has been registered by this class is encountered |
protected abstract boolean |
hasDefault()
does this plugin need a call to createDefault ? |
protected void |
registerPlugin(ClassPluginData plugin,
JClass currentClass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GeneratorPlugin()
Method Detail |
public abstract java.lang.String[] getClassLevelNodeNames()
public abstract java.lang.String[] getFieldLevelNodeNames()
public abstract void handleClassLevelNode(java.lang.String nodeName, java.util.Map attributes, JClass currentClass) throws SchemaException
nodeName
- the node name ie "class-view"attributes
- all the attributes in the xml node in key-value hmapcurrentClass
- the JClass on which this node occured
SchemaException
- if the data is invalid.public abstract void handleFieldLevelNode(java.lang.String nodeName, java.util.Map attributes, JClass currentClass, JField currentField) throws SchemaException
nodeName
- the node name ie "view"attributes
- all the attributes in the xml node in key-value hmapcurrentClass
- the JClass on which this node occuredcurrentField
- the JField on which this node occured
SchemaException
- if the data is invalid.public abstract java.lang.String getName()
public abstract void generate(JClass currentClass) throws java.io.IOException, SchemaException
generate
in interface Generator
java.io.IOException
SchemaException
public abstract void close() throws java.io.IOException
close
in interface Generator
java.io.IOException
protected abstract ClassPluginData createDefault(JClass currentClass)
protected abstract boolean hasDefault()
public java.lang.String getDefaultFormatName()
protected void assertMandatory(java.lang.String field, java.lang.String name) throws SchemaException
SchemaException
protected void registerPlugin(ClassPluginData plugin, JClass currentClass)
protected ClassPluginData getPlugin(JClass currentClass, java.lang.String formatName)
protected java.util.HashMap getNamedMap(JClass currentClass)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |