Confluence 2.7 Temp Archive : StateAware
This page last changed on Apr 24, 2007 by david@randombits.org.
DescriptionThe StateAware interface can be implemented by plugin modules which need to know when they are enabled or disabled. ImplementationTo be notified of enablement/disablement, implement the following in your Macro Plugins, Event Listener Plugins or Component Plugins: public class YourMacro extends BaseMacro implements com.atlassian.plugin.StateAware This has two methods you must implement: public void enabled() { // Your enablement code goes here. } public void disabled() { // Your disablement code goes here. } Call SequenceThese methods are called in the following circumstances: enabled()
disabled()
NotesEach method is only called once at each logical enablement/disablement event. Please note that the module class's constructor is not a reliable place to put initialisation code either, as the classes are often constructed or destructed more often than they are disabled/enabled. However, once enabled, the same class will remain in memory until it is disabled. Known IssuesSupported Module TypesNot all module types have been tested, but the following have the following status:
|
![]() |
Document generated by Confluence on Dec 20, 2007 19:02 |