Package adams.flow.rest
Class AbstractRESTPluginWithDatabaseConnection
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.rest.AbstractRESTPlugin
-
- adams.flow.rest.AbstractRESTPluginWithFlowContext
-
- adams.flow.rest.AbstractRESTPluginWithDatabaseConnection
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler
,adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,adams.db.DatabaseConnectionUser
,adams.flow.core.FlowContextHandler
,RESTPlugin
,Serializable
public abstract class AbstractRESTPluginWithDatabaseConnection extends AbstractRESTPluginWithFlowContext implements adams.db.DatabaseConnectionUser
Ancestor for REST plugins that require a database connection.
CallinitDatabase()
in each REST method that requires a database connection.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.db.AbstractDatabaseConnection
m_DatabaseConnection
the database to use.-
Fields inherited from class adams.flow.rest.AbstractRESTPluginWithFlowContext
m_FlowContext
-
-
Constructor Summary
Constructors Constructor Description AbstractRESTPluginWithDatabaseConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
initDatabase()
Initializes the database from the flow context.protected void
reset()
Resets the plugin.void
setFlowContext(adams.flow.core.Actor value)
Sets the flow context.-
Methods inherited from class adams.flow.rest.AbstractRESTPluginWithFlowContext
getFlowContext
-
Methods inherited from class adams.flow.rest.AbstractRESTPlugin
getAdditionalInformation
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
reset
protected void reset()
Resets the plugin.- Overrides:
reset
in classadams.core.option.AbstractOptionHandler
-
setFlowContext
public void setFlowContext(adams.flow.core.Actor value)
Sets the flow context.- Specified by:
setFlowContext
in interfaceadams.flow.core.FlowContextHandler
- Overrides:
setFlowContext
in classAbstractRESTPluginWithFlowContext
- Parameters:
value
- the actor
-
initDatabase
protected void initDatabase()
Initializes the database from the flow context.
-
-