Configurable
defines how a class that can be configurable through <params> definition should behave.
More...
Public Member Functions | |
void | setParam (String paramName, Object value) throws IllegalParamterTypeException |
Add a parameter to the Configurable. | |
void | checkParams () throws InvalidValueException, MissingArgumentException, ResourceUnavailableException |
Checks that the parameters are correct for this type of Renderer. | |
void | init () throws InitializationException, ResourceUnavailableException |
Initialize the Renderer. |
Configurable
defines how a class that can be configurable through <params> definition should behave.
It defines the sethods to set parameters, check the parameters set, and initialize the object.
Definition at line 25 of file Configurable.java.
void dochelper.Configurable.setParam | ( | String | paramName, | |
Object | value | |||
) | throws IllegalParamterTypeException |
Add a parameter to the Configurable.
This mechanism allows options to be set for the Configurable. Things like output path, input path, table names, file types, gob patterns, etc should be passed by setting the appropriate params for a Configurable object. DocHelper will guarantee the following execution flow for all Configurables setParam(), checkParams() and init(). It is the responsibility of this method to check correct types for params used.
paramName | String Name of the paramter to be stored | |
value | String value of the named param |
IllegalParamterTypeException |
Implemented in dochelper.AbstractTableRecordSet, dochelper.FileRecordSet, dochelper.FileRenderer, dochelper.MatchOrderProcessor, dochelper.NaturalOrderParamProcessor, and dochelper.URLRecordSet.
void dochelper.Configurable.checkParams | ( | ) | throws InvalidValueException, MissingArgumentException, ResourceUnavailableException |
Checks that the parameters are correct for this type of Renderer.
Implementor should make sure that required parameters are validated and that any semantic and format rules are enforced. DocHelper guarantees that this method will be called before init() and execute();
This method will not return a boolean indicating success, rather, it will fire an Exception indicating error type
InvalidValueException | ||
MissingArgumentException | ||
ResourceUnavailableException |
Implemented in dochelper.AbstractTableRecordSet, dochelper.FileRecordSet, dochelper.FileRenderer, dochelper.MatchOrderProcessor, dochelper.NaturalOrderParamProcessor, and dochelper.URLRecordSet.
void dochelper.Configurable.init | ( | ) | throws InitializationException, ResourceUnavailableException |
Initialize the Renderer.
The implementor should have this method initialize any connections, file checking, class loading etc, that are neccessary setting up properly for use by the execute method.
InitializationException | ||
ResourceUnavailableException |
Implemented in dochelper.AbstractTableRecordSet, dochelper.FileRecordSet, dochelper.FileRenderer, dochelper.MatchOrderProcessor, dochelper.NaturalOrderParamProcessor, and dochelper.URLRecordSet.