summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-12-02 18:54:11 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-12-02 18:54:11 +0000
commitb1d4403a01208732e1815fa40fd93a498ab86bca (patch)
treedf06eda65e162da73980447fdce62519054ae45f /java/sca
parenta357bcb17e4262a5e731f52504b42a29cf9fad3d (diff)
Remove references to Constants from assembly-xml
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@722565 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationConstants.java9
-rw-r--r--java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java13
2 files changed, 12 insertions, 10 deletions
diff --git a/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationConstants.java b/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationConstants.java
index ecbf0c4c78..eae7b64267 100644
--- a/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationConstants.java
+++ b/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationConstants.java
@@ -20,17 +20,16 @@ package org.apache.tuscany.sca.implementation.java.xml;
import javax.xml.namespace.QName;
-import org.apache.tuscany.sca.assembly.xml.Constants;
-
/**
* Constants for the Java Implementation.
*
* @version $Rev$ $Date$
*/
public interface JavaImplementationConstants {
-
+ String SCA10_NS = "http://www.osoa.org/xmlns/sca/1.0";
String IMPLEMENTATION_JAVA = "implementation.java";
- QName IMPLEMENTATION_JAVA_QNAME = new QName(Constants.SCA10_NS, "implementation.java");
+ QName IMPLEMENTATION_JAVA_QNAME = new QName(SCA10_NS, "implementation.java");
String CLASS = "class";
-
+ String OPERATION = "operation";
+ QName OPERATION_QNAME = new QName(SCA10_NS, OPERATION);
}
diff --git a/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java b/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
index f26395cbc1..6e6ef7b387 100644
--- a/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
+++ b/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
@@ -21,6 +21,11 @@ package org.apache.tuscany.sca.implementation.java.xml;
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+import static org.apache.tuscany.sca.implementation.java.xml.JavaImplementationConstants.CLASS;
+import static org.apache.tuscany.sca.implementation.java.xml.JavaImplementationConstants.IMPLEMENTATION_JAVA;
+import static org.apache.tuscany.sca.implementation.java.xml.JavaImplementationConstants.IMPLEMENTATION_JAVA_QNAME;
+import static org.apache.tuscany.sca.implementation.java.xml.JavaImplementationConstants.OPERATION_QNAME;
+import static org.apache.tuscany.sca.implementation.java.xml.JavaImplementationConstants.SCA10_NS;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -41,7 +46,6 @@ 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.xml.ConfiguredOperationProcessor;
-import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
@@ -67,8 +71,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
*
* @version $Rev$ $Date$
*/
-public class JavaImplementationProcessor implements StAXArtifactProcessor<JavaImplementation>,
- JavaImplementationConstants {
+public class JavaImplementationProcessor implements StAXArtifactProcessor<JavaImplementation> {
private JavaImplementationFactory javaFactory;
private AssemblyFactory assemblyFactory;
@@ -141,7 +144,7 @@ public class JavaImplementationProcessor implements StAXArtifactProcessor<JavaIm
event = reader.next();
switch ( event ) {
case START_ELEMENT : {
- if ( Constants.OPERATION_QNAME.equals(reader.getName()) ) {
+ if ( OPERATION_QNAME.equals(reader.getName()) ) {
confOp = configuredOperationProcessor.read(reader);
if ( confOp != null ) {
((OperationsConfigurator)javaImplementation).getConfiguredOperations().add(confOp);
@@ -163,7 +166,7 @@ public class JavaImplementationProcessor implements StAXArtifactProcessor<JavaIm
// Write an <implementation.java>
policyProcessor.writePolicyPrefixes(javaImplementation, writer);
- writer.writeStartElement(Constants.SCA10_NS, IMPLEMENTATION_JAVA);
+ writer.writeStartElement(SCA10_NS, IMPLEMENTATION_JAVA);
policyProcessor.writePolicyAttributes(javaImplementation, writer);
if (javaImplementation.getName() != null) {