com.virtuosotechnologies.lib.plugin
Interface PluginInfo

All Known Implementing Classes:
EditablePluginInfo, SimplePluginInfo

public interface PluginInfo

Plugin meta-information. Clients should not implement this interface directly, because it will probably have methods added in the future. Instead, use the EditablePluginInfo implementation.


Method Summary
 String getDescriptionForProvidedAPI(String apiName)
          Get the description for the given provided API.
 URL getJarForProvidedAPI(String apiName)
          Get the Jar URL for the given API spec, or null if no jar is needed.
 String getPluginDescription()
          Get the description of the plugin
 PluginID getPluginID()
          Get the identifier of the plugin
 String getPluginInitializerClassName()
          Get the name of the PluginInitializer implementation class
 URL getPluginJar()
          Get the jar URL for the plugin.
 String getPluginShortDescription()
          Get the short description of the plugin
 String[] getProvidedAPINames()
          Get the provided API names
 String[] getUsedAPINames()
          Get the used API names, both required and optional
 APIVersion getVersionForProvidedAPI(String apiName)
          Get the version for the given provided API.
 APIVersion getVersionForUsedAPI(String apiName)
          Get the version for the given used API.
 boolean isForcingUniqueness()
          Returns true if this plugin wants to be the only version of itself installed.
 boolean isUsedAPIOptional(String apiName)
          Is the given used API optional?
 

Method Detail

getPluginID

public PluginID getPluginID()
Get the identifier of the plugin

Returns:
a PluginID

getPluginDescription

public String getPluginDescription()
Get the description of the plugin

Returns:
a String

getPluginShortDescription

public String getPluginShortDescription()
Get the short description of the plugin

Returns:
a String

getPluginJar

public URL getPluginJar()
Get the jar URL for the plugin.

Returns:
a URL, or null for no jar

getPluginInitializerClassName

public String getPluginInitializerClassName()
Get the name of the PluginInitializer implementation class

Returns:
a class name

isForcingUniqueness

public boolean isForcingUniqueness()
Returns true if this plugin wants to be the only version of itself installed. If this attribute is true, plugging in this plugin will suppress the simultaneous plugging in of any earlier versions. If an earlier version is already plugged in, this plugin itself will be suppressed. This is useful for plugins that, for example, create GUIs or have other such side effects that should only happen once.

Returns:
true if this plugin wants to force uniqueness

getProvidedAPINames

public String[] getProvidedAPINames()
Get the provided API names

Returns:
an array of Strings

getDescriptionForProvidedAPI

public String getDescriptionForProvidedAPI(String apiName)
Get the description for the given provided API.

Parameters:
apiName - name of a provided API
Returns:
a description String
Throws:
NullPointerException - name not found

getVersionForProvidedAPI

public APIVersion getVersionForProvidedAPI(String apiName)
Get the version for the given provided API.

Parameters:
apiName - name of a provided API
Returns:
an APIVersion
Throws:
NullPointerException - name not found

getJarForProvidedAPI

public URL getJarForProvidedAPI(String apiName)
Get the Jar URL for the given API spec, or null if no jar is needed.

Parameters:
apiName - name of a provided API
Returns:
a URL for the jar, or null for no jar needed
Throws:
NullPointerException - name not found

getUsedAPINames

public String[] getUsedAPINames()
Get the used API names, both required and optional

Returns:
an array of Strings

getVersionForUsedAPI

public APIVersion getVersionForUsedAPI(String apiName)
Get the version for the given used API.

Parameters:
apiName - name of a used API
Returns:
an APIVersion
Throws:
NullPointerException - name not found

isUsedAPIOptional

public boolean isUsedAPIOptional(String apiName)
Is the given used API optional?

Parameters:
apiName - name of a used API
Returns:
true if the given needed API is optional
Throws:
NullPointerException - name not found