com.pmease.quickbuild.pluginsupport
Class AbstractPlugin

java.lang.Object
  extended by com.pmease.quickbuild.pluginsupport.AbstractPlugin
All Implemented Interfaces:
Plugin, Dependency, java.io.Serializable
Direct Known Subclasses:
AbstractReportPlugin, Quickbuild.DefaultPlugin, ReportEnginePlugin

public abstract class AbstractPlugin
extends java.lang.Object
implements Plugin, java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
static class AbstractPlugin.SerializedForm
           
 
Constructor Summary
AbstractPlugin()
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.Object findConfigurationSetting(Configuration configuration, boolean interpolate)
           
 PluginCategory getCategory()
           
 java.lang.String getClasspath()
           
 java.lang.Object getConfigurationSetting(Configuration configuration, boolean interpolate)
           
 java.lang.Class<?> getConfigurationSettingClass()
           
 org.apache.wicket.markup.html.panel.Panel getConfigurationSettingPanel(java.lang.String panelId)
           
 java.util.Set<java.lang.String> getDependencyIds()
          Get set of identifiers of other dependency objects this dependency object directly depends on.
abstract  java.lang.Object[] getExtensions()
           
 java.lang.Object getGroupSetting(Group group, boolean interpolate)
           
 java.lang.Class<?> getGroupSettingClass()
           
 java.lang.String getId()
          Get identifier of the dependent object.
 java.lang.String getName()
           
 java.lang.Object getSetting(boolean interpolate)
           
 java.lang.Class<?> getSettingClass()
           
 AbstractPluginSettingEditPage getSettingEditPage()
           
 java.lang.Object getUserSetting(User user, boolean interpolate)
           
 java.lang.Class<?> getUserSettingClass()
           
 java.lang.String getVendor()
           
 java.lang.String getVersion()
           
 int hashCode()
           
 boolean isEnabled()
           
 void saveConfigurationSetting(Configuration configuration, java.lang.Object pluginSetting)
           
 void saveGroupSetting(Group group, java.lang.Object pluginSetting)
           
 void saveSetting(java.lang.Object setting)
           
 void saveUserSetting(User user, java.lang.Object pluginSetting)
           
 void setDependencyIds(java.util.Set<java.lang.String> dependencyIds)
           
 void setEnabled(boolean enabled)
           
 void setId(java.lang.String id)
           
 void setName(java.lang.String name)
           
 void settingChanged()
           
 void setVendor(java.lang.String vendor)
           
 void setVersion(java.lang.String version)
           
 void start(BundleContext context)
           
 void statusChanged()
           
 void stop(BundleContext context)
          Make sure super.stop(context) is called as the last statement if you override this method.
 java.lang.String toString()
           
 java.lang.Object writeReplace()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractPlugin

public AbstractPlugin()
Method Detail

start

public void start(BundleContext context)
           throws java.lang.Exception
Specified by:
start in interface Plugin
Throws:
java.lang.Exception

stop

public void stop(BundleContext context)
          throws java.lang.Exception
Make sure super.stop(context) is called as the last statement if you override this method.

Specified by:
stop in interface Plugin
Throws:
java.lang.Exception

getId

public java.lang.String getId()
Description copied from interface: Dependency
Get identifier of the dependent object.

Specified by:
getId in interface Plugin
Specified by:
getId in interface Dependency
Returns:

setId

public void setId(java.lang.String id)

getName

public java.lang.String getName()
Specified by:
getName in interface Plugin

setName

public void setName(java.lang.String name)

getVendor

public java.lang.String getVendor()
Specified by:
getVendor in interface Plugin

setVendor

public void setVendor(java.lang.String vendor)

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface Plugin

setVersion

public void setVersion(java.lang.String version)

getDependencyIds

public final java.util.Set<java.lang.String> getDependencyIds()
Description copied from interface: Dependency
Get set of identifiers of other dependency objects this dependency object directly depends on.

Specified by:
getDependencyIds in interface Dependency
Returns:
Should not be null. In case of no dependencies, please return an empty collection instead of a null value.

setDependencyIds

public final void setDependencyIds(java.util.Set<java.lang.String> dependencyIds)

getSetting

public final java.lang.Object getSetting(boolean interpolate)
Specified by:
getSetting in interface Plugin

isEnabled

public final boolean isEnabled()
Specified by:
isEnabled in interface Plugin

setEnabled

public final void setEnabled(boolean enabled)
Specified by:
setEnabled in interface Plugin

saveSetting

public final void saveSetting(java.lang.Object setting)
Specified by:
saveSetting in interface Plugin

saveConfigurationSetting

public final void saveConfigurationSetting(Configuration configuration,
                                           java.lang.Object pluginSetting)
Specified by:
saveConfigurationSetting in interface Plugin

saveUserSetting

public final void saveUserSetting(User user,
                                  java.lang.Object pluginSetting)
Specified by:
saveUserSetting in interface Plugin

saveGroupSetting

public final void saveGroupSetting(Group group,
                                   java.lang.Object pluginSetting)
Specified by:
saveGroupSetting in interface Plugin

statusChanged

public void statusChanged()
Specified by:
statusChanged in interface Plugin

settingChanged

public void settingChanged()
Specified by:
settingChanged in interface Plugin

getConfigurationSettingClass

public java.lang.Class<?> getConfigurationSettingClass()
Specified by:
getConfigurationSettingClass in interface Plugin
Returns:
null if this plugin does not need configuration level plugin setting.

getGroupSettingClass

public java.lang.Class<?> getGroupSettingClass()
Specified by:
getGroupSettingClass in interface Plugin
Returns:
null if this plugin does not have group level plugin setting.

getUserSettingClass

public java.lang.Class<?> getUserSettingClass()
Specified by:
getUserSettingClass in interface Plugin
Returns:
null if this plugin does not have user level plugin setting.

getUserSetting

public final java.lang.Object getUserSetting(User user,
                                             boolean interpolate)
Specified by:
getUserSetting in interface Plugin

getConfigurationSetting

public final java.lang.Object getConfigurationSetting(Configuration configuration,
                                                      boolean interpolate)
Specified by:
getConfigurationSetting in interface Plugin

getGroupSetting

public final java.lang.Object getGroupSetting(Group group,
                                              boolean interpolate)
Specified by:
getGroupSetting in interface Plugin

findConfigurationSetting

public final java.lang.Object findConfigurationSetting(Configuration configuration,
                                                       boolean interpolate)
Specified by:
findConfigurationSetting in interface Plugin

getSettingEditPage

public AbstractPluginSettingEditPage getSettingEditPage()
Specified by:
getSettingEditPage in interface Plugin

getConfigurationSettingPanel

public org.apache.wicket.markup.html.panel.Panel getConfigurationSettingPanel(java.lang.String panelId)
Specified by:
getConfigurationSettingPanel in interface Plugin

equals

public final boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

getExtensions

public abstract java.lang.Object[] getExtensions()
Specified by:
getExtensions in interface Plugin

getSettingClass

public java.lang.Class<?> getSettingClass()
Specified by:
getSettingClass in interface Plugin
Returns:
null if this plugin does not have global plugin setting.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getClasspath

public java.lang.String getClasspath()
Specified by:
getClasspath in interface Plugin

writeReplace

public java.lang.Object writeReplace()
                              throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException

getCategory

public PluginCategory getCategory()
Specified by:
getCategory in interface Plugin


Copyright © 2005-2010 PMEase Inc. All Rights Reserved.