ti.chimera
Class Resource

java.lang.Object
  extended byti.chimera.Resource
Direct Known Subclasses:
Plugin.MenuBarItemResource, Plugin.RegistrySubscriberResource, Plugin.ToolBarResource, Plugin.ViewResource

public abstract class Resource
extends java.lang.Object

Resources are tracked by a plugin. A plugin is active whenever there are installed resources. If a resource is managed, then it is not installed immediately, but instead it is automatically installed when the plugin becomes active, and uninstalled when the plugin becomes inactive. A unmanaged resource is installed as soon as it is added, and uninstalled as soon as it is removed.

Version:
0.1
Author:
Rob Clark

Constructor Summary
Resource(boolean managed)
          Class Constructor.
 
Method Summary
abstract  void install()
          This method is called when the resource is installed.
 boolean isManaged()
          Is this a managed resource? Bad things will happen if the resource changes from managed to unmanaged, or visa versa, which is why this method is final.
abstract  void uninstall()
          This method is called when the resource is uninstalled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resource

public Resource(boolean managed)
Class Constructor.

Parameters:
managed - flag to indicate whether this is a managed resource
Method Detail

isManaged

public final boolean isManaged()
Is this a managed resource? Bad things will happen if the resource changes from managed to unmanaged, or visa versa, which is why this method is final.


install

public abstract void install()
This method is called when the resource is installed. It should be overloaded by the derived class to perform whatever steps are necessary to install this resource.

See Also:
uninstall()

uninstall

public abstract void uninstall()
This method is called when the resource is uninstalled. It should be overloaded by the derived class to perform whatever steps are necessary to uninstall the resources. It should be the inverse of install().

See Also:
install()