public class PluginMetadataHelper extends Object
Constructor and Description |
---|
PluginMetadataHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
getAuthor(java.nio.file.Path pluginDir)
Returns the author of a plugin.
|
static String |
getAuthor(Plugin plugin)
Returns the author of a plugin.
|
static String |
getCanonicalName(java.nio.file.Path pluginDir)
Returns the canonical name for the plugin, derived from the plugin directory name.
|
static String |
getCanonicalName(Plugin plugin)
Returns the canonical name for the plugin, derived from the plugin directory name.
|
static String |
getDatabaseKey(java.nio.file.Path pluginDir)
Returns the database schema key of a plugin, if it exists.
|
static String |
getDatabaseKey(Plugin plugin)
Returns the database schema key of a plugin, if it exists.
|
static int |
getDatabaseVersion(java.nio.file.Path pluginDir)
Returns the database schema version of a plugin, if it exists.
|
static int |
getDatabaseVersion(Plugin plugin)
Returns the database schema version of a plugin, if it exists.
|
static String |
getDescription(java.nio.file.Path pluginDir)
Returns the description of a plugin.
|
static String |
getDescription(Plugin plugin)
Returns the description of a plugin.
|
static License |
getLicense(java.nio.file.Path pluginDir)
Returns the license agreement type that the plugin is governed by.
|
static License |
getLicense(Plugin plugin)
Returns the license agreement type that the plugin is governed by.
|
static String |
getMinServerVersion(java.nio.file.Path pluginDir)
Returns the minimum server version this plugin can run within.
|
static String |
getMinServerVersion(Plugin plugin)
Returns the minimum server version this plugin can run within.
|
static String |
getName(java.nio.file.Path pluginDir)
Returns the name of a plugin.
|
static String |
getName(Plugin plugin)
Returns the name of a plugin.
|
static String |
getParentPlugin(java.nio.file.Path pluginDir)
Returns the name of the directory of the parent for this plugin.
|
static String |
getVersion(java.nio.file.Path pluginDir)
Returns the version of a plugin.
|
static String |
getVersion(Plugin plugin)
Returns the version of a plugin.
|
public static String getParentPlugin(java.nio.file.Path pluginDir)
pluginDir
- the path of the plugin directory.public static String getCanonicalName(Plugin plugin)
getName(Path)
.
Note that this method will return data only for plugins that have successfully been installed. To obtain data
from plugin (directories) that have not (yet) been installed, refer to the overloaded method that takes a Path
argument.plugin
- The plugin (cannot be null)public static String getCanonicalName(java.nio.file.Path pluginDir)
getName(Path)
.pluginDir
- the path of the plugin directory.public static String getName(Plugin plugin)
getCanonicalName(Path)
.
Note that this method will return data only for plugins that have successfully been installed. To obtain data
from plugin (directories) that have not (yet) been installed, refer to the overloaded method that takes a Path
argument.plugin
- The plugin (cannot be null)public static String getName(java.nio.file.Path pluginDir)
getCanonicalName(Path)
.pluginDir
- the path of the plugin directory.public static String getDescription(Plugin plugin)
plugin
- The plugin (cannot be null)public static String getDescription(java.nio.file.Path pluginDir)
pluginDir
- the path of the plugin directory.public static String getAuthor(Plugin plugin)
plugin
- The plugin (cannot be null)public static String getAuthor(java.nio.file.Path pluginDir)
pluginDir
- the path of the plugin directory.public static String getVersion(Plugin plugin)
plugin
- The plugin (cannot be null)public static String getVersion(java.nio.file.Path pluginDir)
pluginDir
- the path of the plugin directory.public static String getMinServerVersion(Plugin plugin)
plugin
- The plugin (cannot be null)public static String getMinServerVersion(java.nio.file.Path pluginDir)
pluginDir
- the path of the plugin directory.public static String getDatabaseKey(Plugin plugin)
plugin
- The plugin (cannot be null)public static String getDatabaseKey(java.nio.file.Path pluginDir)
pluginDir
- the path of the plugin directory.public static int getDatabaseVersion(Plugin plugin)
plugin
- The plugin (cannot be null)public static int getDatabaseVersion(java.nio.file.Path pluginDir)
pluginDir
- the path of the plugin directory.public static License getLicense(Plugin plugin)
License.other
is returned.
Note that this method will return data only for plugins that have successfully been installed. To obtain data
from plugin (directories) that have not (yet) been installed, refer to the overloaded method that takes a Path
argument.plugin
- The plugin (cannot be null)public static License getLicense(java.nio.file.Path pluginDir)
License.other
is returned.pluginDir
- the path of the plugin directory.Copyright © 2003-2008 Jive Software.