summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/contrib/modules/binding-foo-runtime
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-09-02 15:02:06 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-09-02 15:02:06 +0000
commit5753f8ab1559eb3603f8fa418e6aec9996144327 (patch)
tree641a0e0611b879a4ff568731225e451e62b82ccd /sca-java-2.x/contrib/modules/binding-foo-runtime
parent72b686fc457836f7bb45e0df2e1b507dc10dfb37 (diff)
Use the DefaultBeanModelProcessor to simplify the model objects
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@991963 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/contrib/modules/binding-foo-runtime')
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java65
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBindingFactory.java11
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/impl/FooBindingFactoryImpl.java34
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/impl/FooBindingImpl.java88
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.foo.FooBindingFactory2
5 files changed, 71 insertions, 129 deletions
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java
index adc771ed59..2312901c6c 100644
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java
+++ b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java
@@ -16,16 +16,75 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package org.apache.tuscany.sca.binding.foo;
import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.OperationSelector;
+import org.apache.tuscany.sca.assembly.WireFormat;
/**
- * Foo Binding model
+ * Represents a binding to an Foo service.
*/
-public interface FooBinding extends Binding {
+public class FooBinding implements Binding {
+
QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.foo");
+
+ private String name;
+ private String uri;
+
+ public String getName() {
+ return name;
+ }
+
+ public String getURI() {
+ return uri;
+ }
+
+ public void setURI(String uri) {
+ this.uri = uri;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+
+ public boolean isUnresolved() {
+ return false;
+ }
+
+ public void setUnresolved(boolean arg0) {
+ }
+
+ public QName getType() {
+ return TYPE;
+ }
+
+ public WireFormat getRequestWireFormat() {
+ return null;
+ }
+
+ public void setRequestWireFormat(WireFormat wireFormat) {
+ }
+
+ public WireFormat getResponseWireFormat() {
+ return null;
+ }
+
+ public void setResponseWireFormat(WireFormat wireFormat) {
+ }
+
+ public OperationSelector getOperationSelector() {
+ return null;
+ }
+
+ public void setOperationSelector(OperationSelector operationSelector) {
+ }
+
}
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBindingFactory.java b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBindingFactory.java
index 15a325aefb..6082aedc55 100644
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBindingFactory.java
+++ b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBindingFactory.java
@@ -19,9 +19,14 @@
package org.apache.tuscany.sca.binding.foo;
+
/**
- * Factory to create FooBinding instances
+ * Factory implementation to create Foo Models
*/
-public interface FooBindingFactory {
- FooBinding createFooBinding();
+public class FooBindingFactory {
+
+ public FooBinding createFooBinding() {
+ return new FooBinding();
+ }
+
}
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/impl/FooBindingFactoryImpl.java b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/impl/FooBindingFactoryImpl.java
deleted file mode 100644
index ae7f38c5d6..0000000000
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/impl/FooBindingFactoryImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * 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.
- */
-
-package org.apache.tuscany.sca.binding.foo.impl;
-
-import org.apache.tuscany.sca.binding.foo.FooBinding;
-import org.apache.tuscany.sca.binding.foo.FooBindingFactory;
-
-/**
- * Factory implementation to create Foo Models
- */
-public class FooBindingFactoryImpl implements FooBindingFactory {
-
- public FooBinding createFooBinding() {
- return new FooBindingImpl();
- }
-
-}
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/impl/FooBindingImpl.java b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/impl/FooBindingImpl.java
deleted file mode 100644
index 8685a424a1..0000000000
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/impl/FooBindingImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * 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.
- */
-package org.apache.tuscany.sca.binding.foo.impl;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.assembly.OperationSelector;
-import org.apache.tuscany.sca.assembly.WireFormat;
-import org.apache.tuscany.sca.binding.foo.FooBinding;
-
-/**
- * Represents a binding to an Foo service.
- */
-public class FooBindingImpl implements FooBinding {
-
- private String name;
- private String uri;
-
- public String getName() {
- return name;
- }
-
- public String getURI() {
- return uri;
- }
-
- public void setURI(String uri) {
- this.uri = uri;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
- public boolean isUnresolved() {
- return false;
- }
-
- public void setUnresolved(boolean arg0) {
- }
-
- public QName getType() {
- return TYPE;
- }
-
- public WireFormat getRequestWireFormat() {
- return null;
- }
-
- public void setRequestWireFormat(WireFormat wireFormat) {
- }
-
- public WireFormat getResponseWireFormat() {
- return null;
- }
-
- public void setResponseWireFormat(WireFormat wireFormat) {
- }
-
- public OperationSelector getOperationSelector() {
- return null;
- }
-
- public void setOperationSelector(OperationSelector operationSelector) {
- }
-
-}
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.foo.FooBindingFactory b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.foo.FooBindingFactory
index cdd2b42484..5de0163ece 100644
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.foo.FooBindingFactory
+++ b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.foo.FooBindingFactory
@@ -16,5 +16,5 @@
# under the License.
# Implementation class for model factory
-org.apache.tuscany.sca.binding.foo.impl.FooBindingFactoryImpl
+org.apache.tuscany.sca.binding.foo.FooBindingFactory