From: David ‘Bombe’ Roden Date: Wed, 13 Oct 2010 06:55:42 +0000 (+0200) Subject: Expose the version of the plugin. X-Git-Tag: 0.1-RC1~506 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=84a2d480d9c45cf7c3513f9557dd00056b30336f;p=Sone.git Expose the version of the plugin. --- diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index 60812cd..c7afdd0 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -31,6 +31,7 @@ import net.pterodactylus.util.config.ConfigurationException; import net.pterodactylus.util.config.MapConfigurationBackend; import net.pterodactylus.util.config.XMLConfigurationBackend; import net.pterodactylus.util.logging.Logging; +import net.pterodactylus.util.version.Version; import freenet.client.async.DatabaseDisabledException; import freenet.l10n.BaseL10n.LANGUAGE; import freenet.l10n.PluginL10n; @@ -38,6 +39,7 @@ import freenet.pluginmanager.FredPlugin; import freenet.pluginmanager.FredPluginBaseL10n; import freenet.pluginmanager.FredPluginL10n; import freenet.pluginmanager.FredPluginThreadless; +import freenet.pluginmanager.FredPluginVersioned; import freenet.pluginmanager.PluginRespirator; /** @@ -46,13 +48,16 @@ import freenet.pluginmanager.PluginRespirator; * * @author David ‘Bombe’ Roden */ -public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10n, FredPluginThreadless { +public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10n, FredPluginThreadless, FredPluginVersioned { static { /* initialize logging. */ Logging.setup("sone"); } + /** The version. */ + private static final Version VERSION = new Version("SNAPSHOT", 0, 1); + /** The logger. */ private static final Logger logger = Logging.getLogger(SonePlugin.class); @@ -210,4 +215,16 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 return SonePlugin.class.getClassLoader(); } + // + // INTERFACE FredPluginVersioned + // + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return VERSION.toString(); + } + }