Package net.sf.basedb.util
Class ContextUtil.ContextResult
- java.lang.Object
-
- net.sf.basedb.util.ContextUtil.ContextResult
-
- Enclosing class:
- ContextUtil
public static class ContextUtil.ContextResult extends Object
Class for holding the result of a call to theInteractivePlugin.isInContext(GuiContext, Object)
method.
-
-
Field Summary
Fields Modifier and Type Field Description private PluginConfiguration
config
private String
contextMessage
private PluginDefinition
plugin
private Throwable
throwable
-
Constructor Summary
Constructors Modifier Constructor Description ContextResult(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContextMessage()
Get the warning level message, or the message fromThrowable.getMessage()
if this is an error-level object.Throwable
getError()
Get the exception that caused the error, or null if this is a warning-level object.String
getName()
Get the name of the plug-in configuration or, if the configuration is null, of the plug-in definitionPluginConfiguration
getPluginConfiguration()
Get the plugin configuration that was checked, or null.PluginDefinition
getPluginDefinition()
Get the plugin definition that was checked.boolean
isError()
If this is an error-level object.boolean
isInContext()
If the context check was successful and generate no warnings or error.
-
-
-
Field Detail
-
plugin
private final PluginDefinition plugin
-
config
private final PluginConfiguration config
-
contextMessage
private String contextMessage
-
throwable
private Throwable throwable
-
-
Constructor Detail
-
ContextResult
private ContextResult(SessionControl sc, PluginDefinition plugin, PluginConfiguration config, GuiContext context, Object currentItem)
-
ContextResult
public ContextResult(PluginDefinition plugin, PluginConfiguration config, String contextMessage)
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
public ContextResult(PluginDefinition plugin, PluginConfiguration config, Throwable t)
Create a new error-level result object.- Parameters:
plugin
- The plugin definitionconfig
- The plugin configuration or nullt
- The exception that caused the error
-
-
Method Detail
-
getPluginDefinition
public PluginDefinition getPluginDefinition()
Get the plugin definition that was checked.
-
getPluginConfiguration
public PluginConfiguration getPluginConfiguration()
Get the plugin configuration that was checked, or null.
-
getContextMessage
public String getContextMessage()
Get the warning level message, or the message fromThrowable.getMessage()
if this is an error-level object.
-
getError
public Throwable getError()
Get the exception that caused the error, or null if this is a warning-level object.
-
getName
public String 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.
-
-