diff options
Diffstat (limited to '')
8 files changed, 43 insertions, 30 deletions
diff --git a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java index e7aa06755b..2c32575098 100644 --- a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java +++ b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java @@ -98,6 +98,7 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor implement protected ExtensionFactory extensionFactory; protected PolicyFactory policyFactory; protected StAXArtifactProcessor<Object> extensionProcessor; + protected StAXAttributeProcessor<Object> extensionAttributeProcessor; protected PolicyAttachPointProcessor policyProcessor; private DocumentBuilderFactory documentBuilderFactory; protected IntentAttachPointTypeFactory intentAttachPointTypeFactory; @@ -115,11 +116,13 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor implement ExtensionFactory extensionFactory, PolicyFactory policyFactory, StAXArtifactProcessor extensionProcessor, + StAXAttributeProcessor extensionAttributeProcessor, Monitor monitor) { this.assemblyFactory = assemblyFactory; this.extensionFactory = extensionFactory; this.policyFactory = policyFactory; this.extensionProcessor = (StAXArtifactProcessor<Object>)extensionProcessor; + this.extensionAttributeProcessor = extensionAttributeProcessor; this.contributionFactory = contribFactory; this.policyProcessor = new PolicyAttachPointProcessor(policyFactory); this.intentAttachPointTypeFactory = new IntentAttachPointTypeFactoryImpl(); @@ -136,11 +139,13 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor implement ExtensionFactory extensionFactory, PolicyFactory policyFactory, StAXArtifactProcessor extensionProcessor, + StAXAttributeProcessor extensionAttributeProcessor, Monitor monitor) { this.assemblyFactory = assemblyFactory; this.extensionFactory = extensionFactory; this.policyFactory = policyFactory; this.extensionProcessor = (StAXArtifactProcessor<Object>)extensionProcessor; + this.extensionAttributeProcessor = extensionAttributeProcessor; this.policyProcessor = new PolicyAttachPointProcessor(policyFactory); this.monitor = monitor; } @@ -862,16 +867,16 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor implement } + /** * * @param reader - * @param elementName * @param estensibleElement - * @param extensionAttributeProcessor * @throws ContributionReadException * @throws XMLStreamException */ - protected void readExtendedAttributes(XMLStreamReader reader, QName elementName, Extensible estensibleElement, StAXAttributeProcessor extensionAttributeProcessor) throws ContributionReadException, XMLStreamException { + protected void readExtendedAttributes(XMLStreamReader reader, Extensible estensibleElement) throws ContributionReadException, XMLStreamException { + QName elementName = reader.getName(); for (int a = 0; a < reader.getAttributeCount(); a++) { QName attributeName = reader.getAttributeName(a); if( attributeName.getNamespaceURI() != null && attributeName.getNamespaceURI().length() > 0) { @@ -892,7 +897,6 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor implement /** * - * @param attributeModel * @param writer * @param extensibleElement * @param extensionAttributeProcessor diff --git a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java index ec355e069e..6a4bc2ba23 100644 --- a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java +++ b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java @@ -56,7 +56,7 @@ public class ComponentTypeDocumentProcessor extends BaseAssemblyProcessor implem public ComponentTypeDocumentProcessor(StAXArtifactProcessor staxProcessor, XMLInputFactory inputFactory, Monitor monitor) { - super(null, null, null, staxProcessor, monitor); + super(null, null, null, staxProcessor, null, monitor); this.inputFactory = inputFactory; } @@ -68,7 +68,7 @@ public class ComponentTypeDocumentProcessor extends BaseAssemblyProcessor implem public ComponentTypeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor staxProcessor, Monitor monitor) { - super(null, null, null, staxProcessor, monitor); + super(null, null, null, staxProcessor, null, monitor); this.inputFactory = modelFactories.getFactory(ValidatingXMLInputFactory.class); } diff --git a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java index 7a95062ff0..c6cfd90bd4 100644 --- a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java +++ b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java @@ -69,8 +69,10 @@ public class ComponentTypeProcessor extends BaseAssemblyProcessor implements StA public ComponentTypeProcessor(AssemblyFactory factory, ExtensionFactory extensionFactory, PolicyFactory policyFactory, - StAXArtifactProcessor extensionProcessor, StAXAttributeProcessor extensionAttributeProcessor, Monitor monitor) { - super(factory, extensionFactory, policyFactory, extensionProcessor, monitor); + StAXArtifactProcessor extensionProcessor, + StAXAttributeProcessor extensionAttributeProcessor, + Monitor monitor) { + super(factory, extensionFactory, policyFactory, extensionProcessor, extensionAttributeProcessor, monitor); } /** @@ -87,6 +89,7 @@ public class ComponentTypeProcessor extends BaseAssemblyProcessor implements StA modelFactories.getFactory(ExtensionFactory.class), modelFactories.getFactory(PolicyFactory.class), extensionProcessor, + extensionAttributeProcessor, monitor); } diff --git a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java index 98564062d6..64f5bf7b99 100644 --- a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java +++ b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java @@ -66,8 +66,10 @@ public class CompositeDocumentProcessor extends BaseAssemblyProcessor implements * @param staxProcessor */ public CompositeDocumentProcessor(StAXArtifactProcessor staxProcessor, - XMLInputFactory inputFactory, List scaDefnsSink, Monitor monitor) { - super(null, null, null, staxProcessor, monitor); + XMLInputFactory inputFactory, + List scaDefnsSink, + Monitor monitor) { + super(null, null, null, staxProcessor, null, monitor); this.inputFactory = inputFactory; this.scaDefnSink = scaDefnsSink; } @@ -78,8 +80,9 @@ public class CompositeDocumentProcessor extends BaseAssemblyProcessor implements * @param staxProcessor */ public CompositeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, - StAXArtifactProcessor staxProcessor, Monitor monitor) { - super(null, null, null, staxProcessor, monitor); + StAXArtifactProcessor staxProcessor, + Monitor monitor) { + super(null, null, null, staxProcessor, null, monitor); this.inputFactory = modelFactories.getFactory(ValidatingXMLInputFactory.class); } diff --git a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java index fa45585640..36ac771c66 100644 --- a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java +++ b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java @@ -90,8 +90,6 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt // FIXME: to be refactored private XPathFactory xPathFactory = XPathFactory.newInstance(); - protected StAXAttributeProcessor<Object> extensionAttributeProcessor; - /** * Construct a new composite processor * @@ -128,6 +126,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt modelFactories.getFactory(ExtensionFactory.class), modelFactories.getFactory(PolicyFactory.class), extensionProcessor, + extensionAttributeProcessor, monitor); this.extensionAttributeProcessor = extensionAttributeProcessor; @@ -149,7 +148,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt StAXArtifactProcessor extensionProcessor, StAXAttributeProcessor extensionAttributeProcessor, Monitor monitor) { - super(contributionFactory, assemblyFactory, extensionFactory, policyFactory, extensionProcessor, monitor); + super(contributionFactory, assemblyFactory, extensionFactory, policyFactory, extensionProcessor, extensionAttributeProcessor, monitor); } public Composite read(XMLStreamReader reader) throws ContributionReadException { @@ -192,7 +191,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt } //handle extension attributes - this.readExtendedAttributes(reader, name, composite, extensionAttributeProcessor); + this.readExtendedAttributes(reader, composite); composite.setLocal(getBoolean(reader, LOCAL)); composite.setConstrainingType(readConstrainingType(reader)); @@ -216,7 +215,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt componentService.setName(getString(reader, NAME)); //handle extension attributes - this.readExtendedAttributes(reader, name, componentService, extensionAttributeProcessor); + this.readExtendedAttributes(reader, componentService); component.getServices().add(componentService); policyProcessor.readPolicies(contract, reader); @@ -252,7 +251,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt } //handle extension attributes - this.readExtendedAttributes(reader, name, compositeService, extensionAttributeProcessor); + this.readExtendedAttributes(reader, compositeService); composite.getServices().add(compositeService); policyProcessor.readPolicies(contract, reader); @@ -272,7 +271,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt componentReference.setWiredByImpl(getBoolean(reader, WIRED_BY_IMPL)); //handle extension attributes - this.readExtendedAttributes(reader, name, componentReference, extensionAttributeProcessor); + this.readExtendedAttributes(reader, componentReference); component.getReferences().add(componentReference); policyProcessor.readPolicies(contract, reader); @@ -296,7 +295,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt compositeReference.setWiredByImpl(getBoolean(reader, WIRED_BY_IMPL)); //handle extension attributes - this.readExtendedAttributes(reader, name, compositeReference, extensionAttributeProcessor); + this.readExtendedAttributes(reader, compositeReference); composite.getReferences().add(compositeReference); policyProcessor.readPolicies(contract, reader); @@ -340,7 +339,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt componentProperty.setFile(getString(reader, FILE)); //handle extension attributes - this.readExtendedAttributes(reader, name, componentProperty, extensionAttributeProcessor); + this.readExtendedAttributes(reader, componentProperty); policyProcessor.readPolicies(property, reader); readAbstractProperty(componentProperty, reader); @@ -384,7 +383,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt } //handle extension attributes - this.readExtendedAttributes(reader, name, component, extensionAttributeProcessor); + this.readExtendedAttributes(reader, component); component.setConstrainingType(readConstrainingType(reader)); composite.getComponents().add(component); @@ -405,7 +404,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt wire.setTarget(target); //handle extension attributes - this.readExtendedAttributes(reader, name, wire, extensionAttributeProcessor); + this.readExtendedAttributes(reader, wire); composite.getWires().add(wire); policyProcessor.readPolicies(wire, reader); @@ -417,7 +416,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt contract.setCallback(callback); //handle extension attributes - this.readExtendedAttributes(reader, name, callback, extensionAttributeProcessor); + this.readExtendedAttributes(reader, callback); policyProcessor.readPolicies(callback, reader); @@ -453,7 +452,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt implementation.setUnresolved(true); //handle extension attributes - this.readExtendedAttributes(reader, name, implementation, extensionAttributeProcessor); + this.readExtendedAttributes(reader, implementation); component.setImplementation(implementation); policyProcessor.readPolicies(implementation, reader); diff --git a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java index 546679ddc1..8a6090b441 100644 --- a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java +++ b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java @@ -56,7 +56,7 @@ public class ConstrainingTypeDocumentProcessor extends BaseAssemblyProcessor imp public ConstrainingTypeDocumentProcessor(StAXArtifactProcessor staxProcessor, XMLInputFactory inputFactory, Monitor monitor) { - super(null, null, null, staxProcessor, monitor); + super(null, null, null, staxProcessor, null, monitor); this.inputFactory = inputFactory; } @@ -68,7 +68,7 @@ public class ConstrainingTypeDocumentProcessor extends BaseAssemblyProcessor imp public ConstrainingTypeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor staxProcessor, Monitor monitor) { - super(null, null, null, staxProcessor, monitor); + super(null, null, null, staxProcessor, null, monitor); this.inputFactory = modelFactories.getFactory(ValidatingXMLInputFactory.class); } diff --git a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java index 21742a7d9c..1108cd32e0 100644 --- a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java +++ b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java @@ -36,6 +36,7 @@ import org.apache.tuscany.sca.assembly.ConstrainingType; import org.apache.tuscany.sca.assembly.ExtensionFactory; import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; +import org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.contribution.service.ContributionReadException; import org.apache.tuscany.sca.contribution.service.ContributionResolveException; @@ -63,9 +64,10 @@ public class ConstrainingTypeProcessor extends BaseAssemblyProcessor implements public ConstrainingTypeProcessor(AssemblyFactory assemblyFactory, ExtensionFactory extensionFactory, PolicyFactory policyFactory, - StAXArtifactProcessor extensionProcessor, + StAXArtifactProcessor extensionProcessor, + StAXAttributeProcessor extensionAttributeProcessor, Monitor monitor) { - super(assemblyFactory, extensionFactory, policyFactory, extensionProcessor, monitor); + super(assemblyFactory, extensionFactory, policyFactory, extensionProcessor, extensionAttributeProcessor, monitor); } /** @@ -76,11 +78,13 @@ public class ConstrainingTypeProcessor extends BaseAssemblyProcessor implements */ public ConstrainingTypeProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor extensionProcessor, + StAXAttributeProcessor extensionAttributeProcessor, Monitor monitor) { super(modelFactories.getFactory(AssemblyFactory.class), modelFactories.getFactory(ExtensionFactory.class), modelFactories.getFactory(PolicyFactory.class), extensionProcessor, + extensionAttributeProcessor, monitor); } diff --git a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java index 34878a9f53..9c9dfd7114 100644 --- a/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java +++ b/branches/sca-java-1.3.3/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java @@ -67,7 +67,7 @@ public class DefaultBeanModelProcessor extends BaseAssemblyProcessor implements Class<Implementation> modelClass, Object modelFactory, Monitor monitor) { - super(assemblyFactory, extensionFactory, policyFactory, null, monitor); + super(assemblyFactory, extensionFactory, policyFactory, null, null, monitor); this.artifactType = artifactType; this.modelClass = modelClass; this.modelFactory = modelFactory; |