Modified: ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/ComponentFactory.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/ComponentFactory.java?rev=1486637&r1=1486636&r2=1486637&view=diff ============================================================================== --- ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/ComponentFactory.java (original) +++ ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/ComponentFactory.java Mon May 27 15:05:08 2013 @@ -18,13 +18,12 @@ */ package org.apache.ace.agent.spi; -import java.util.Dictionary; +import java.util.Map; import java.util.Set; import org.apache.felix.dm.Component; import org.apache.felix.dm.DependencyManager; import org.osgi.framework.BundleContext; -import org.osgi.service.cm.ConfigurationException; import org.osgi.service.log.LogService; /** @@ -36,7 +35,7 @@ import org.osgi.service.log.LogService; public interface ComponentFactory { /** - * Return zero or more service components for the specified agent configuartion. + * Return zero or more service components for the specified agent configuration. * * @param context * The Bundle Context @@ -47,8 +46,8 @@ public interface ComponentFactory { * @param configuration * The agent configuration * @return A set of components, not <code>null</code> - * @throws ConfigurationException + * @throws Exception * If there is a fatal problem. */ - Set<Component> createComponents(BundleContext context, DependencyManager manager, LogService logService, Dictionary<String, String> configuration) throws ConfigurationException; + Set<Component> createComponents(BundleContext context, DependencyManager manager, LogService logService, Map<String, String> configuration) throws Exception; }
Modified: ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/ComponentFactoryBase.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/ComponentFactoryBase.java?rev=1486637&r1=1486636&r2=1486637&view=diff ============================================================================== --- ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/ComponentFactoryBase.java (original) +++ ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/ComponentFactoryBase.java Mon May 27 15:05:08 2013 @@ -18,7 +18,7 @@ */ package org.apache.ace.agent.spi; -import java.util.Dictionary; +import java.util.Map; import java.util.Properties; /** @@ -33,7 +33,7 @@ public abstract class ComponentFactoryBa * The configuration * @return The identifier */ - protected String getAgentIdentifier(Dictionary<String, String> configuration) { + protected String getAgentIdentifier(Map<String, String> configuration) { return configuration.get("agent"); } @@ -44,7 +44,7 @@ public abstract class ComponentFactoryBa * The configuration * @return The properties */ - protected Properties getAgentproperties(Dictionary<String, String> configuration) { + protected Properties getAgentproperties(Map<String, String> configuration) { Properties properties = new Properties(); properties.put("agent", getAgentIdentifier(configuration)); return properties; @@ -59,7 +59,7 @@ public abstract class ComponentFactoryBa * The optional base filter * @return The filter */ - protected String getAgentFilter(Dictionary<String, String> configuration, String base) { + protected String getAgentFilter(Map<String, String> configuration, String base) { if (base == null) { return "(agent=" + getAgentIdentifier(configuration) + ")"; } Modified: ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/OneComponentFactoryBase.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/OneComponentFactoryBase.java?rev=1486637&r1=1486636&r2=1486637&view=diff ============================================================================== --- ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/OneComponentFactoryBase.java (original) +++ ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/spi/OneComponentFactoryBase.java Mon May 27 15:05:08 2013 @@ -21,12 +21,12 @@ package org.apache.ace.agent.spi; import java.util.Collections; import java.util.Dictionary; import java.util.HashSet; +import java.util.Map; import java.util.Set; import org.apache.felix.dm.Component; import org.apache.felix.dm.DependencyManager; import org.osgi.framework.BundleContext; -import org.osgi.service.cm.ConfigurationException; import org.osgi.service.log.LogService; /** @@ -36,7 +36,7 @@ import org.osgi.service.log.LogService; public abstract class OneComponentFactoryBase extends ComponentFactoryBase { @Override - public final Set<Component> createComponents(BundleContext context, DependencyManager manager, LogService logService, Dictionary<String, String> configuration) throws ConfigurationException { + public final Set<Component> createComponents(BundleContext context, DependencyManager manager, LogService logService, Map<String, String> configuration) throws Exception { Component component = createComponent(context, manager, logService, configuration); if (component != null) { Set<Component> components = new HashSet<Component>(); @@ -58,8 +58,8 @@ public abstract class OneComponentFactor * @param configuration * The agent configuration * @return A component, or <code>null</code> - * @throws ConfigurationException + * @throws Exception * If there is a fatal problem */ - public abstract Component createComponent(BundleContext context, DependencyManager manager, LogService logService, Dictionary<String, String> configuration) throws ConfigurationException; + public abstract Component createComponent(BundleContext context, DependencyManager manager, LogService logService, Map<String, String> configuration) throws Exception; }
