dochelper
Interface Configurable
- All Known Subinterfaces:
- Processor, RecordSet, Renderer
- All Known Implementing Classes:
- AbstractTableRecordSet, FileRecordSet, FileRenderer, JdbcTableRecordSet, MatchOrderProcessor, NaturalOrderParamProcessor, URLRecordSet, XINSFunctionRecordSet
public interface Configurable
The interface Configurable
defines how a class that can be configurable
through definition should behave. It defines the sethods to set parameters,
check the parameters set, and initialize the object.
Method Summary |
void |
checkParams()
Checks that the parameters are correct for this type of Renderer. |
void |
init()
Initialize the Renderer. |
void |
setParam(java.lang.String paramName,
java.lang.Object value)
Add a parameter to the Configurable. |
setParam
void setParam(java.lang.String paramName,
java.lang.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.
- Parameters:
paramName
- String Name of the paramter to be storedvalue
- String value of the named param
- Throws:
IllegalParamterTypeException
checkParams
void 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
- Throws:
InvalidValueException
MissingArgumentException
ResourceUnavailableException
init
void 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.
- Throws:
InitializationException
ResourceUnavailableException