diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-12 23:45:39 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-12 23:45:39 +0000 |
commit | 9b83ee182114c288675c2249da652df93a105dfe (patch) | |
tree | ad1bf20ac7c1133b383d960dad3d17362b4d5184 /java/sca/modules/implementation-web/src/main | |
parent | d3937102e3ee45a413aaf1f3aa19020d23d8b721 (diff) |
Add PolicyBuilder to the builder extension point
Use QName as the key to index and look up builders
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@824540 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/implementation-web/src/main')
4 files changed, 9 insertions, 7 deletions
diff --git a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java index 258ca32676..29c497485f 100644 --- a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java +++ b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java @@ -18,6 +18,8 @@ */ package org.apache.tuscany.sca.implementation.web; +import javax.xml.namespace.QName; + import org.apache.tuscany.sca.assembly.Implementation; @@ -26,7 +28,8 @@ import org.apache.tuscany.sca.assembly.Implementation; * The model representing an Web implementation in an SCA assembly model. */ public interface WebImplementation extends Implementation { - + QName TYPE = new QName(SCA11_NS, "implementation.web"); + /** * Returns the webapp URI. * @return the webapp URI diff --git a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationBuilder.java b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationBuilder.java index 2c95337766..540b2f77b9 100644 --- a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationBuilder.java +++ b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationBuilder.java @@ -19,6 +19,8 @@ package org.apache.tuscany.sca.implementation.web.impl; +import javax.xml.namespace.QName; + import org.apache.tuscany.sca.assembly.Component; import org.apache.tuscany.sca.assembly.builder.ImplementationBuilder; import org.apache.tuscany.sca.implementation.web.WebImplementation; @@ -34,8 +36,8 @@ public class WebImplementationBuilder implements ImplementationBuilder<WebImplem } - public Class<WebImplementation> getModelType() { - return WebImplementation.class; + public QName getImplementationType() { + return WebImplementation.TYPE; } } diff --git a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java index 9453eabbab..dfdb5e4e43 100644 --- a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java +++ b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java @@ -22,8 +22,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import javax.xml.namespace.QName; - import org.apache.tuscany.sca.assembly.Component; import org.apache.tuscany.sca.assembly.ConstrainingType; import org.apache.tuscany.sca.assembly.Property; @@ -38,7 +36,6 @@ import org.apache.tuscany.sca.runtime.RuntimeComponent; * The model representing an Web implementation in an SCA assembly model. */ class WebImplementationImpl extends ImplementationImpl implements WebImplementation { - private static final QName TYPE = new QName(SCA11_NS, "implementation.web"); private List<Property> properties = new ArrayList<Property>(); private List<Reference> references = new ArrayList<Reference>(); diff --git a/java/sca/modules/implementation-web/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.ImplementationBuilder b/java/sca/modules/implementation-web/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.ImplementationBuilder index da2481a304..1290a86c99 100644 --- a/java/sca/modules/implementation-web/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.ImplementationBuilder +++ b/java/sca/modules/implementation-web/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.ImplementationBuilder @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-org.apache.tuscany.sca.implementation.web.impl.WebImplementationBuilder;model=org.apache.tuscany.sca.implementation.web.WebImplementation
+org.apache.tuscany.sca.implementation.web.impl.WebImplementationBuilder;qname=http://docs.oasis-open.org/ns/opencsa/sca/200903#implementation.web
|