Package com.tagtraum.core.app
Class RuntimePluginDescriptor
- java.lang.Object
-
- com.tagtraum.core.app.PluginDescriptor
-
- com.tagtraum.core.app.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 Summary
Constructors Constructor Description RuntimePluginDescriptor()
Empty default constructor.RuntimePluginDescriptor(PluginDescriptor that)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPlugin(PluginManager.PluginReference<?> pluginReference)
Adds a plugin to this descriptor.String
getLocalBundleFormat()
Format of the local bundle - i.e.URL
getLocalBundleURL()
Describes the file this plugin was shipped in.List<PluginManager.PluginReference<?>>
getPlugins()
List of plugin references described by this descriptor.URL
getRemoteBundleURL()
URL this plugin can be downloaded from.URL
getURL()
Location of the actualplugin.xml
file (if available).boolean
isEnabled()
Indicates whether a plugin is enabled.boolean
isLoaded()
void
setEnabled(boolean enabled)
void
setLoaded(boolean loaded)
A plugin may have been loaded or not, depending on whether something went wrong during instantiation or unmet requirements.void
setLocalBundleURL(URL url)
void
setRemoteBundleURL(URL remoteBundleURL)
void
setURL(URL url)
String
toString()
-
Methods inherited from class com.tagtraum.core.app.PluginDescriptor
getChangeNotes, getDescription, getId, getLargeIcon, getLicenseName, getLicenseURL, getMaxBeaTunesVersion, getMinBeaTunesVersion, getName, getSmallIcon, getVendorEmail, getVendorLogo, getVendorName, getVendorURL, getVersion, setChangeNotes, setDescription, setId, setLargeIcon, setLicenseName, setLicenseURL, setMaxBeaTunesVersion, setMinBeaTunesVersion, setName, setSmallIcon, setVendorEmail, setVendorLogo, setVendorName, setVendorURL, setVersion
-
-
-
-
Constructor Detail
-
RuntimePluginDescriptor
public RuntimePluginDescriptor()
Empty default constructor.
-
RuntimePluginDescriptor
public RuntimePluginDescriptor(PluginDescriptor that)
Copy constructor- Parameters:
that
- another plugin descriptor
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Indicates whether a plugin is enabled. A plugin may be disabled, because the beaTunes host does not fulfill its requirements (min/max version, see
PluginDescriptor.setMinBeaTunesVersion(Version)
/PluginDescriptor.setMaxBeaTunesVersion(Version)
).This property is set automatically by beaTunes
- Returns:
- true or false
-
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 actualplugin.xml
file (if available).- Returns:
plugin.xml
URL
-
getRemoteBundleURL
public URL getRemoteBundleURL()
URL this plugin can be downloaded from. This attribute is only available in descriptors created byPluginRepository
.- 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 multipleplugin.xml
files.- Returns:
- jar or zip file
-
getLocalBundleFormat
public String getLocalBundleFormat()
Format of the local bundle - i.e. typically eitherjar
orzip
.- 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
-
toString
public String toString()
- Overrides:
toString
in classPluginDescriptor
-
-