www.element4solution.com

e4s.db.dict.plugins
Interface AEP_DictionaryPlugIn

All Known Implementing Classes:
E4DBDictPlugInRepository, E4DBDictPlugInTypeReferenceChange

public interface AEP_DictionaryPlugIn

This class is a good possibility and entry point to use the meta datadictionary for own purposes. Implementation might not be easy at all, but possible resulting functionality can be very powerful. This is a plug-in application exit point (AEP) to the E4S data dictionary. The datadictionary, represented by an object of class E4DBDict holds meta information about types, tables and views. Based on these definitions it can make sense to generate "own" Java classes in a development process. This class covers the main entry points to hook into the database/table generators. Plugins are defined by their class name in the system property file, using E4DBSettings.DICT_PLUGINS entries, seperated by commas. Plugins can be part of the E4S environment (such as E4DBDictPlugInTypeReferenceChange) or they can be part of an application. When a E4DBTable, E4DBView or E4DBType is generated then the associated plugin function (e.g. generateTable_Modify(E4DBTable, E4DBJavaGeneratorPrintStream) will be involved. Plugins must take care for their own data storage which is part of the .xml meta-datadictionary definition, between the E4DBXmlDictionaryHandler.XML_TAG_PLUGIN by using the toXml(E4PrintStream, boolean) or #fromXml(String, boolean) functions. Plugins get an entry in the data-dictionary functions tree by returning an E4Method using getMethod(), this does mean that there is at least one functionmodule required additional for user input/output and you must take care to implement and register such modules.

See Also:
E4DBDictPlugInTypeReferenceChange, E4ModuleDictionaryPlugInTypeRefChange

Method Summary
 void changed(E4DBTable table)
          This function will be called whenever a table has become changed.
 void changed(E4DBType type)
          This function will be called whenever a type has become changed.
 void changed(E4DBView view)
          This function will be called whenever a view has become changed.
 void deleted(E4DBTable table)
          This function will be called whenever a table has become deleted.
 void deleted(E4DBType type)
          This function will be called whenever a type has become deleted.
 void deleted(E4DBView view)
          This function will be called whenever a view has become deleted.
 void fromXml(java.lang.StringBuffer xml, boolean is_e4s_system_dictionary)
          Read in specific information from the data-dictionaries XML container which will be done when the E4S application starts up.
 void generateTable_Modify(E4DBTable table, E4DBJavaGeneratorPrintStream out)
           
 void generateTable_Object(E4DBTable table, E4DBJavaGeneratorPrintStream out)
           
 void generateTable_Select(E4DBTable table, E4DBJavaGeneratorPrintStream out)
           
 void generateTable_Vector(E4DBTable table, E4DBJavaGeneratorPrintStream out)
           
 void generateType(E4DBType type, E4DBJavaGeneratorPrintStream out)
           
 void generateView(E4DBView view, E4DBJavaGeneratorPrintStream out)
           
 E4Method getMethod()
          Provide a method for the plug in that can be selected in the dictionary's menu.
 E4Label_Intf getPlugInName()
          Provide a name for the plug in that will be shown in the dictionary's menu.
 void init(E4DBDict dict)
          Initialize by giving the datadictionary information to that plugin
 void toXml(E4PrintStream pstr, boolean is_e4s_system_dictionary)
          Write out specific information to the data-dictionaries XML container which will be done when something changes within a table.
 

Method Detail

init

void init(E4DBDict dict)
Initialize by giving the datadictionary information to that plugin

Parameters:
dict - the data dictionary

getPlugInName

E4Label_Intf getPlugInName()
Provide a name for the plug in that will be shown in the dictionary's menu.

Returns:
a String representing a name.
See Also:
getMethod()

getMethod

E4Method getMethod()
Provide a method for the plug in that can be selected in the dictionary's menu.

Returns:
a E4Method representing a function call or null if this plug in does not need any menu entry.
See Also:
#getName()

toXml

void toXml(E4PrintStream pstr,
           boolean is_e4s_system_dictionary)
Write out specific information to the data-dictionaries XML container which will be done when something changes within a table.

Parameters:
pstr - an opened XML stream
See Also:
#fromXml(String)

fromXml

void fromXml(java.lang.StringBuffer xml,
             boolean is_e4s_system_dictionary)
Read in specific information from the data-dictionaries XML container which will be done when the E4S application starts up.

Parameters:
xml - the ready read-in XML content for this plugin only.
See Also:
#toXml(e4s.util.E4PrintStream)

changed

void changed(E4DBTable table)
             throws E4DBException
This function will be called whenever a table has become changed.

Parameters:
table - the changed table
Throws:
E4DBException

changed

void changed(E4DBView view)
             throws E4DBException
This function will be called whenever a view has become changed.

Parameters:
view - the changed view
Throws:
E4DBException

changed

void changed(E4DBType type)
             throws E4DBException
This function will be called whenever a type has become changed.

Parameters:
type - the changed type
Throws:
E4DBException

deleted

void deleted(E4DBTable table)
             throws E4DBException
This function will be called whenever a table has become deleted.

Parameters:
table - the changed table
Throws:
E4DBException

deleted

void deleted(E4DBView view)
             throws E4DBException
This function will be called whenever a view has become deleted.

Parameters:
view - the changed view
Throws:
E4DBException

deleted

void deleted(E4DBType type)
             throws E4DBException
This function will be called whenever a type has become deleted.

Parameters:
type - the changed type
Throws:
E4DBException

generateTable_Select

void generateTable_Select(E4DBTable table,
                          E4DBJavaGeneratorPrintStream out)
                          throws E4DBException
Throws:
E4DBException

generateTable_Modify

void generateTable_Modify(E4DBTable table,
                          E4DBJavaGeneratorPrintStream out)
                          throws E4DBException
Throws:
E4DBException

generateTable_Object

void generateTable_Object(E4DBTable table,
                          E4DBJavaGeneratorPrintStream out)
                          throws E4DBException
Throws:
E4DBException

generateTable_Vector

void generateTable_Vector(E4DBTable table,
                          E4DBJavaGeneratorPrintStream out)
                          throws E4DBException
Throws:
E4DBException

generateView

void generateView(E4DBView view,
                  E4DBJavaGeneratorPrintStream out)
                  throws E4DBException
Throws:
E4DBException

generateType

void generateType(E4DBType type,
                  E4DBJavaGeneratorPrintStream out)
                  throws E4DBException
Throws:
E4DBException

www.element4solution.com