public class PluginMetadataHelper extends Object
Constructor and Description |
---|
PluginMetadataHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
getAuthor(Path pluginDir)
Returns the author of a plugin.
|
static String |
getAuthor(Plugin plugin)
Returns the author of a plugin.
|
static String |
getCanonicalName(Path pluginPath)
Returns the canonical name for the plugin, derived from the plugin directory or archive file name.
|
static String |
getCanonicalName(Plugin plugin)
Returns the canonical name for the plugin, derived from the plugin archive file name.
|
static URL |
getChangelog(Path pluginDir) |
static URL |
getChangelog(Plugin plugin) |
static String |
getDatabaseKey(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(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(Path pluginDir)
Returns the description of a plugin.
|
static String |
getDescription(Plugin plugin)
Returns the description of a plugin.
|
static URL |
getIcon(Path pluginDir) |
static URL |
getIcon(Plugin plugin) |
static String |
getLicense(Path pluginDir)
Returns the license agreement type that the plugin is governed by.
|
static String |
getLicense(Plugin plugin)
Returns the license agreement type that the plugin is governed by.
|
static JavaSpecVersion |
getMinJavaVersion(Path pluginDir)
Returns the minimum Java specification version this plugin needs to run.
|
static JavaSpecVersion |
getMinJavaVersion(Plugin plugin)
Returns the minimum Java specification version this plugin needs to run.
|
static Version |
getMinServerVersion(Path pluginDir)
Returns the minimum server version this plugin can run within.
|
static Version |
getMinServerVersion(Plugin plugin)
Returns the minimum server version this plugin can run within.
|
static String |
getName(Path pluginDir)
Returns the name of a plugin.
|
static String |
getName(Plugin plugin)
Returns the name of a plugin.
|
static String |
getParentPlugin(Path pluginDir)
Returns the name of the directory of the parent for this plugin.
|
static String |
getParentPlugin(Plugin plugin)
Returns the name of the directory of the parent for this plugin.
|
static Version |
getPriorToServerVersion(Path pluginDir)
Returns the server version up, but not including, in which this plugin can run within.
|
static Version |
getPriorToServerVersion(Plugin plugin)
Returns the server version up, but not including, in which this plugin can run within.
|
static URL |
getReadme(Path pluginDir) |
static URL |
getReadme(Plugin plugin) |
static Version |
getVersion(Path pluginDir)
Returns the version of a plugin.
|
static Version |
getVersion(Plugin plugin)
Returns the version of a plugin.
|
static boolean |
isCsrfProtectionEnabled(Path pluginDir) |
static boolean |
isCsrfProtectionEnabled(Plugin plugin) |
public static String getParentPlugin(Plugin plugin)
null
will be returned.plugin
- The plugin (cannot be null)public static String getParentPlugin(Path pluginDir)
null
will be returned.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(Path pluginPath)
getName(Path)
.pluginPath
- the path of the plugin directory, or plugin archive file.public static String getName(Plugin plugin)
null
will be returned. Note that this value is a 'human readable' name, which can be distinct
from the name of the plugin directory as returned by 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(Path pluginDir)
null
will be returned. Note that this value is a 'human readable' name, which can be distinct
from the name of the plugin directory as returned by getCanonicalName(Path)
.pluginDir
- the path of the plugin directory.public static String getDescription(Plugin plugin)
null
will be 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 String getDescription(Path pluginDir)
null
will be returned.pluginDir
- the path of the plugin directory.public static String getAuthor(Plugin plugin)
null
will be 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 String getAuthor(Path pluginDir)
null
will be returned.pluginDir
- the path of the plugin directory.public static Version getVersion(Plugin plugin)
null
will be 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 Version getVersion(Path pluginDir)
null
will be returned.pluginDir
- the path of the plugin directory.public static Version getMinServerVersion(Plugin plugin)
null
will be 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 Version getMinServerVersion(Path pluginDir)
null
will be returned.pluginDir
- the path of the plugin directory.public static Version getPriorToServerVersion(Plugin plugin)
null
will be 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 Version getPriorToServerVersion(Path pluginDir)
null
will be returned.pluginDir
- the path of the plugin directory.public static JavaSpecVersion getMinJavaVersion(Plugin plugin)
null
will be 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 JavaSpecVersion getMinJavaVersion(Path pluginDir)
null
will be returned.pluginDir
- the path of the plugin directory.public static boolean isCsrfProtectionEnabled(Plugin plugin)
public static boolean isCsrfProtectionEnabled(Path pluginDir)
public static String getDatabaseKey(Plugin plugin)
null
will be 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)null
if it doesn't exist.public static String getDatabaseKey(Path pluginDir)
null
will be returned.pluginDir
- the path of the plugin directory.null
if it doesn't exist.public static int getDatabaseVersion(Plugin plugin)
-1
will be 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)-1
if it doesn't exist.public static int getDatabaseVersion(Path pluginDir)
-1
will be returned.pluginDir
- the path of the plugin directory.-1
if it doesn't exist.public static String getLicense(Plugin plugin)
plugin
- The plugin (cannot be null)public static String getLicense(Path pluginDir)
pluginDir
- the path of the plugin directory.Copyright © 2003–2020 Ignite Realtime. All rights reserved.