summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-04-25 17:51:29 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-04-25 17:51:29 +0000
commitfea3c0ecbc1cec4fc04c30658615d0ab88e2561f (patch)
tree4a442ca0b1bc9b3c3437bbe6b4e687c79044dda9
parent9561f0c30028dfc24eaf0f5d562305b9213607fb (diff)
Refactoring packages and other references from HTTP to REST
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@937843 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF10
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml2
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java)30
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingProviderFactory.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java)18
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTGetListenerServlet.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java)6
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceBindingProvider.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java)20
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceListenerServlet.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java)6
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory3
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/NotModifiedException.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java)2
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/PreconditionFailedException.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java)2
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTBindingCacheTestCase.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java)6
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTBindingTestCase.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java)6
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java)12
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestGetImpl.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java)2
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestServiceCacheImpl.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java)2
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestServiceImpl.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java)2
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/test.composite10
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/testCache.composite4
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF9
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBinding.java (renamed from sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java)8
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBindingFactory.java (renamed from sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java)13
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTCacheContext.java (renamed from sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java)9
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingFactoryImpl.java (renamed from sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java)14
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingImpl.java (renamed from sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java)6
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java (renamed from sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java)34
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.rest.RESTBindingFactory (renamed from sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory)2
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor2
27 files changed, 120 insertions, 120 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF
index 175d11f601..7ec5487d22 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF
@@ -1,17 +1,17 @@
Manifest-Version: 1.0
-Private-Package: org.apache.tuscany.sca.binding.http.provider;version="2.0.
+Private-Package: org.apache.tuscany.sca.binding.rest.provider;version="2.0.
0",.;version="2.0.0"
SCA-Version: 1.1
-Bundle-Name: Apache Tuscany SCA HTTP Binding Runtime
+Bundle-Name: Apache Tuscany SCA REST Binding Runtime
Bundle-Vendor: The Apache Software Foundation
Bundle-Version: 2.0.0
Bundle-ManifestVersion: 2
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Description: Apache Tuscany SCA HTTP Binding Runtime
+Bundle-Description: Apache Tuscany SCA REST Binding Runtime
Import-Package: javax.servlet,
javax.servlet.http,
org.apache.tuscany.sca.assembly;version="2.0.0",
- org.apache.tuscany.sca.binding.http;version="2.0.0",
+ org.apache.tuscany.sca.binding.rest;version="2.0.0",
org.apache.tuscany.sca.common.http;version="2.0.0",
org.apache.tuscany.sca.core;version="2.0.0",
org.apache.tuscany.sca.host.http;version="2.0.0",
@@ -20,7 +20,7 @@ Import-Package: javax.servlet,
org.apache.tuscany.sca.provider;version="2.0.0",
org.apache.tuscany.sca.runtime;version="2.0.0",
org.oasisopen.sca.annotation;version="2.0.0"
-Bundle-SymbolicName: org.apache.tuscany.sca.binding.http.runtime
+Bundle-SymbolicName: org.apache.tuscany.sca.binding.rest.runtime
Bundle-DocURL: http://www.apache.org/
Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml b/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml
index 4d49c41b1c..ec672f1690 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/pom.xml
@@ -32,7 +32,7 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-http</artifactId>
+ <artifactId>tuscany-binding-rest</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java
index 3e8e396927..5739fbea77 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
import java.io.IOException;
import java.io.InputStream;
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.http.HTTPCacheContext;
+import org.apache.tuscany.sca.binding.rest.RESTCacheContext;
import org.apache.tuscany.sca.common.http.HTTPContentTypeMapper;
import org.apache.tuscany.sca.invocation.Invoker;
import org.apache.tuscany.sca.invocation.Message;
@@ -43,7 +43,7 @@ import org.apache.tuscany.sca.invocation.MessageFactory;
*
* @version $Rev$ $Date$
*/
-public class HTTPBindingListenerServlet extends HttpServlet {
+public class RESTBindingListenerServlet extends HttpServlet {
private static final long serialVersionUID = 2865466417329430610L;
transient private Binding binding;
@@ -59,9 +59,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
private Invoker conditionalDeleteInvoker;
/**
- * Constructs a new HTTPServiceListenerServlet.
+ * Constructs a new RESTServiceListenerServlet.
*/
- public HTTPBindingListenerServlet(Binding binding, MessageFactory messageFactory) {
+ public RESTBindingListenerServlet(Binding binding, MessageFactory messageFactory) {
this.binding = binding;
this.messageFactory = messageFactory;
}
@@ -89,9 +89,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
+ RESTCacheContext cacheContext = null;
try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -163,9 +163,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
+ RESTCacheContext cacheContext = null;
try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -229,9 +229,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
+ RESTCacheContext cacheContext = null;
try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -295,9 +295,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
// String id = path.substring(1);
Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
+ RESTCacheContext cacheContext = null;
try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -333,9 +333,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
// Test if the ETag and LastModified are returned as a cache context.
Object body = responseMessage.getBody();
- if ( body.getClass() == HTTPCacheContext.class ) {
+ if ( body.getClass() == RESTCacheContext.class ) {
// Transfer to header if so.
- HTTPCacheContext cc = (HTTPCacheContext)responseMessage.getBody();
+ RESTCacheContext cc = (RESTCacheContext)responseMessage.getBody();
if (( cc != null ) && ( cc.isEnabled() )) {
String eTag = cc.getETag();
if ( eTag != null )
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingProviderFactory.java
index 118a2c3bc4..23012f4a6b 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingProviderFactory.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
-import org.apache.tuscany.sca.binding.http.HTTPBinding;
+import org.apache.tuscany.sca.binding.rest.RESTBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
@@ -33,16 +33,16 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
/**
- * Factory for HTTP binding providers.
+ * Factory for REST binding providers.
*
* @version $Rev$ $Date$
*/
-public class HTTPBindingProviderFactory implements BindingProviderFactory<HTTPBinding> {
+public class RESTBindingProviderFactory implements BindingProviderFactory<RESTBinding> {
private ExtensionPointRegistry extensionPoints;
private MessageFactory messageFactory;
private ServletHost servletHost;
- public HTTPBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+ public RESTBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
this.extensionPoints = extensionPoints;
this.servletHost = ServletHostHelper.getServletHost(extensionPoints);
FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
@@ -50,15 +50,15 @@ public class HTTPBindingProviderFactory implements BindingProviderFactory<HTTPBi
}
public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpointReference) {
- // Binding HTTP is currently NOT supporting References
+ // Binding REST is currently NOT supporting References
return null;
}
public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) {
- return new HTTPServiceBindingProvider(endpoint, extensionPoints, messageFactory, servletHost);
+ return new RESTServiceBindingProvider(endpoint, extensionPoints, messageFactory, servletHost);
}
- public Class<HTTPBinding> getModelType() {
- return HTTPBinding.class;
+ public Class<RESTBinding> getModelType() {
+ return RESTBinding.class;
}
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTGetListenerServlet.java
index e20d420d49..b08fa4b201 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTGetListenerServlet.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
import java.io.IOException;
import java.io.InputStream;
@@ -39,7 +39,7 @@ import org.apache.tuscany.sca.invocation.MessageFactory;
*
* @version $Rev$ $Date$
*/
-public class HTTPGetListenerServlet extends HttpServlet {
+public class RESTGetListenerServlet extends HttpServlet {
private static final long serialVersionUID = 2865466417329430610L;
private MessageFactory messageFactory;
@@ -48,7 +48,7 @@ public class HTTPGetListenerServlet extends HttpServlet {
/**
* Constructs a new HTTPServiceListenerServlet.
*/
- public HTTPGetListenerServlet(Invoker getInvoker, MessageFactory messageFactory) {
+ public RESTGetListenerServlet(Invoker getInvoker, MessageFactory messageFactory) {
this.getInvoker = getInvoker;
this.messageFactory = messageFactory;
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceBindingProvider.java
index 41981d2db5..e70aed8680 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceBindingProvider.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
import javax.servlet.Servlet;
-import org.apache.tuscany.sca.binding.http.HTTPBinding;
+import org.apache.tuscany.sca.binding.rest.RESTBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
@@ -45,14 +45,14 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
*
* @version $Rev$ $Date$
*/
-public class HTTPServiceBindingProvider implements EndpointProvider {
+public class RESTServiceBindingProvider implements EndpointProvider {
private ExtensionPointRegistry extensionPoints;
private RuntimeEndpoint endpoint;
private RuntimeComponent component;
private RuntimeComponentService service;
private InterfaceContract serviceContract;
- private HTTPBinding binding;
+ private RESTBinding binding;
private MessageFactory messageFactory;
private OperationSelectorProvider osProvider;
@@ -60,9 +60,9 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
private ServletHost servletHost;
private String servletMapping;
- private HTTPBindingListenerServlet bindingListenerServlet;
+ private RESTBindingListenerServlet bindingListenerServlet;
- public HTTPServiceBindingProvider(RuntimeEndpoint endpoint,
+ public RESTServiceBindingProvider(RuntimeEndpoint endpoint,
ExtensionPointRegistry extensionPoints,
MessageFactory messageFactory,
ServletHost servletHost) {
@@ -70,7 +70,7 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
this.endpoint = endpoint;
this.component = (RuntimeComponent)endpoint.getComponent();
this.service = (RuntimeComponentService)endpoint.getService();
- this.binding = (HTTPBinding)endpoint.getBinding();
+ this.binding = (RESTBinding)endpoint.getBinding();
this.extensionPoints = extensionPoints;
this.messageFactory = messageFactory;
@@ -116,7 +116,7 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
public void start() {
// Get the invokers for the supported operations
Servlet servlet = null;
- bindingListenerServlet = new HTTPBindingListenerServlet(binding, messageFactory );
+ bindingListenerServlet = new RESTBindingListenerServlet(binding, messageFactory );
for (InvocationChain invocationChain : endpoint.getInvocationChains()) {
Operation operation = invocationChain.getTargetOperation();
String operationName = operation.getName();
@@ -154,7 +154,7 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
servlet = bindingListenerServlet;
} else if (operationName.equals("service")) {
Invoker serviceInvoker = invocationChain.getHeadInvoker();
- servlet = new HTTPServiceListenerServlet(binding, serviceInvoker, messageFactory);
+ servlet = new RESTServiceListenerServlet(binding, serviceInvoker, messageFactory);
break;
}
}
@@ -189,7 +189,7 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
}
/**
- * Add specific http interceptor to invocation chain
+ * Add specific rest interceptor to invocation chain
*/
public void configure() {
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceListenerServlet.java
index f752dce3e1..183a0e599b 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceListenerServlet.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
import java.io.IOException;
@@ -39,7 +39,7 @@ import org.apache.tuscany.sca.invocation.MessageFactory;
*
* @version $Rev$ $Date$
*/
-public class HTTPServiceListenerServlet implements Servlet {
+public class RESTServiceListenerServlet implements Servlet {
transient private Binding binding;
transient private ServletConfig config;
transient private MessageFactory messageFactory;
@@ -48,7 +48,7 @@ public class HTTPServiceListenerServlet implements Servlet {
/**
* Constructs a new HTTPServiceListenerServlet.
*/
- public HTTPServiceListenerServlet(Binding binding, Invoker serviceInvoker, MessageFactory messageFactory) {
+ public RESTServiceListenerServlet(Binding binding, Invoker serviceInvoker, MessageFactory messageFactory) {
this.binding = binding;
this.serviceInvoker = serviceInvoker;
this.messageFactory = messageFactory;
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
index 15b0e51b74..4a682c1cb6 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
@@ -16,5 +16,4 @@
# under the License.
# Implementation class for the binding extension
-org.apache.tuscany.sca.binding.http.provider.HTTPBindingProviderFactory;model=org.apache.tuscany.sca.binding.http.HTTPBinding
-
+org.apache.tuscany.sca.binding.rest.provider.RESTBindingProviderFactory;model=org.apache.tuscany.sca.binding.rest.RESTBinding
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/NotModifiedException.java
index 1d6efea2a1..49e7d67a76 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/NotModifiedException.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/NotModifiedException.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
/**
* Indicates that a resource was not modified.
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/PreconditionFailedException.java
index 5728899ebe..1463e1a5db 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/PreconditionFailedException.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/PreconditionFailedException.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
/**
* Indicates that a resource was not modified.
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTBindingCacheTestCase.java
index eed7975bc6..e68646c8a5 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingCacheTestCase.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTBindingCacheTestCase.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
import java.io.BufferedReader;
import java.io.IOException;
@@ -42,7 +42,7 @@ import org.junit.Test;
*
* @version $Rev$ $Date$
*/
-public class HTTPBindingCacheTestCase {
+public class RESTBindingCacheTestCase {
// RFC 822 date time
protected static final SimpleDateFormat dateFormat = new SimpleDateFormat(
"EEE, dd MMM yyyy HH:mm:ss Z");
@@ -64,7 +64,7 @@ public class HTTPBindingCacheTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- String contribution = ContributionLocationHelper.getContributionLocation(HTTPBindingCacheTestCase.class);
+ String contribution = ContributionLocationHelper.getContributionLocation(RESTBindingCacheTestCase.class);
node = NodeFactory.newInstance().createNode("testCache.composite", new Contribution("test", contribution));
node.start();
} catch (Exception e) {
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTBindingTestCase.java
index f314bed909..e08069f479 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HTTPBindingTestCase.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTBindingTestCase.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
import java.io.BufferedReader;
import java.io.IOException;
@@ -41,7 +41,7 @@ import org.junit.Test;
*
* @version $Rev$ $Date$
*/
-public class HTTPBindingTestCase {
+public class RESTBindingTestCase {
private static final String REQUEST1_HEADER =
"GET /httpservice/test HTTP/1.0\n" + "Host: localhost\n"
@@ -77,7 +77,7 @@ public class HTTPBindingTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- String contribution = ContributionLocationHelper.getContributionLocation(HTTPBindingCacheTestCase.class);
+ String contribution = ContributionLocationHelper.getContributionLocation(RESTBindingCacheTestCase.class);
node = NodeFactory.newInstance().createNode("test.composite", new Contribution("test", contribution));
node.start();
} catch (Exception e) {
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java
index f2456f3175..697f40ae69 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestBindingCacheImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
@@ -49,7 +49,7 @@ public class TestBindingCacheImpl {
* @param id
* @return
*/
- public InputStream conditionalGet(String id, HTTPCacheContext cacheContext)
+ public InputStream conditionalGet(String id, RESTCacheContext cacheContext)
throws NotModifiedException, PreconditionFailedException {
if (cacheContext != null) {
@@ -99,7 +99,7 @@ public class TestBindingCacheImpl {
* @param id
* @return
*/
- public InputStream conditionalDelete(String id, HTTPCacheContext cacheContext)
+ public InputStream conditionalDelete(String id, RESTCacheContext cacheContext)
throws NotModifiedException, PreconditionFailedException {
if (cacheContext != null) {
@@ -151,7 +151,7 @@ public class TestBindingCacheImpl {
* @param id
* @return
*/
- public HTTPCacheContext conditionalPost(HTTPCacheContext cacheContext)
+ public RESTCacheContext conditionalPost(RESTCacheContext cacheContext)
throws NotModifiedException, PreconditionFailedException {
String id = "" + (new java.util.Random()).nextInt(Integer.MAX_VALUE);
@@ -180,7 +180,7 @@ public class TestBindingCacheImpl {
}
// Return the ETag and LastModfied fields by serialize to a byte array
- HTTPCacheContext returnContext = new HTTPCacheContext();
+ RESTCacheContext returnContext = new RESTCacheContext();
returnContext.setETag( "ETag" + (new java.util.Random()).nextInt(Integer.MAX_VALUE) );
returnContext.setLastModified( new Date() );
return returnContext;
@@ -202,7 +202,7 @@ public class TestBindingCacheImpl {
* @param id
* @return
*/
- public InputStream conditionalPut(String id, HTTPCacheContext cacheContext)
+ public InputStream conditionalPut(String id, RESTCacheContext cacheContext)
throws NotModifiedException, PreconditionFailedException {
if (cacheContext != null) {
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestGetImpl.java
index 333bacbab3..4cb1bce73f 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestGetImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestGetImpl.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestServiceCacheImpl.java
index fec68138a0..e97a107c65 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceCacheImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestServiceCacheImpl.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
import java.io.IOException;
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestServiceImpl.java
index b8c1223894..6b21d6094f 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/http/TestServiceImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestServiceImpl.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
import java.io.IOException;
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/test.composite b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/test.composite
index e3525f4afd..9fbce7c427 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/test.composite
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/test.composite
@@ -26,21 +26,21 @@
<!-- component name="ResourceServiceComponent">
<tuscany:implementation.resource location="content"/>
<service name="Resource">
- <tuscany:binding.http uri="http://localhost:8085/webcontent"/>
+ <tuscany:binding.rest uri="http://localhost:8085/webcontent"/>
</service>
</component -->
<component name="HTTPServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.http.TestServiceImpl"/>
+ <implementation.java class="org.apache.tuscany.sca.binding.rest.TestServiceImpl"/>
<service name="Servlet">
- <tuscany:binding.http uri="http://localhost:8085/httpservice"/>
+ <tuscany:binding.rest uri="http://localhost:8085/httpservice"/>
</service>
</component>
<component name="HTTPGetComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.http.TestGetImpl"/>
+ <implementation.java class="org.apache.tuscany.sca.binding.rest.TestGetImpl"/>
<service name="TestGetImpl">
- <tuscany:binding.http uri="http://localhost:8085/httpget"/>
+ <tuscany:binding.rest uri="http://localhost:8085/httpget"/>
</service>
</component>
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/testCache.composite b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/testCache.composite
index 4923cfa74d..3401608c51 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/testCache.composite
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/testCache.composite
@@ -24,9 +24,9 @@
name="testCache">
<component name="HTTPBindingComponent">
- <implementation.java class="org.apache.tuscany.sca.binding.http.TestBindingCacheImpl"/>
+ <implementation.java class="org.apache.tuscany.sca.binding.rest.TestBindingCacheImpl"/>
<service name="TestBindingCacheImpl">
- <tuscany:binding.http uri="http://localhost:8085/httpbinding"/>
+ <tuscany:binding.rest uri="http://localhost:8085/httpbinding"/>
</service>
</component>
diff --git a/sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF
index b0a4fc01fc..b6dc4132f8 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF
+++ b/sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF
@@ -1,7 +1,6 @@
Manifest-Version: 1.0
-Export-Package: org.apache.tuscany.sca.binding.http;version="2.0.0";
- uses:="org.apache.tuscany.sca.assembly,javax.xml.namespace,javax.servlet.http"
-Bundle-Name: Apache Tuscany SCA HTTP Binding Model
+Export-Package: org.apache.tuscany.sca.binding.rest;version="2.0.0";uses:="org.apache.tuscany.sca.assembly,javax.xml.namespace,javax.servlet.http"
+Bundle-Name: Apache Tuscany SCA REST Binding Model
Bundle-Vendor: The Apache Software Foundation
Bundle-Version: 2.0.0
SCA-Version: 1.1
@@ -12,12 +11,12 @@ Import-Package: javax.servlet.http,
javax.xml.namespace,
javax.xml.stream,
org.apache.tuscany.sca.assembly;version="2.0.0",
- org.apache.tuscany.sca.binding.http;version="2.0.0",
+ org.apache.tuscany.sca.binding.rest;version="2.0.0",
org.apache.tuscany.sca.contribution.processor;version="2.0.0",
org.apache.tuscany.sca.contribution.resolver;version="2.0.0",
org.apache.tuscany.sca.core;version="2.0.0",
org.apache.tuscany.sca.monitor;version="2.0.0"
-Bundle-SymbolicName: org.apache.tuscany.sca.binding.http
+Bundle-SymbolicName: org.apache.tuscany.sca.binding.rest
Bundle-DocURL: http://www.apache.org/
Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBinding.java
index e0ab1cfff7..01dafc80a6 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBinding.java
@@ -17,17 +17,17 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Binding;
/**
- * HTTP binding model.
+ * REST binding model.
*
* @version $Rev$ $Date$
*/
-public interface HTTPBinding extends Binding {
- QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.http");
+public interface RESTBinding extends Binding {
+ QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.rest");
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBindingFactory.java
index 6ba6d8f934..38d68d532a 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBindingFactory.java
@@ -17,19 +17,20 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
+
/**
- * Factory for the HTTP binding model.
+ * Factory for the REST binding model.
*
* @version $Rev$ $Date$
*/
-public interface HTTPBindingFactory {
+public interface RESTBindingFactory {
/**
- * Creates a new HTTP binding.
- * @return a new HTTP binding
+ * Creates a new REST binding.
+ * @return a new REST binding
*/
- HTTPBinding createHTTPBinding();
+ RESTBinding createRESTBinding();
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTCacheContext.java
index 372118fbf2..a6acbaf48e 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTCacheContext.java
@@ -17,13 +17,14 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http;
+package org.apache.tuscany.sca.binding.rest;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
+
/**
* A class to store cache settings for Atom and HTTP requests and responses.
*
@@ -36,7 +37,7 @@ import javax.servlet.http.HttpServletRequest;
* If-Modified-Since, If-Unmodified-Since, If-Range.
*/
-public class HTTPCacheContext {
+public class RESTCacheContext {
public static final SimpleDateFormat RFC822DateFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z" ); // RFC 822 date time
public boolean enabled;
@@ -211,8 +212,8 @@ public class HTTPCacheContext {
* @param request
* @return
*/
- public static HTTPCacheContext getCacheContextFromRequest( HttpServletRequest request ) throws java.text.ParseException {
- HTTPCacheContext context = new HTTPCacheContext();
+ public static RESTCacheContext getCacheContextFromRequest( HttpServletRequest request ) throws java.text.ParseException {
+ RESTCacheContext context = new RESTCacheContext();
String eTag = request.getHeader( "If-Match" );
if ( eTag != null ) {
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingFactoryImpl.java
index 678cd1a426..00d5584190 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingFactoryImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingFactoryImpl.java
@@ -17,20 +17,20 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.impl;
+package org.apache.tuscany.sca.binding.rest.impl;
-import org.apache.tuscany.sca.binding.http.HTTPBinding;
-import org.apache.tuscany.sca.binding.http.HTTPBindingFactory;
+import org.apache.tuscany.sca.binding.rest.RESTBinding;
+import org.apache.tuscany.sca.binding.rest.RESTBindingFactory;
/**
- * Factory for the HTTP binding model.
+ * Factory for the REST binding model.
*
* @version $Rev$ $Date$
*/
-public class HTTPBindingFactoryImpl implements HTTPBindingFactory {
+public class RESTBindingFactoryImpl implements RESTBindingFactory {
- public HTTPBinding createHTTPBinding() {
- return new HTTPBindingImpl();
+ public RESTBinding createRESTBinding() {
+ return new RESTBindingImpl();
}
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingImpl.java
index 2555799f5f..887d0d9878 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingImpl.java
@@ -17,13 +17,13 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.impl;
+package org.apache.tuscany.sca.binding.rest.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.http.HTTPBinding;
+import org.apache.tuscany.sca.binding.rest.RESTBinding;
/**
@@ -31,7 +31,7 @@ import org.apache.tuscany.sca.binding.http.HTTPBinding;
*
* @version $Rev$ $Date$
*/
-class HTTPBindingImpl implements HTTPBinding {
+class RESTBindingImpl implements RESTBinding {
private String name;
private String uri;
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
index bdec50bde0..304e778bce 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.xml;
+package org.apache.tuscany.sca.binding.rest.xml;
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
@@ -29,8 +29,8 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.OperationSelector;
import org.apache.tuscany.sca.assembly.WireFormat;
-import org.apache.tuscany.sca.binding.http.HTTPBinding;
-import org.apache.tuscany.sca.binding.http.HTTPBindingFactory;
+import org.apache.tuscany.sca.binding.rest.RESTBinding;
+import org.apache.tuscany.sca.binding.rest.RESTBindingFactory;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
@@ -42,34 +42,34 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<HTTPBinding> {
+public class RESTBindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<RESTBinding> {
private static final String NAME = "name";
private static final String URI = "uri";
- private HTTPBindingFactory httpBindingFactory;
+ private RESTBindingFactory httpBindingFactory;
private StAXArtifactProcessor<Object> extensionProcessor;
private StAXAttributeProcessor<Object> extensionAttributeProcessor;
- public HTTPBindingProcessor(ExtensionPointRegistry extensionPoints,
+ public RESTBindingProcessor(ExtensionPointRegistry extensionPoints,
StAXArtifactProcessor extensionProcessor,
StAXAttributeProcessor extensionAttributeProcessor) {
FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
- this.httpBindingFactory = modelFactories.getFactory(HTTPBindingFactory.class);
+ this.httpBindingFactory = modelFactories.getFactory(RESTBindingFactory.class);
this.extensionProcessor = (StAXArtifactProcessor<Object>)extensionProcessor;
this.extensionAttributeProcessor = extensionAttributeProcessor;
}
public QName getArtifactType() {
- return HTTPBinding.TYPE;
+ return RESTBinding.TYPE;
}
- public Class<HTTPBinding> getModelType() {
- return HTTPBinding.class;
+ public Class<RESTBinding> getModelType() {
+ return RESTBinding.class;
}
- public HTTPBinding read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException {
- HTTPBinding httpBinding = httpBindingFactory.createHTTPBinding();
+ public RESTBinding read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException {
+ RESTBinding httpBinding = httpBindingFactory.createRESTBinding();
while(reader.hasNext()) {
QName elementName = null;
@@ -78,7 +78,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S
case START_ELEMENT:
elementName = reader.getName();
- if (HTTPBinding.TYPE.equals(elementName)) {
+ if (RESTBinding.TYPE.equals(elementName)) {
String name = getString(reader, NAME);
if(name != null) {
httpBinding.setName(name);
@@ -101,7 +101,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S
}
}
- if (event == END_ELEMENT && HTTPBinding.TYPE.equals(reader.getName())) {
+ if (event == END_ELEMENT && RESTBinding.TYPE.equals(reader.getName())) {
break;
}
@@ -114,10 +114,10 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S
return httpBinding;
}
- public void write(HTTPBinding httpBinding, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException {
+ public void write(RESTBinding httpBinding, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException {
//writer.writeStartElement(Constants.SCA10_NS, BINDING_HTTP);
- writeStart(writer, HTTPBinding.TYPE.getNamespaceURI(), HTTPBinding.TYPE.getLocalPart());
+ writeStart(writer, RESTBinding.TYPE.getNamespaceURI(), RESTBinding.TYPE.getLocalPart());
// Write binding name
if (httpBinding.getName() != null) {
@@ -134,7 +134,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S
}
- public void resolve(HTTPBinding model, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
+ public void resolve(RESTBinding model, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
// Should not need to do anything here for now...
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory b/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.rest.RESTBindingFactory
index 3ca68b969b..e228ebc528 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.http.HTTPBindingFactory
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.rest.RESTBindingFactory
@@ -16,5 +16,5 @@
# under the License.
# Implementation class for model factory
-org.apache.tuscany.sca.binding.http.impl.HTTPBindingFactoryImpl
+org.apache.tuscany.sca.binding.rest.impl.RESTBindingFactoryImpl
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
index f8c0fd2b64..ebed9ac75b 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -16,4 +16,4 @@
# under the License.
# Implementation class for the artifact processor extension
-org.apache.tuscany.sca.binding.http.xml.HTTPBindingProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.http,model=org.apache.tuscany.sca.binding.http.HTTPBinding,factory=org.apache.tuscany.sca.binding.http.HTTPBindingFactory
+org.apache.tuscany.sca.binding.rest.xml.RESTBindingProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.rest,model=org.apache.tuscany.sca.binding.rest.RESTBinding,factory=org.apache.tuscany.sca.binding.rest.RESTBindingFactory