From b099739d69690535623b126b37f47bfdfecf040f Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 20 May 2009 16:46:55 +0000 Subject: Refactoring a few methods on the ServiceDiscover Adding an OSGi service registry based ExtensionPointRegistry implementation git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776759 13f79535-47bb-0310-9956-ffa450edef68 --- .../DefaultCompositeBuilderExtensionPoint.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'java/sca/modules/assembly') diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java index d9b9763475..80b95189ec 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java @@ -6,23 +6,23 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ package org.apache.tuscany.sca.assembly.builder; import java.lang.reflect.Constructor; +import java.util.Collection; import java.util.HashMap; import java.util.Map; -import java.util.Set; import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.core.ExtensionPointRegistry; @@ -68,14 +68,14 @@ public class DefaultCompositeBuilderExtensionPoint implements CompositeBuilderEx private synchronized void loadBuilders() { if (loaded) return; - + FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class); - + UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class); InterfaceContractMapper mapper = utils.getUtility(InterfaceContractMapper.class); - + // Get the provider factory service declarations - Set builderDeclarations; + Collection builderDeclarations; ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance(); try { builderDeclarations = serviceDiscovery.getServiceDeclarations(CompositeBuilder.class.getName()); @@ -113,11 +113,11 @@ public class DefaultCompositeBuilderExtensionPoint implements CompositeBuilderEx this.factories = factories; this.mapper = mapper; } - + public String getID() { return id; } - + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { getBuilder().build(composite, definitions, monitor); } -- cgit v1.2.3