com.alee.managers.plugin.data
Class PluginInformation

java.lang.Object
  extended by com.alee.managers.plugin.data.PluginInformation
All Implemented Interfaces:
java.io.Serializable

public class PluginInformation
extends java.lang.Object
implements java.io.Serializable

Plugin information data class. This data will be serialized into XML and placed within plugin as its descriptor. It will be read each time PluginManager attempt to load its plugins.

Author:
Mikle Garin
See Also:
How to use PluginManager, PluginManager, Serialized Form

Constructor Summary
PluginInformation()
          Constructs new plugin information data object.
PluginInformation(java.lang.String id, boolean disableable, java.lang.String mainClass, java.lang.String title, java.lang.String description)
          Constructs new plugin information data object with the specified values.
PluginInformation(java.lang.String id, boolean disableable, java.lang.String mainClass, java.lang.String title, java.lang.String description, PluginVersion version)
          Constructs new plugin information data object with the specified values.
PluginInformation(java.lang.String id, java.lang.String type, java.lang.String types, boolean disableable, java.lang.String mainClass, java.lang.String title, java.lang.String description, PluginVersion version, java.util.List<PluginLibrary> libraries)
          Constructs new plugin information data object with the specified values.
 
Method Summary
 java.lang.String getDescription()
          Returns plugin description.
 java.lang.String getId()
          Returns plugin ID.
 java.util.List<PluginLibrary> getLibraries()
          Returns plugin libraries list.
 int getLibrariesCount()
          Returns plugin libraries count.
 java.lang.String getMainClass()
          Returns plugin main class canonical name.
 java.lang.String getTitle()
          Returns plugin title.
 java.lang.String getType()
          Returns custom plugin type.
 java.lang.String getTypes()
          Returns all custom plugin types.
 java.util.List<java.lang.String> getTypesList()
          Returns all custom plugin types list.
 PluginVersion getVersion()
          Returns plugin version.
 boolean hasLibraries()
          Returns whether plugin uses any libraries or not.
 boolean isDisableable()
          Returns whether this plugin is disableable or not.
 void setDescription(java.lang.String description)
          Sets plugin description.
 void setDisableable(boolean disableable)
          Sets whether this plugin is disableable or not.
 void setId(java.lang.String id)
          Sets plugin ID.
 void setLibraries(java.util.List<PluginLibrary> libraries)
          Sets plugin libraries list.
 void setMainClass(java.lang.String mainClass)
          Sets plugin main class canonical name.
 void setTitle(java.lang.String title)
          Sets plugin title.
 void setType(java.lang.String type)
          Sets custom plugin type.
 void setTypes(java.util.List<java.lang.String> types)
          Sets custom plugin types.
 void setTypes(java.lang.String types)
          Sets custom plugin types.
 void setVersion(PluginVersion version)
          Sets plugin version.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginInformation

public PluginInformation()
Constructs new plugin information data object. This constuctor might be used by XStream in some cases to create information instance from plugin XML descriptor.


PluginInformation

public PluginInformation(java.lang.String id,
                         boolean disableable,
                         java.lang.String mainClass,
                         java.lang.String title,
                         java.lang.String description)
Constructs new plugin information data object with the specified values. This constructor can be used to create programmatical plugin information.

Parameters:
id - plugin ID
disableable - whether plugin can be disabled or not
mainClass - plugin main class
title - plugin title
description - plugin short description

PluginInformation

public PluginInformation(java.lang.String id,
                         boolean disableable,
                         java.lang.String mainClass,
                         java.lang.String title,
                         java.lang.String description,
                         PluginVersion version)
Constructs new plugin information data object with the specified values. This constructor can be used to create programmatical plugin information.

Parameters:
id - plugin ID
disableable - whether plugin can be disabled or not
mainClass - plugin main class
title - plugin title
description - plugin short description
version - plugin version data

PluginInformation

public PluginInformation(java.lang.String id,
                         java.lang.String type,
                         java.lang.String types,
                         boolean disableable,
                         java.lang.String mainClass,
                         java.lang.String title,
                         java.lang.String description,
                         PluginVersion version,
                         java.util.List<PluginLibrary> libraries)
Constructs new plugin information data object with the specified values. This constructor can be used to create programmatical plugin information.

Parameters:
id - plugin ID
type - plugin type
types - available plugin types
disableable - whether plugin can be disabled or not
mainClass - plugin main class
title - plugin title
description - plugin short description
version - plugin version data
libraries - plugin libraries
Method Detail

getId

public java.lang.String getId()
Returns plugin ID.

Returns:
plugin ID

setId

public void setId(java.lang.String id)
Sets plugin ID.

Parameters:
id - new plugin ID

getType

public java.lang.String getType()
Returns custom plugin type.

Returns:
custom plugin type

setType

public void setType(java.lang.String type)
Sets custom plugin type.

Parameters:
type - new custom plugin type

getTypes

public java.lang.String getTypes()
Returns all custom plugin types.

Returns:
all custom plugin types

getTypesList

public java.util.List<java.lang.String> getTypesList()
Returns all custom plugin types list.

Returns:
all custom plugin types list

setTypes

public void setTypes(java.lang.String types)
Sets custom plugin types.

Parameters:
types - new custom plugin types

setTypes

public void setTypes(java.util.List<java.lang.String> types)
Sets custom plugin types.

Parameters:
types - new custom plugin types

isDisableable

public boolean isDisableable()
Returns whether this plugin is disableable or not.

Returns:
true if this plugin is disableable, false otherwise

setDisableable

public void setDisableable(boolean disableable)
Sets whether this plugin is disableable or not.

Parameters:
disableable - whether this plugin is disableable or not

getMainClass

public java.lang.String getMainClass()
Returns plugin main class canonical name.

Returns:
plugin main class canonical name

setMainClass

public void setMainClass(java.lang.String mainClass)
Sets plugin main class canonical name.

Parameters:
mainClass - new plugin main class canonical name

getTitle

public java.lang.String getTitle()
Returns plugin title.

Returns:
plugin title

setTitle

public void setTitle(java.lang.String title)
Sets plugin title.

Parameters:
title - new plugin title

getDescription

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

Returns:
plugin description

setDescription

public void setDescription(java.lang.String description)
Sets plugin description.

Parameters:
description - new plugin description

getVersion

public PluginVersion getVersion()
Returns plugin version.

Returns:
plugin version

setVersion

public void setVersion(PluginVersion version)
Sets plugin version.

Parameters:
version - new plugin version

getLibraries

public java.util.List<PluginLibrary> getLibraries()
Returns plugin libraries list.

Returns:
plugin libraries list

setLibraries

public void setLibraries(java.util.List<PluginLibrary> libraries)
Sets plugin libraries list.

Parameters:
libraries - new plugin libraries list

hasLibraries

public boolean hasLibraries()
Returns whether plugin uses any libraries or not.

Returns:
true if plugin uses any libraries, false otherwise

getLibrariesCount

public int getLibrariesCount()
Returns plugin libraries count.

Returns:
plugin libraries count

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object