Class AbstractWekaPackageManagerAction
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.wekapackagemanageraction.AbstractWekaPackageManagerAction
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,FlowContextHandler
,Serializable
- Direct Known Subclasses:
InstallFromFile
,InstallFromURL
,InstallOfficial
,InstallPackage
,Uninstall
public abstract class AbstractWekaPackageManagerAction extends AbstractOptionHandler implements QuickInfoSupporter, FlowContextHandler
Ancestor for package manager actions.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Actor
m_FlowContext
the flow context.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractWekaPackageManagerAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Class[]
accepts()
The types of data the action accepts.protected String
check(Object input)
Hook method for performing checks.abstract Object
doExecute(Object input, MessageCollection errors)
Executes the action.Object
execute(Object input, MessageCollection errors)
Executes the action.abstract Class[]
generates()
The types of data the action generates.Actor
getFlowContext()
Returns the flow context, if any.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.void
setFlowContext(Actor value)
Sets the flow context.protected void
unhandledInputType(Object input, MessageCollection errors)
Adds an error message that the input type is not supported.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_FlowContext
protected Actor m_FlowContext
the flow context.
-
-
Method Detail
-
setFlowContext
public void setFlowContext(Actor value)
Sets the flow context.- Specified by:
setFlowContext
in interfaceFlowContextHandler
- Parameters:
value
- the actor
-
getFlowContext
public Actor getFlowContext()
Returns the flow context, if any.- Specified by:
getFlowContext
in interfaceFlowContextHandler
- Returns:
- the actor, null if none available
-
accepts
public abstract Class[] accepts()
The types of data the action accepts.- Returns:
- the input types
-
generates
public abstract Class[] generates()
The types of data the action generates.- Returns:
- the output types
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
check
protected String check(Object input)
Hook method for performing checks.- Parameters:
input
- the input to process- Returns:
- null if checks passed, otherwise error message
-
unhandledInputType
protected void unhandledInputType(Object input, MessageCollection errors)
Adds an error message that the input type is not supported.- Parameters:
input
- the input typeerrors
- the errors to update
-
doExecute
public abstract Object doExecute(Object input, MessageCollection errors)
Executes the action.- Parameters:
input
- the input to processerrors
- for collecting errors- Returns:
- the generated output, null if failed to generated
-
execute
public Object execute(Object input, MessageCollection errors)
Executes the action.- Parameters:
input
- the input to processerrors
- for collecting errors- Returns:
- the generated output, null if failed to generated
-
-