From 3a8a64103bcc4891fb1a1f4cc4538f9d5b62a7ba Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 20 Feb 2009 20:10:37 +0000 Subject: Start to implement the SCA policy framework 1.1 spec draft from OASIS OpenCSA git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@746356 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/xml/JavaImplementationProcessor.java | 37 +--- .../sca/implementation/java/xml/ReadTestCase.java | 26 +-- .../sca/implementation/java/xml/definitions.xml | 2 +- .../java/xml/definitions_with_policysets.xml | 188 +++++++++------------ 4 files changed, 108 insertions(+), 145 deletions(-) (limited to 'java/sca/modules/implementation-java-xml/src') 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 143bb094a3..1745e10894 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 @@ -20,11 +20,9 @@ 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; @@ -40,13 +38,10 @@ import javax.xml.stream.XMLStreamWriter; import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.ComponentType; -import org.apache.tuscany.sca.assembly.ConfiguredOperation; -import org.apache.tuscany.sca.assembly.OperationsConfigurator; 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.PolicyAttachPointProcessor; +import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; @@ -64,7 +59,6 @@ import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory; import org.apache.tuscany.sca.policy.PolicyFactory; /** @@ -76,19 +70,17 @@ public class JavaImplementationProcessor implements StAXArtifactProcessor JavaImplementation javaImplementation = javaFactory.createJavaImplementation(); - /*if ( javaImplementation instanceof PolicySetAttachPoint ) { - IntentAttachPointType implType = intentAttachPointTypeFactory.createImplementationType(); + /*if ( javaImplementation instanceof PolicySubject ) { + ExtensionType implType = intentAttachPointTypeFactory.createImplementationType(); implType.setName(getArtifactType()); implType.setUnresolved(true); - ((PolicySetAttachPoint)javaImplementation).setType(implType); + ((PolicySubject)javaImplementation).setType(implType); }*/ javaImplementation.setUnresolved(true); @@ -139,21 +131,8 @@ public class JavaImplementationProcessor implements StAXArtifactProcessor + xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712"> - + - - - - Sample Intent + + + + Sample Intent - - - - - Sample Intent + + + + + + + Sample Intent - - - - - Sample Intent + + + + + + Sample Intent - - - - - Sample Intent + + + + + Sample Intent - - - - - Sample Intent + + + + + Sample Intent - - - - - Sample Intent + + + + + Sample Intent - - - - - Sample Intent + + + + + + + + + Sample Intent - - - - - Sample Intent + + + + + Sample Intent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3