Package adams.flow.dropwizard
Class AbstractRESTPluginWithDatabaseConnection
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.dropwizard.AbstractRESTPlugin
-
- adams.flow.dropwizard.AbstractRESTPluginWithFlowContext
-
- adams.flow.dropwizard.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.AbstractDatabaseConnectionm_DatabaseConnectionthe database to use.-
Fields inherited from class adams.flow.dropwizard.AbstractRESTPluginWithFlowContext
m_FlowContext
-
-
Constructor Summary
Constructors Constructor Description AbstractRESTPluginWithDatabaseConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitDatabase()Initializes the database from the flow context.protected voidreset()Resets the plugin.voidsetFlowContext(adams.flow.core.Actor value)Sets the flow context.-
Methods inherited from class adams.flow.dropwizard.AbstractRESTPluginWithFlowContext
getFlowContext
-
Methods inherited from class adams.flow.dropwizard.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:
resetin classadams.core.option.AbstractOptionHandler
-
setFlowContext
public void setFlowContext(adams.flow.core.Actor value)
Sets the flow context.- Specified by:
setFlowContextin interfaceadams.flow.core.FlowContextHandler- Overrides:
setFlowContextin classAbstractRESTPluginWithFlowContext- Parameters:
value- the actor
-
initDatabase
protected void initDatabase()
Initializes the database from the flow context.
-
-