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-15 20:45:31 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-15 20:45:31 +0000
commitefcba9dd02acad5520bd214bab94e0f58e2b6c19 (patch)
tree428237559c2c48e2a8309b5214b5e273a2bbf832 /java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/impl/WidgetImplementationImpl.java
parentc7fb298ae0fbbdc371ba7e485feaf4956030b015 (diff)
Porting implementation.widget modesl from 1.x
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@836412 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.java81
1 files changed, 26 insertions, 55 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 f50fd73b5c..de86aa9196 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
@@ -19,15 +19,12 @@
package org.apache.tuscany.sca.implementation.widget.impl;
import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+
+import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.Reference;
import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.assembly.impl.ImplementationImpl;
import org.apache.tuscany.sca.implementation.widget.Widget;
import org.apache.tuscany.sca.implementation.widget.WidgetImplementation;
import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
@@ -41,21 +38,20 @@ import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
*
* @version $Rev$ $Date$
*/
-public class WidgetImplementationImpl implements WidgetImplementation {
+public class WidgetImplementationImpl extends ImplementationImpl implements WidgetImplementation {
private Service widgetService;
- private List<Reference> references = new ArrayList<Reference>();
- private List<Property> properties = new ArrayList<Property>();
-
+
private String location;
- private URL url;
- private boolean unresolved;
+ private URL locationUrl;
/**
* Constructs a new resource implementation.
*/
WidgetImplementationImpl(AssemblyFactory assemblyFactory,
- JavaInterfaceFactory javaFactory) {
-
+ JavaInterfaceFactory javaFactory) {
+
+ super(TYPE);
+
// Resource implementation always provide a single service exposing
// the Resource interface, and have no references and properties
widgetService = assemblyFactory.createService();
@@ -73,61 +69,36 @@ public class WidgetImplementationImpl implements WidgetImplementation {
widgetService.setInterfaceContract(interfaceContract);
}
- public String getLocation() {
- return location;
- }
-
- public void setLocation(String location) {
- this.location = location;
- }
-
- public URL getLocationURL() {
- return url;
+ public QName getType() {
+ return TYPE;
}
- public void setLocationURL(URL url) {
- this.url = url;
- }
-
- public ConstrainingType getConstrainingType() {
- // The resource implementation does not support constrainingTypes
- return null;
- }
-
- public List<Property> getProperties() {
- return properties;
+ @Override
+ public String getURI() {
+ return location;
}
- public List<Service> getServices() {
- // The resource implementation does not support services
- return Collections.singletonList(widgetService);
+ @Override
+ public void setURI(String uri) {
+ this.location = uri;
}
- public List<Reference> getReferences() {
- return references;
- }
-
- public String getURI() {
+ public String getLocation() {
return location;
}
- public void setConstrainingType(ConstrainingType constrainingType) {
- // The resource implementation does not support constrainingTypes
+ public void setLocation(String location) {
+ this.location = location;
}
- public void setURI(String uri) {
- this.location = uri;
+ public URL getLocationURL() {
+ return locationUrl;
}
-
-
- public boolean isUnresolved() {
- return unresolved;
+
+ public void setLocationURL(URL url) {
+ this.locationUrl = url;
}
- public void setUnresolved(boolean unresolved) {
- this.unresolved = unresolved;
- }
-
@Override
public String toString() {
return "Widget : " + getLocation();