net.sf.taverna.raven.plugins
Class Plugin

java.lang.Object
  extended by net.sf.taverna.raven.plugins.Plugin
All Implemented Interfaces:
java.lang.Comparable<Plugin>

public class Plugin
extends java.lang.Object
implements java.lang.Comparable<Plugin>

Author:
David Withers

Nested Class Summary
static class Plugin.PluginId
           
 
Field Summary
 boolean compatible
           
 
Method Summary
 void addPluginListener(PluginListener listener)
          Adds a PluginListener.
 int compareTo(Plugin o)
           
 int compareVersion(Plugin plugin)
           
 boolean equals(java.lang.Object obj)
           
static Plugin fromXml(org.jdom.Element pluginElement)
          Deprecated. 
static Plugin fromXmlBean(DescribedPlugin pluginRoot)
           
 java.lang.String getDescription()
          Returns the description.
 java.lang.String getIdentifier()
          Returns the identifier.
 java.lang.String getName()
          Returns the name.
 java.util.Set<Plugin.PluginId> getPluginDependencies()
           
 Profile getProfile()
          Returns the profile.
 java.lang.String getProvider()
          Returns the provider.
 java.util.List<java.lang.String> getRepositories()
          Returns the repositories.
 java.lang.String getVersion()
          Returns the version.
 java.util.List<java.lang.String> getVersions()
           
 int hashCode()
           
 boolean isBuiltIn()
          Indicates whether a plugin is a default plugin, and if so cannot be uninstalled, but can be disabled.
 boolean isCompatible()
           
 boolean isEnabled()
          Returns true if the plugin is enabled.
 void populateXMLBean(DescribedPlugin pluginDescr)
           
 void removePluginListener(PluginListener listener)
          Removes a PluginListener.
 void setBuiltIn(boolean val)
           
 void setCompatible(boolean compatible)
           
 void setEnabled(boolean enabled)
          Sets the enabled state.
 java.lang.String toString()
           
 org.jdom.Element toXml()
          Deprecated. 
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

compatible

public boolean compatible
Method Detail

getPluginDependencies

public java.util.Set<Plugin.PluginId> getPluginDependencies()

isBuiltIn

public boolean isBuiltIn()
Indicates whether a plugin is a default plugin, and if so cannot be uninstalled, but can be disabled.

Returns:

setBuiltIn

public void setBuiltIn(boolean val)

isCompatible

public boolean isCompatible()

setCompatible

public void setCompatible(boolean compatible)

getIdentifier

public java.lang.String getIdentifier()
Returns the identifier.

Returns:
the identifier

getName

public java.lang.String getName()
Returns the name.

Returns:
the name

getDescription

public java.lang.String getDescription()
Returns the description.

Returns:
the description

getProfile

public Profile getProfile()
Returns the profile.

Returns:
the profile

getProvider

public java.lang.String getProvider()
Returns the provider.

Returns:
the provider

isEnabled

public boolean isEnabled()
Returns true if the plugin is enabled.

Returns:
true if the plugin is enabled

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled state.

Parameters:
enabled - the new enabled state

getVersions

public java.util.List<java.lang.String> getVersions()

getRepositories

public java.util.List<java.lang.String> getRepositories()
Returns the repositories.

Returns:
the repositories

getVersion

public java.lang.String getVersion()
Returns the version.

Returns:
the version

addPluginListener

public void addPluginListener(PluginListener listener)
Adds a PluginListener.

Parameters:
listener - the PluginListener to add

removePluginListener

public void removePluginListener(PluginListener listener)
Removes a PluginListener.

Parameters:
listener - the PluginListener to remove

fromXmlBean

public static Plugin fromXmlBean(DescribedPlugin pluginRoot)

fromXml

@Deprecated
public static Plugin fromXml(org.jdom.Element pluginElement)
Deprecated. 

Creates a Plugin from an XML element.

Parameters:
pluginElement - the XML element
Returns:
a new Plugin

populateXMLBean

public void populateXMLBean(DescribedPlugin pluginDescr)

toXml

@Deprecated
public org.jdom.Element toXml()
Deprecated. 

Creates an XML element from this Plugin.

Returns:
an XML element for this Plugin

hashCode

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

equals

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

compareTo

public int compareTo(Plugin o)
Specified by:
compareTo in interface java.lang.Comparable<Plugin>

compareVersion

public int compareVersion(Plugin plugin)

toString

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