Revision: 725 http://cishell.svn.sourceforge.net/cishell/?rev=725&view=rev Author: mwlinnem Date: 2008-03-27 07:44:41 -0700 (Thu, 27 Mar 2008) Log Message: ----------- Converted to parameter mutator. Modified Paths: -------------- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java =================================================================== --- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java 2008-03-26 21:29:56 UTC (rev 724) +++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java 2008-03-27 14:44:41 UTC (rev 725) @@ -9,21 +9,20 @@ import org.cishell.framework.CIShellContext; import org.cishell.framework.algorithm.Algorithm; import org.cishell.framework.algorithm.AlgorithmFactory; +import org.cishell.framework.algorithm.ParameterMutator; import org.cishell.framework.data.Data; import org.cishell.reference.service.metatype.BasicAttributeDefinition; -import org.cishell.reference.service.metatype.BasicMetaTypeProvider; import org.cishell.reference.service.metatype.BasicObjectClassDefinition; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.service.component.ComponentContext; import org.osgi.service.metatype.AttributeDefinition; import org.osgi.service.metatype.MetaTypeInformation; -import org.osgi.service.metatype.MetaTypeProvider; import org.osgi.service.metatype.MetaTypeService; import org.osgi.service.metatype.ObjectClassDefinition; -public class ConverterTesterAlgorithmFactory implements AlgorithmFactory { +public class ConverterTesterAlgorithmFactory implements AlgorithmFactory, ParameterMutator { public static final String SELECTED_CONVERTER_PARAM_ID = "selectedConverter"; public static final String NUM_HOPS_PARAM_ID = "numHops"; @@ -46,7 +45,8 @@ public Algorithm createAlgorithm(Data[] data, Dictionary parameters, CIShellContext context) { return new ConverterTesterAlgorithm(data, parameters, context, bContext); } - public MetaTypeProvider createParameters(Data[] data) { + public ObjectClassDefinition mutateParameters(Data[] data, + ObjectClassDefinition parameters) { String[] converterNames = extractConverterNames( ConverterTesterAlgorithmUtil. @@ -88,8 +88,7 @@ - MetaTypeProvider provider = new BasicMetaTypeProvider(definition); - return provider; + return definition; } private String[] extractConverterNames(ServiceReference[] converterRefs) { @@ -112,4 +111,9 @@ int startIndex = pid.lastIndexOf(".") + 1; return pid.substring(startIndex); } + + public ObjectClassDefinition mutateParameters() { + // TODO Auto-generated method stub + return null; + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |