Package net.sf.basedb.util
Class ContextUtil.ContextResult
java.lang.Object
net.sf.basedb.util.ContextUtil.ContextResult
- Enclosing class:
- ContextUtil
Class for holding the result of a call to the
InteractivePlugin.isInContext(GuiContext, Object)
method.-
Field Summary
Modifier and TypeFieldDescriptionprivate final PluginConfiguration
private String
private final PluginDefinition
private Throwable
-
Constructor Summary
ModifierConstructorDescriptionContextResult
(PluginDefinition plugin, PluginConfiguration config, String contextMessage) Create a new warning-level result object.ContextResult
(PluginDefinition plugin, PluginConfiguration config, Throwable t) Create a new error-level result object.private
ContextResult
(SessionControl sc, PluginDefinition plugin, PluginConfiguration config, GuiContext context, Object currentItem) -
Method Summary
Modifier and TypeMethodDescriptionGet the warning level message, or the message fromThrowable.getMessage()
if this is an error-level object.getError()
Get the exception that caused the error, or null if this is a warning-level object.getName()
Get the name of the plug-in configuration or, if the configuration is null, of the plug-in definitionGet the plugin configuration that was checked, or null.Get the plugin definition that was checked.boolean
isError()
If this is an error-level object.boolean
If the context check was successful and generate no warnings or error.
-
Field Details
-
plugin
-
config
-
contextMessage
-
throwable
-
-
Constructor Details
-
ContextResult
private ContextResult(SessionControl sc, PluginDefinition plugin, PluginConfiguration config, GuiContext context, Object currentItem) -
ContextResult
Create a new warning-level result object.- Parameters:
plugin
- The plugin definitionconfig
- The plugin configuration or nullcontextMessage
- The warning message, or null if there is no warning or error
-
ContextResult
Create a new error-level result object.- Parameters:
plugin
- The plugin definitionconfig
- The plugin configuration or nullt
- The exception that caused the error
-
-
Method Details
-
getPluginDefinition
Get the plugin definition that was checked. -
getPluginConfiguration
Get the plugin configuration that was checked, or null. -
getContextMessage
Get the warning level message, or the message fromThrowable.getMessage()
if this is an error-level object. -
getError
Get the exception that caused the error, or null if this is a warning-level object. -
getName
Get the name of the plug-in configuration or, if the configuration is null, of the plug-in definition -
isInContext
public boolean isInContext()If the context check was successful and generate no warnings or error. -
isError
public boolean isError()If this is an error-level object.
-