Class PluginDescriptor

java.lang.Object
org.ka2ddo.yaac.gui.pluginstore.PluginDescriptor
All Implemented Interfaces:
Serializable, Comparable<PluginDescriptor>

public class PluginDescriptor extends Object implements Comparable<PluginDescriptor>, Serializable
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

    Fields
    Modifier and Type
    Field
    Description
    The human-readable name of the plugin, as reported by the getInfo() 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

    Constructors
    Constructor
    Description
    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

    Modifier and Type
    Method
    Description
    int
    Compares this object with the specified PluginDescriptor for order.
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for the object.
    Returns a string representation of the object.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • pkgName

      public String pkgName
      The internal distro file name of the plugin.
    • displayName

      public String displayName
      The human-readable name of the plugin, as reported by the getInfo() method.
    • installedVersion

      public String 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

      public String 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

      public String 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

      public PluginDescriptor(Provider p)
      Create a PluginDescriptor from an installed plugin instance.
      Parameters:
      p - Provider object defining the plugin's attributes
    • PluginDescriptor

      public PluginDescriptor(String storeLine)
      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

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.
      See Also:
    • hashCode

      public int hashCode()
      Returns a hash code value for the object.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
      See Also:
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.
    • compareTo

      public int compareTo(PluginDescriptor o)
      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 interface Comparable<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 null
      ClassCastException - if the specified object's type prevents it from being compared to this object.