|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Plugin
Generic interface for plugins. A plugin is an encapsulation for a group of actions, options, and event handling modules.
| Field Summary | |
|---|---|
static java.lang.String |
ID_DELIMETER
Delimeter for the unique id of a plugin |
static int |
LEVEL_APPLICATION
Plugin level: application |
static int |
LEVEL_FRAME
Plugin level: frame |
static int |
LEVEL_PAGE
Plugin level: page |
static int |
LEVEL_PLUGIN
Plugin level: regular plugin |
| Method Summary | |
|---|---|
void |
addPlugin(Plugin child)
Adds a plugin as child plugin of this plugin. |
void |
addToPeerGroup(java.lang.String name,
java.lang.Object group)
Adds the plugin to a peer group given by key and object. |
boolean |
canClose()
Checks, whether this plugin can be closed. |
boolean |
containsStackedEvent(java.lang.String eventName)
Checks if the event stack contains a particular event. |
boolean |
fireEvent(JaspiraEvent je)
Fires the given event using the event queue. |
boolean |
fireEvent(java.lang.String eventName)
Creates a new client event using the given event name and fires it. |
boolean |
fireEvent(java.lang.String eventName,
java.lang.Object data)
Creates a new client event using the given event name and event object and fires it. |
JaspiraAction |
getAction(java.lang.String actionName)
This convenience method retrieves an action from the action manager. |
java.util.List |
getChildPlugins()
Returns a list of all children of this plugin. |
java.lang.String |
getClassName()
Returns the class name of the plugin. |
java.lang.String |
getCondition()
Gets the conditional expression that determines if the plugin should be active. |
java.util.List |
getDescendantPlugins(java.util.List plugins)
Returns a list of all children and further descendants of this plugin. |
java.lang.String |
getDescription()
Gets the description. |
java.util.List |
getEventActionNames()
Gets a list of the action names of the event actions of this plugin. |
MultiIcon |
getIcon()
Gets the icon. |
int |
getLevel()
Returns the level of this plugin in the plugin tree. |
java.lang.String |
getName()
Returns the name of the plugin. |
Plugin |
getParentPlugin()
Returns the parent plugin of this plugin. |
java.lang.Object |
getPeerGroup(java.lang.String name)
Gets the peer group for the given group name. |
java.util.Set |
getPeerGroupNames()
Returns the names of all peergroups that this plugin has been added to. |
java.util.Set |
getPeerGroups()
Returns the peer groups this plugin has been added to. |
ResourceCollection |
getPluginResourceCollection()
Gets the plugin resource. |
PluginState |
getPluginState()
Returns the state of this plugin. |
java.lang.String |
getSubTitle()
Returns the sub title of this plugin. |
java.lang.String |
getTitle()
Gets the title. |
java.lang.String |
getUniqueId()
Returns the unique id of this plugin. |
java.lang.String |
getVendor()
Gets the plugin vendor. |
java.lang.String |
getVersion()
Gets the plugin version. |
boolean |
handleEvent(JaspiraEvent je)
Tries to handles the event for this plugin without passing it on. |
boolean |
inheritEvent(JaspiraEvent je)
Receives an event incoming from a parent. |
void |
initializePlugin()
Initializes the plugin. |
void |
installFirstPlugin()
This template method is called before the first plugin instance of this kind is installed. |
void |
installPlugin()
Installs the plugin and all its modules. |
boolean |
matchesPeerGroup(java.lang.String name,
java.lang.Object group,
boolean strict)
Check if the plugin is a member of the given peer group. |
boolean |
matchesPeerGroups(Plugin plugin,
boolean strict)
Matches all peer groups of one plugin against another. |
boolean |
receiveEvent(JaspiraEvent je)
Handles an incoming event that is received from a child plugin. |
void |
removeFromPeerGroup(java.lang.String name)
Removes the plugin from a peer group. |
void |
removePlugin(Plugin child)
Removes a child plugin from this plugin. |
boolean |
requestClose()
Request the plugin to be closed. |
void |
setParentPlugin(Plugin newParent)
Sets the parent plugin of this plugin. |
void |
setPluginState(PluginState state)
Rebuilds the state of the plugin using the given state object. |
void |
stackEvent(JaspiraEvent je)
Adds a stackable event to the event stack. |
void |
uninstallLastPlugin()
This is called after uninstall for the last instance has been uninstalled. |
void |
uninstallPlugin()
Uninstalls the plugin and all of its modules. |
| Field Detail |
|---|
static final int LEVEL_APPLICATION
static final int LEVEL_FRAME
static final int LEVEL_PAGE
static final int LEVEL_PLUGIN
static final java.lang.String ID_DELIMETER
| Method Detail |
|---|
java.lang.String getName()
getClassName())java.lang.String getClassName()
java.lang.String getUniqueId()
ResourceCollection getPluginResourceCollection()
java.lang.String getTitle()
java.lang.String getSubTitle()
java.lang.String getDescription()
MultiIcon getIcon()
java.lang.String getVendor()
java.lang.String getVersion()
java.lang.String getCondition()
java.util.List getEventActionNames()
JaspiraAction getAction(java.lang.String actionName)
actionName - Action name
void initializePlugin()
void installPlugin()
void installFirstPlugin()
void uninstallPlugin()
void uninstallLastPlugin()
boolean fireEvent(JaspiraEvent je)
je - Event to fire
boolean fireEvent(java.lang.String eventName)
eventName - Name of the event
boolean fireEvent(java.lang.String eventName,
java.lang.Object data)
eventName - Name of the eventdata - Event object
boolean handleEvent(JaspiraEvent je)
je - The event to handle
boolean receiveEvent(JaspiraEvent je)
je - The event to handle
boolean inheritEvent(JaspiraEvent je)
je - The event to handle
void stackEvent(JaspiraEvent je)
je - The event to stackboolean containsStackedEvent(java.lang.String eventName)
eventName - Event to look for
java.util.List getChildPlugins()
java.util.List getDescendantPlugins(java.util.List plugins)
plugins - The children of this plugin will be added to this list, if given
Plugin getParentPlugin()
ApplicationBase must have a parent.
void setParentPlugin(Plugin newParent)
ApplicationBase must have a parent.
newParent - New parent of this plugin or null in case of ApplicationBasevoid addPlugin(Plugin child)
child - Child plugin to addvoid removePlugin(Plugin child)
child - Child plugin to removeint getLevel()
LEVEL_APPLICATION being the lowest.
Defaults to LEVEL_PLUGIN.java.util.Set getPeerGroups()
java.util.Set getPeerGroupNames()
void addToPeerGroup(java.lang.String name,
java.lang.Object group)
name - Peer group namegroup - Peer group objectjava.lang.Object getPeerGroup(java.lang.String name)
name - Name of the peer group
void removeFromPeerGroup(java.lang.String name)
name - Peer group name
boolean matchesPeerGroup(java.lang.String name,
java.lang.Object group,
boolean strict)
name - Name of the peer group to checkgroup - Peer group to checkstrict - true The peergroups must be exactly met.
boolean matchesPeerGroups(Plugin plugin,
boolean strict)
plugin - Plugin to match agains this pluginstrict - true All peer groups must match.PluginState getPluginState()
void setPluginState(PluginState state)
boolean canClose()
boolean requestClose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||