summaryrefslogtreecommitdiff
path: root/java/broker-plugins/simple-xml
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2010-06-02 16:47:34 +0000
committerMartin Ritchie <ritchiem@apache.org>2010-06-02 16:47:34 +0000
commite6697ce5f03df5b2b53ec203c1894d8f11c89f3d (patch)
tree7a9653be6111bd0c842d3efc19356acd790a15d9 /java/broker-plugins/simple-xml
parentbb9a83ea69616960d2e56052ba1b782a0db685b0 (diff)
downloadqpid-python-e6697ce5f03df5b2b53ec203c1894d8f11c89f3d.tar.gz
QPID-2581 : Update Plugins to have a consistent configure(ConfigurationPlugin config) method.
Further work is required to ensure that all ConfigurationPlugins perform config validation rather than leaving that to the plugin. The plugin should just use the config. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@950656 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker-plugins/simple-xml')
-rw-r--r--java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java b/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java
index 4b3d8f02de..26a5c132f9 100644
--- a/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java
+++ b/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java
@@ -52,8 +52,8 @@ public class SimpleXML extends AbstractPlugin
{
public SimpleXML newInstance(ConfigurationPlugin config) throws ConfigurationException
{
- SimpleXML plugin = new SimpleXML(config);
- plugin.configure();
+ SimpleXML plugin = new SimpleXML();
+ plugin.configure(config);
return plugin;
}
@@ -68,20 +68,17 @@ public class SimpleXML extends AbstractPlugin
}
};
- public SimpleXML(ConfigurationPlugin config) throws ConfigurationException
+ public void configure(ConfigurationPlugin config) throws ConfigurationException
{
_config = config.getConfiguration(SimpleXMLConfiguration.class);
- }
- public void configure() throws ConfigurationException
- {
- SimpleXMLConfiguration config = (SimpleXMLConfiguration) _config;
+ SimpleXMLConfiguration configuration = (SimpleXMLConfiguration) _config;
if (isConfigured())
{
_users = new ConcurrentHashMap<String, PrincipalPermissions>();
- processConfig(config.getConfiguration());
+ processConfig(configuration.getConfiguration());
}
}