Last update: 2011-06-23

org.proteios.core.data
Class PluginDefinitionData

java.lang.Object
  extended by org.proteios.core.data.BasicData
      extended by org.proteios.core.data.OwnedData
          extended by org.proteios.core.data.SharedData
              extended by org.proteios.core.data.PluginDefinitionData
All Implemented Interfaces:
IdentifiableData, OwnableData, RemovableData, ShareableData

public class PluginDefinitionData
extends SharedData
implements RemovableData

This class represent an installed plugin.

Version:
2.0
Author:
Nicklas, Samuel
See Also:
PluginDefinition, Plugins
Hibernate: class
table="`PluginDefinitions`" lazy="false"

Field Summary
static int MAX_CLASSNAME_LENGTH
          The maximum length of the class name that can be stored in the database.
static int MAX_CONTACT_LENGTH
          The maximum length of the contact information that can be stored in the database.
static int MAX_COPYRIGHT_LENGTH
          The maximum length of the copyright notice that can be stored in the database.
static int MAX_DESCRIPTION_LENGTH
          The maximum length of the url that can be stored in the database.
static int MAX_EMAIL_LENGTH
          The maximum length of the email address that can be stored in the database.
static int MAX_JARPATH_LENGTH
           
static int MAX_NAME_LENGTH
          The maximum length of the name that can be stored in the database.
static int MAX_PLUGIN_VERSION_LENGTH
          The maximum length of the plugin version that can be stored in the database.
static int MAX_URL_LENGTH
          The maximum length of the url that can be stored in the database.
 
Constructor Summary
PluginDefinitionData()
           
 
Method Summary
 String getClassName()
          Get the class name of the Java class that implements this plugin.
 String getContact()
          Get contact information for the plugin.
 String getCopyright()
          Get a copyright notice for the plugin.
 String getDescription()
          Get a description of the plugin.
 String getEmail()
          Get an email address that can be used to get more information about the plugin.
 Set<GuiContextData> getGuiContexts()
          The item code for all items where it makes sense to use the plugin in a client application.
 String getJarPath()
          Get the path to the JAR file where the plugin class is located.
 int getMainType()
          Get the main type of plugin.
 String getName()
          Get the name of the plugin.
 Set<PluginTypeData> getPluginTypes()
          The plugin types of this plugin, ie. all interfaces that it implements.
 String getPluginVersion()
          Get the plugin version.
 String getUrl()
          Get a URL with more information about the plugin.
 boolean isInteractive()
          If the plugin is interactive or not.
 boolean isRemoved()
          Check if the removed flag is set for this item.
 void setClassName(String className)
           
 void setContact(String contact)
           
 void setCopyright(String copyright)
           
 void setDescription(String description)
           
 void setEmail(String email)
           
 void setInteractive(boolean interactive)
           
 void setJarPath(String jarPath)
           
 void setMainType(int mainType)
           
 void setName(String name)
           
 void setPluginVersion(String pluginVersion)
           
 void setRemoved(boolean removed)
          Set the removed flag for this item.
 void setUrl(String url)
           
 
Methods inherited from class org.proteios.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
 
Methods inherited from class org.proteios.core.data.OwnedData
getOwner, setOwner
 
Methods inherited from class org.proteios.core.data.BasicData
equals, getId, getVersion, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.proteios.core.data.IdentifiableData
getId, getVersion
 
Methods inherited from interface org.proteios.core.data.OwnableData
getOwner, setOwner
 

Field Detail

MAX_CLASSNAME_LENGTH

public static final int MAX_CLASSNAME_LENGTH
The maximum length of the class name that can be stored in the database.

See Also:
Constant Field Values

MAX_JARPATH_LENGTH

public static final int MAX_JARPATH_LENGTH
See Also:
Constant Field Values

MAX_NAME_LENGTH

public static final int MAX_NAME_LENGTH
The maximum length of the name that can be stored in the database.

See Also:
Constant Field Values

MAX_PLUGIN_VERSION_LENGTH

public static final int MAX_PLUGIN_VERSION_LENGTH
The maximum length of the plugin version that can be stored in the database.

See Also:
Constant Field Values

MAX_DESCRIPTION_LENGTH

public static final int MAX_DESCRIPTION_LENGTH
The maximum length of the url that can be stored in the database.

See Also:
Constant Field Values

MAX_COPYRIGHT_LENGTH

public static final int MAX_COPYRIGHT_LENGTH
The maximum length of the copyright notice that can be stored in the database.

See Also:
Constant Field Values

MAX_CONTACT_LENGTH

