Added description parameter to plugins
This commit is contained in:
parent
577d09c1f7
commit
7f293874f0
2 changed files with 12 additions and 3 deletions
|
|
@ -40,8 +40,9 @@ import java.util.logging.Logger;
|
||||||
public class PluginData {
|
public class PluginData {
|
||||||
private static Logger log = LogUtil.getLogger();
|
private static Logger log = LogUtil.getLogger();
|
||||||
|
|
||||||
private double pluginVersion;
|
private final double pluginVersion;
|
||||||
private String pluginName;
|
private final String pluginName;
|
||||||
|
private final String pluginDescription;
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
private HashMap<Class<?>, List<Class<?>>> classMap;
|
private HashMap<Class<?>, List<Class<?>>> classMap;
|
||||||
private HashMap<Class, Object> objectMap;
|
private HashMap<Class, Object> objectMap;
|
||||||
|
|
@ -53,6 +54,7 @@ public class PluginData {
|
||||||
|
|
||||||
pluginVersion = data.getDouble("version");
|
pluginVersion = data.getDouble("version");
|
||||||
pluginName = data.getString("name");
|
pluginName = data.getString("name");
|
||||||
|
pluginDescription = data.getString("description");
|
||||||
log.fine("Plugin: " + this);
|
log.fine("Plugin: " + this);
|
||||||
|
|
||||||
DataNode node = data.get("interfaces");
|
DataNode node = data.get("interfaces");
|
||||||
|
|
@ -109,6 +111,12 @@ public class PluginData {
|
||||||
public String getName(){
|
public String getName(){
|
||||||
return pluginName;
|
return pluginName;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @return the name of the plugin
|
||||||
|
*/
|
||||||
|
public String getDescription(){
|
||||||
|
return pluginDescription;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @return if this plugin is enabled
|
* @return if this plugin is enabled
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"version": 1.0,
|
"version": 1.0,
|
||||||
"name": "Nice name of Plugin",
|
"name": "Nice Plugin Name",
|
||||||
|
"description": "This is a example plugin description",
|
||||||
"interfaces": [
|
"interfaces": [
|
||||||
{"plugin.interface.class": "plugin.implementation.class"},
|
{"plugin.interface.class": "plugin.implementation.class"},
|
||||||
{"wa.server.plugin.WAFrontend": "wa.server.plugin.apache.ApacheFrontend"}
|
{"wa.server.plugin.WAFrontend": "wa.server.plugin.apache.ApacheFrontend"}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue