commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r1529670 - /commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java
Date Sun, 06 Oct 2013 19:47:22 GMT
Author: jlmonteiro
Date: Sun Oct  6 19:47:22 2013
New Revision: 1529670

URL: http://svn.apache.org/r1529670
Log:
Adding a constant for the activation flag.

Modified:
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java?rev=1529670&r1=1529669&r2=1529670&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java
(original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java
Sun Oct  6 19:47:22 2013
@@ -29,13 +29,18 @@ import java.util.regex.Pattern;
 public final class PluginRepository {
     public static Collection<PluginInfo> PLUGIN_INFO = new CopyOnWriteArrayList<PluginInfo>();
 
+    /** This flag is used to activate a plugin by its name [plugin.name]. The default value
is true which means that
+     * every plugin discovered will be used.
+     */
+    public static final String ACTIVATED_FLAG = ".activated";
+
     static {
         for (final Plugin plugin : ServiceLoader.load(Plugin.class, Plugin.class.getClassLoader()))
{
             final String name = plugin.name();
             if (name == null) {
                 throw new IllegalArgumentException("plugin name can't be null");
             }
-            if (!Configuration.is(name + ".activated", true)) {
+            if (!Configuration.is(name + ACTIVATED_FLAG, true)) {
                 continue;
             }
 



Mime
View raw message