Class RuntimePluginDescriptor


  • public class RuntimePluginDescriptor
    extends PluginDescriptor
    Describes a plugin(-bundle/jar) and its requirements at runtime. This class is used internally by beaTunes.
    Author:
    Hendrik Schreiber
    • Constructor Detail

      • RuntimePluginDescriptor

        public RuntimePluginDescriptor()
        Empty default constructor.
      • RuntimePluginDescriptor

        public RuntimePluginDescriptor​(PluginDescriptor that)
        Copy constructor
        Parameters:
        that - another plugin descriptor
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean enabled)
        Parameters:
        enabled - true or false
        See Also:
        isEnabled()
      • isLoaded

        public boolean isLoaded()
        Returns:
        true or false
        See Also:
        setLoaded(boolean)
      • setLoaded

        public void setLoaded​(boolean loaded)

        A plugin may have been loaded or not, depending on whether something went wrong during instantiation or unmet requirements.

        This property is set automatically by beaTunes

        Parameters:
        loaded - true or false
      • getURL

        public URL getURL()
        Location of the actual plugin.xml file (if available).
        Returns:
        plugin.xml URL
      • setURL

        public void setURL​(URL url)
        Parameters:
        url - url
        See Also:
        getURL()
      • getRemoteBundleURL

        public URL getRemoteBundleURL()
        URL this plugin can be downloaded from. This attribute is only available in descriptors created by PluginRepository.
        Returns:
        url
      • setRemoteBundleURL

        public void setRemoteBundleURL​(URL remoteBundleURL)
        Parameters:
        remoteBundleURL - url
        See Also:
        getRemoteBundleURL()
      • setLocalBundleURL

        public void setLocalBundleURL​(URL url)
        Parameters:
        url - local bundle url
        See Also:
        getLocalBundleURL()
      • getLocalBundleURL

        public URL getLocalBundleURL()
        Describes the file this plugin was shipped in. This can be either a jar or a zip file. Zip files may contain multiple plugin.xml files.
        Returns:
        jar or zip file
      • getLocalBundleFormat

        public String getLocalBundleFormat()
        Format of the local bundle - i.e. typically either jar or zip.
        Returns:
        format
      • getPlugins

        public List<PluginManager.PluginReference<?>> getPlugins()
        List of plugin references described by this descriptor.
        Returns:
        unmodifiable list of plugins
      • addPlugin

        public void addPlugin​(PluginManager.PluginReference<?> pluginReference)
        Adds a plugin to this descriptor. This method is called internally by beaTunes.
        Parameters:
        pluginReference - plugin reference