| java.lang.Object org.jfree.base.modules.PackageState
PackageState | public class PackageState (Code) | | The package state class is used by the package manager to keep track of
the activation level of the installed or errornous packages.
author: Thomas Morgner |
Field Summary | |
final public static int | STATE_CONFIGURED A constant defining that the package has been loaded and configured. | final public static int | STATE_ERROR A constant defining that the package produced an error and is not available. | final public static int | STATE_INITIALIZED A constant defining that the package was initialized and is ready to use. | final public static int | STATE_NEW A constant defining that the package is new. |
Constructor Summary | |
public | PackageState(Module module) Creates a new package state for the given module. | public | PackageState(Module module, int state) Creates a new package state for the given module. |
Method Summary | |
public boolean | configure(SubSystem subSystem) Configures the module and raises the state to STATE_CONFIGURED if the
module is not yet configured.
Parameters: subSystem - the sub-system. | public boolean | equals(Object o) Compares this object with the given other object for equality. | public Module | getModule() Returns the module managed by this state implementation. | public int | getState() Returns the current state of the module. | public int | hashCode() Computes a hashcode for this package state. | public boolean | initialize(SubSystem subSystem) Initializes the contained module and raises the set of the module to
STATE_INITIALIZED, if the module was not yet initialized. |
STATE_CONFIGURED | final public static int STATE_CONFIGURED(Code) | | A constant defining that the package has been loaded and configured.
|
STATE_ERROR | final public static int STATE_ERROR(Code) | | A constant defining that the package produced an error and is not available.
|
STATE_INITIALIZED | final public static int STATE_INITIALIZED(Code) | | A constant defining that the package was initialized and is ready to use.
|
STATE_NEW | final public static int STATE_NEW(Code) | | A constant defining that the package is new.
|
PackageState | public PackageState(Module module)(Code) | | Creates a new package state for the given module. The module state will
be initialized to STATE_NEW.
Parameters: module - the module. |
PackageState | public PackageState(Module module, int state)(Code) | | Creates a new package state for the given module. The module state will
be initialized to the given initial state.
Parameters: module - the module. Parameters: state - the initial state |
configure | public boolean configure(SubSystem subSystem)(Code) | | Configures the module and raises the state to STATE_CONFIGURED if the
module is not yet configured.
Parameters: subSystem - the sub-system. true, if the module was configured, false otherwise. |
equals | public boolean equals(Object o)(Code) | | Compares this object with the given other object for equality.
See Also: java.lang.Object.equals(java.lang.Object) Parameters: o - the other object to be compared true, if the other object is also a PackageState containingthe same module, false otherwise. |
getModule | public Module getModule()(Code) | | Returns the module managed by this state implementation.
the module. |
getState | public int getState()(Code) | | Returns the current state of the module. This method returns either
STATE_NEW, STATE_CONFIGURED, STATE_INITIALIZED or STATE_ERROR.
the module state. |
initialize | public boolean initialize(SubSystem subSystem)(Code) | | Initializes the contained module and raises the set of the module to
STATE_INITIALIZED, if the module was not yet initialized. In case of an
error, the module state will be set to STATE_ERROR and the module will
not be available.
Parameters: subSystem - the sub-system. true, if the module was successfully initialized, false otherwise. |
|
|