Package org.ka2ddo.yaac.gui.pluginstore
Class PluginDescriptor
java.lang.Object
org.ka2ddo.yaac.gui.pluginstore.PluginDescriptor
- All Implemented Interfaces:
Serializable
,Comparable<PluginDescriptor>
This class describes the parameters for one plugin, including its filename, its display name,
the version of it currently installed (if any), and the version available in the "store"
(if any) or the mark indicating the plugin is obsoleted.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionThe human-readable name of the plugin, as reported by thegetInfo()
method.The human-readable version identifier for the installed version of the plugin, or null if this plugin is not yet installed into the local copy of YAAC.The internal distro file name of the plugin.The means by which the plugin is distributed from the website, or null if this plugin is not currently available from the website.The human-readable version identifier for the version of the plugin currently available on the author's website, or null if this plugin is not available from the website. -
Constructor Summary
ConstructorDescriptionPluginDescriptor
(String storeLine) Create a PluginDescriptor from a comma-separated-values (CSV) record obtained from the author's website.Create a PluginDescriptor from an installed plugin instance. -
Method Summary
-
Field Details
-
pkgName
The internal distro file name of the plugin. -
displayName
The human-readable name of the plugin, as reported by thegetInfo()
method. -
installedVersion
The human-readable version identifier for the installed version of the plugin, or null if this plugin is not yet installed into the local copy of YAAC. -
storeVersion
The human-readable version identifier for the version of the plugin currently available on the author's website, or null if this plugin is not available from the website. -
storeType
The means by which the plugin is distributed from the website, or null if this plugin is not currently available from the website. Currently, two formats are supported:- jar, which has the plugin as a single JAR file
- zip, which has the plugin distributed as a relative-based ZIP file containing the plugin's core jar and any additional JAR files and other resources needed to support the plugin
-
-
Constructor Details
-
PluginDescriptor
Create a PluginDescriptor from an installed plugin instance.- Parameters:
p
- Provider object defining the plugin's attributes
-
PluginDescriptor
Create a PluginDescriptor from a comma-separated-values (CSV) record obtained from the author's website. The CSV record is in the following format:package_name,version,distro format,description of what the plugin provides
- Parameters:
storeLine
- CSV record to decode
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. -
hashCode
public int hashCode()Returns a hash code value for the object. -
toString
Returns a string representation of the object. -
compareTo
Compares this object with the specified PluginDescriptor for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareTo
in interfaceComparable<PluginDescriptor>
- Parameters:
o
- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
NullPointerException
- if the specified object is nullClassCastException
- if the specified object's type prevents it from being compared to this object.
-