public static final int MAX_CONTACT_LENGTH
The maximum length of the contact information that can be stored in the database.

See Also:
Constant Field Values

MAX_EMAIL_LENGTH

public static final int MAX_EMAIL_LENGTH
The maximum length of the email address that can be stored in the database.

See Also:
Constant Field Values

MAX_URL_LENGTH

public static final int MAX_URL_LENGTH
The maximum length of the url that can be stored in the database.

See Also:
Constant Field Values
Constructor Detail

PluginDefinitionData

public PluginDefinitionData()
Method Detail

isRemoved

public boolean isRemoved()
Description copied from interface: RemovableData
Check if the removed flag is set for this item.

Specified by:
isRemoved in interface RemovableData
Returns:
TRUE if the item is flagged as removed, FALSE otherwise

setRemoved

public void setRemoved(boolean removed)
Description copied from interface: RemovableData
Set the removed flag for this item.

Specified by:
setRemoved in interface RemovableData
Parameters:
removed - TRUE if the item should be flagged as removed, FALSE otherwise

getClassName

public String getClassName()
Get the class name of the Java class that implements this plugin. The specified class must implement the Plugin interface.

Returns:
The class name for this plugin
Hibernate: property
column="`class_name`" type="string" length="255" not-null="true" unique="true"

setClassName

public void setClassName(String className)

getJarPath

public String getJarPath()
Get the path to the JAR file where the plugin class is located. If the value is null the plugin must be in the classpath.

Returns:
The class name for this plugin
Hibernate: property
column="`jar_path`" type="text" not-null="false"

setJarPath

public void setJarPath(String jarPath)

getName

public String getName()
Get the name of the plugin.

Returns:
A string with the name of the plugin
Hibernate: property
column="`name`" type="string" length="255" not-null="true"

setName

public void setName(String name)

getPluginVersion

public String getPluginVersion()
Get the plugin version.

Returns:
String The plugin version.
Hibernate: property
column="`plugin_version`" type="string" length="255" not-null="false"

setPluginVersion

public void setPluginVersion(String pluginVersion)

getDescription

public String getDescription()
Get a description of the plugin.

Returns:
A string with a description, or null if not known
Hibernate: property
column="`description`" type="text" not-null="false"

setDescription

public void setDescription(String description)

getCopyright

public String getCopyright()
Get a copyright notice for the plugin.

Returns:
A string with a copyright notice, or null if not known
Hibernate: property
column="`copyright`" type="string" length="255" not-null="false"

setCopyright

public void setCopyright(String copyright)

getContact

public String getContact()
Get contact information for the plugin.

Returns:
A string with contact information, or null if not known
Hibernate: property
column="`contact`" type="string" length="255" not-null="false"

setContact

public void setContact(String contact)

getEmail

public String getEmail()
Get an email address that can be used to get more information about the plugin.

Returns:
A string with the email address, or null if not known
Hibernate: property
column="`email`" type="string" length="255" not-null="false"

setEmail

public void setEmail(String email)

getUrl

public String getUrl()
Get a URL with more information about the plugin.

Returns:
A string containing the URL, or null if not known
Hibernate: property
column="`url`" type="string" length="255" not-null="false"

setUrl

public void setUrl(String url)

getMainType

public int getMainType()
Get the main type of plugin.

Returns:
A type code that is defined in the enum Plugin.MainType.
Hibernate: property
column="`type`" type="int" not-null="true"

setMainType

public void setMainType(int mainType)

isInteractive

public boolean isInteractive()
If the plugin is interactive or not.

Hibernate: property
column="`interactive`" type="boolean" not-null="true"

setInteractive

public void setInteractive(boolean interactive)

getGuiContexts

public Set<GuiContextData> getGuiContexts()
The item code for all items where it makes sense to use the plugin in a client application. Ie. a plugin that imports reporters should return a set containing the code for Item.REPORTER.

Hibernate: set
table="`PluginDefinitionGuiContexts`" lazy="true"
Hibernate: collection-key
column="`plugindefinition_id`"
Hibernate: collection-composite-element
class="org.proteios.core.data.GuiContextData"

getPluginTypes

public Set<PluginTypeData> getPluginTypes()
The plugin types of this plugin, ie. all interfaces that it implements.

Hibernate: set
table="`PluginDefinitionTypes`" lazy="true"
Hibernate: collection-key
column="`plugindefinition_id`"
Hibernate: collection-many-to-many
column="`plugintype_id`" class="org.proteios.core.data.PluginTypeData"

Last update: 2011-06-23