scone.util
Class PluginRepositoryEntry

java.lang.Object
  extended by scone.util.PluginRepositoryEntry

public class PluginRepositoryEntry
extends java.lang.Object

represents a a Scone plugin which states (enabled/disabled) are mirrored in an XML element. This class is to be used with the PluginRepository.


Method Summary
 void disable()
          disables the plugin and mirrors this change in the element.
 void enable()
          enables the plugin and mirrors this change in the element.
 java.lang.String getName()
          returns the classname of the plugin
 Plugin getPlugin()
          returns the plugin
 int getRequirements()
          returns the requirements of the plugin if the plugin has been instantiated.
 boolean isEnabled()
          check if a plugin is currently enabled
 void remove()
          disables the plugin and removes the element from its parent.
 void terminate()
          calls Plugin.terminate() does not invoke disable()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

remove

public void remove()
disables the plugin and removes the element from its parent. The repository entry is thus removed from the repository.


terminate

public void terminate()
calls Plugin.terminate() does not invoke disable()


disable

public void disable()
disables the plugin and mirrors this change in the element.


enable

public void enable()
enables the plugin and mirrors this change in the element. If the plugin has not yet been instantiated, the change will be reflected in the element but the plugin will not be activated. Scone has to be restarted to activate the plugin.


getRequirements

public int getRequirements()
returns the requirements of the plugin if the plugin has been instantiated.

Returns:
the plugin's requirements

getPlugin

public Plugin getPlugin()
returns the plugin

Returns:
the plugin

isEnabled

public boolean isEnabled()
check if a plugin is currently enabled

Returns:
true if the plugin is enabled.

getName

public java.lang.String getName()
returns the classname of the plugin

Returns:
the plugin's classname