Interface PluginDescription


  • public interface PluginDescription
    Represents metadata for a specific version of a plugin.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.regex.Pattern ID_PATTERN
      The pattern plugin IDs must match.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.util.List<java.lang.String> getAuthors()
      Gets the authors of the Plugin within this container.
      default java.util.Collection<PluginDependency> getDependencies()
      Gets a Collection of all dependencies of the Plugin within this container.
      default java.util.Optional<PluginDependency> getDependency​(java.lang.String id)  
      default java.util.Optional<java.lang.String> getDescription()
      Gets the description of the Plugin within this container.
      java.lang.String getId()
      Gets the qualified ID of the Plugin within this container.
      default java.util.Optional<java.lang.String> getName()
      Gets the name of the Plugin within this container.
      default java.util.Optional<java.nio.file.Path> getSource()
      Returns the source the plugin was loaded from.
      default java.util.Optional<java.lang.String> getUrl()
      Gets the url or website of the Plugin within this container.
      default java.util.Optional<java.lang.String> getVersion()
      Gets the version of the Plugin within this container.
    • Field Detail

      • ID_PATTERN

        static final java.util.regex.Pattern ID_PATTERN
        The pattern plugin IDs must match. Plugin IDs may only contain alphanumeric characters, dashes or underscores, must start with an alphabetic character and cannot be longer than 64 characters.
    • Method Detail

      • getId

        java.lang.String getId()
        Gets the qualified ID of the Plugin within this container.
        Returns:
        the plugin ID
        See Also:
        Plugin.id()
      • getName

        default java.util.Optional<java.lang.String> getName()
        Gets the name of the Plugin within this container.
        Returns:
        an Optional with the plugin name, may be empty
        See Also:
        Plugin.name()
      • getVersion

        default java.util.Optional<java.lang.String> getVersion()
        Gets the version of the Plugin within this container.
        Returns:
        an Optional with the plugin version, may be empty
        See Also:
        Plugin.version()
      • getDescription

        default java.util.Optional<java.lang.String> getDescription()
        Gets the description of the Plugin within this container.
        Returns:
        an Optional with the plugin description, may be empty
        See Also:
        Plugin.description()
      • getUrl

        default java.util.Optional<java.lang.String> getUrl()
        Gets the url or website of the Plugin within this container.
        Returns:
        an Optional with the plugin url, may be empty
        See Also:
        Plugin.url()
      • getAuthors

        default java.util.List<java.lang.String> getAuthors()
        Gets the authors of the Plugin within this container.
        Returns:
        the plugin authors, may be empty
        See Also:
        Plugin.authors()
      • getDependencies

        default java.util.Collection<PluginDependency> getDependencies()
        Gets a Collection of all dependencies of the Plugin within this container.
        Returns:
        the plugin dependencies, can be empty
        See Also:
        Plugin.dependencies()
      • getDependency

        default java.util.Optional<PluginDependency> getDependency​(java.lang.String id)
      • getSource

        default java.util.Optional<java.nio.file.Path> getSource()
        Returns the source the plugin was loaded from.
        Returns:
        the source the plugin was loaded from or Optional.empty() if unknown