summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-18 22:08:31 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-18 22:08:31 +0000
commita50e7af29c5695006c4227d4d7e36cf99eff254a (patch)
tree55d45d6bde1743c8aa52fea8ccbd499e9bacecb1 /java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
parent94a10d9659412aec93dcf1214ac6d57fb7704fc4 (diff)
Updating implementation.widget to properly resolve targetEndpoints to find binding information and properly generate JavaScript client proxies
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@881960 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java b/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
index de86aa9196..7bdecc2c3a 100644
--- a/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
+++ b/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
@@ -25,6 +25,8 @@ import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.impl.ImplementationImpl;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.widget.Widget;
import org.apache.tuscany.sca.implementation.widget.WidgetImplementation;
import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
@@ -47,11 +49,14 @@ public class WidgetImplementationImpl extends ImplementationImpl implements Widg
/**
* Constructs a new resource implementation.
*/
- WidgetImplementationImpl(AssemblyFactory assemblyFactory,
- JavaInterfaceFactory javaFactory) {
+ WidgetImplementationImpl(ExtensionPointRegistry registry) {
super(TYPE);
+ FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
+ AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
+ JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
+
// Resource implementation always provide a single service exposing
// the Resource interface, and have no references and properties
widgetService = assemblyFactory.createService();
@@ -67,6 +72,8 @@ public class WidgetImplementationImpl extends ImplementationImpl implements Widg
JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract();
interfaceContract.setInterface(javaInterface);
widgetService.setInterfaceContract(interfaceContract);
+
+ this.getServices().add(widgetService);
}
public QName getType() {
@@ -99,6 +106,7 @@ public class WidgetImplementationImpl extends ImplementationImpl implements Widg
this.locationUrl = url;
}
+
@Override
public String toString() {
return "Widget : " + getLocation();