From 552092eea00b26ec67531604a512f2954147ae45 Mon Sep 17 00:00:00 2001 From: antelder Date: Tue, 9 Aug 2011 08:17:50 +0000 Subject: Add an attribute to the REST binding for Cross-Origin Resource Sharing support. Just the minimal getter method for now to show how it can work git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1155251 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/tuscany/sca/binding/rest/RESTBinding.java | 2 ++ .../org/apache/tuscany/sca/binding/rest/impl/RESTBindingImpl.java | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache') diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBinding.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBinding.java index dd01c37537..5917d1f63e 100644 --- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBinding.java +++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/RESTBinding.java @@ -35,4 +35,6 @@ public interface RESTBinding extends Binding { QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.rest"); public List getHttpHeaders(); + + public boolean isCORS(); } diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingImpl.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingImpl.java index 93b59de5a4..132d7227e7 100644 --- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingImpl.java +++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/impl/RESTBindingImpl.java @@ -108,4 +108,8 @@ class RESTBindingImpl implements RESTBinding { public Object clone() throws CloneNotSupportedException { return super.clone(); } + + public boolean isCORS() { + return true; + } } -- cgit v1.2.3