|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor
org.apache.tuscany.sca.assembly.xml.CompositeProcessor
public class CompositeProcessor
A composite processor.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor |
|---|
BaseStAXArtifactProcessor.XAttr |
| Field Summary | |
|---|---|
protected AssemblyFactory |
assemblyFactory
|
protected ContributionFactory |
contributionFactory
|
protected StAXAttributeProcessor<java.lang.Object> |
extensionAttributeProcessor
|
protected StAXArtifactProcessor<java.lang.Object> |
extensionProcessor
|
protected IntentAttachPointTypeFactory |
intentAttachPointTypeFactory
|
protected PolicyFactory |
policyFactory
|
protected PolicyAttachPointProcessor |
policyProcessor
|
| Fields inherited from interface org.apache.tuscany.sca.assembly.xml.Constants |
|---|
APPLICABLE_POLICY_SETS, AUTOWIRE, BINDING_SCA, BINDING_SCA_QNAME, CALLBACK, CALLBACK_QNAME, COMPONENT, COMPONENT_QNAME, COMPONENT_TYPE, COMPONENT_TYPE_QNAME, COMPOSITE, COMPOSITE_QNAME, CONSTRAINING_TYPE, CONSTRAINING_TYPE_QNAME, ELEMENT, FILE, IMPLEMENTATION, IMPLEMENTATION_COMPOSITE, IMPLEMENTATION_COMPOSITE_QNAME, IMPLEMENTATION_QNAME, INCLUDE, INCLUDE_QNAME, LOCAL, MANY, MULTIPLICITY, MUST_SUPPLY, NAME, ONE_N, ONE_ONE, OPERATION, OPERATION_QNAME, POLICY_SETS, PROMOTE, PROPERTY, PROPERTY_QNAME, REFERENCE, REFERENCE_QNAME, REQUIRES, SCA10_NS, SCA10_TUSCANY_NS, SERVICE, SERVICE_QNAME, SOURCE, TARGET, TARGET_NAMESPACE, TYPE, URI, WIRE, WIRE_QNAME, WIRED_BY_IMPL, ZERO_N, ZERO_ONE |
| Constructor Summary | |
|---|---|
CompositeProcessor(ContributionFactory contributionFactory,
AssemblyFactory assemblyFactory,
PolicyFactory policyFactory,
StAXArtifactProcessor extensionProcessor,
StAXAttributeProcessor extensionAttributeProcessor,
Monitor monitor)
Construct a new composite processor |
|
CompositeProcessor(ExtensionPointRegistry extensionPoints,
StAXArtifactProcessor extensionProcessor,
StAXAttributeProcessor extensionAttributeProcessor,
Monitor monitor)
Construct a new composite processor |
|
| Method Summary | ||
|---|---|---|
protected void |
addInheritedIntents(java.util.List<Intent> sourceList,
java.util.List<Intent> targetList)
|
|
protected void |
addInheritedPolicySets(java.util.List<PolicySet> sourceList,
java.util.List<PolicySet> targetList)
|
|
protected void |
error(java.lang.String message,
java.lang.Object model,
java.lang.Exception ex)
Marshals exceptions into the monitor |
|
protected void |
error(java.lang.String message,
java.lang.Object model,
java.lang.Object... messageParameters)
Marshals errors into the monitor |
|
javax.xml.namespace.QName |
getArtifactType()
Returns the type of artifact handled by this artifact processor. |
|
java.lang.Class<Composite> |
getModelType()
Returns the type of model handled by this artifact processor. |
|
Composite |
read(javax.xml.stream.XMLStreamReader reader)
Reads a model from an XMLStreamReader. |
|
protected void |
readAbstractProperty(AbstractProperty property,
javax.xml.stream.XMLStreamReader reader)
Reads an abstract property element. |
|
protected ConstrainingType |
readConstrainingType(javax.xml.stream.XMLStreamReader reader)
Returns the value of a constrainingType attribute. |
|
protected void |
readExtendedAttributes(javax.xml.stream.XMLStreamReader reader,
javax.xml.namespace.QName elementName,
Extensible estensibleElement,
StAXAttributeProcessor extensionAttributeProcessor)
|
|
protected void |
readMultiplicity(AbstractReference reference,
javax.xml.stream.XMLStreamReader reader)
Read a multiplicity attribute. |
|
protected org.w3c.dom.Document |
readPropertyValue(javax.xml.namespace.QName element,
javax.xml.namespace.QName type,
javax.xml.stream.XMLStreamReader reader)
Read a property value into a DOM document. |
|
protected void |
readTargets(Reference reference,
javax.xml.stream.XMLStreamReader reader)
Read list of reference targets |
|
void |
resolve(Composite composite,
ModelResolver resolver)
Resolve references from this model to other models. |
|
protected
|
resolveAbstractContracts(java.util.List<C> contracts,
ModelResolver resolver)
Resolve interface and callback interface on a list of abstract contracts. |
|
protected
|
resolveContracts(Base parent,
java.util.List<C> contracts,
ModelResolver resolver)
Resolve interface, callback interface and bindings on a list of contracts. |
|
protected
|
resolveContracts(java.util.List<C> contracts,
ModelResolver resolver)
Resolve interface, callback interface and bindings on a list of contracts. |
|
protected Implementation |
resolveImplementation(Implementation implementation,
ModelResolver resolver)
Resolve an implementation. |
|
protected void |
resolveIntents(java.util.List<Intent> policyIntents,
ModelResolver resolver)
Resolve policy intents attached to a specific SCA Artifact |
|
protected void |
resolvePolicySets(java.util.List<PolicySet> policySets,
ModelResolver resolver)
Resolve policy sets attached to a specific SCA Construct |
|
protected void |
warning(java.lang.String message,
java.lang.Object model,
java.lang.String... messageParameters)
Marshals warnings into the monitor |
|
void |
write(Composite composite,
javax.xml.stream.XMLStreamWriter writer)
Writes a model to an XMLStreamWriter. |
|
protected BaseStAXArtifactProcessor.XAttr |
writeConstrainingType(ComponentType componentType)
Returns a constrainingType attribute. |
|
protected void |
writeExtendedAttributes(javax.xml.stream.XMLStreamWriter writer,
Extensible extensibleElement,
StAXAttributeProcessor extensionAttributeProcessor)
|
|
protected BaseStAXArtifactProcessor.XAttr |
writeMultiplicity(AbstractReference reference)
|
|
protected void |
writePropertyValue(java.lang.Object propertyValue,
javax.xml.namespace.QName element,
javax.xml.namespace.QName type,
javax.xml.stream.XMLStreamWriter writer)
Write the value of a property |
|
protected void |
writeStart(javax.xml.stream.XMLStreamWriter writer,
java.lang.String name,
BaseStAXArtifactProcessor.XAttr... attrs)
Start an element. |
|
protected void |
writeStartDocument(javax.xml.stream.XMLStreamWriter writer,
java.lang.String name,
BaseStAXArtifactProcessor.XAttr... attrs)
Start a document. |
|
protected BaseStAXArtifactProcessor.XAttr |
writeTargets(Reference reference)
Write a list of targets into an attribute |
|
| Methods inherited from class org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor |
|---|
getBoolean, getQName, getQNames, getQNameValue, getString, getXSIType, isSet, nextChildElement, skipToEndElement, writeAttributePrefixes, writeAttributes, writeEnd, writeEndDocument, writeStart, writeStart, writeStartDocument, writeStartDocument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected StAXAttributeProcessor<java.lang.Object> extensionAttributeProcessor
protected ContributionFactory contributionFactory
protected AssemblyFactory assemblyFactory
protected PolicyFactory policyFactory
protected StAXArtifactProcessor<java.lang.Object> extensionProcessor
protected PolicyAttachPointProcessor policyProcessor
protected IntentAttachPointTypeFactory intentAttachPointTypeFactory
| Constructor Detail |
|---|
public CompositeProcessor(ExtensionPointRegistry extensionPoints,
StAXArtifactProcessor extensionProcessor,
StAXAttributeProcessor extensionAttributeProcessor,
Monitor monitor)
extensionPoints - extensionProcessor -
public CompositeProcessor(ContributionFactory contributionFactory,
AssemblyFactory assemblyFactory,
PolicyFactory policyFactory,
StAXArtifactProcessor extensionProcessor,
StAXAttributeProcessor extensionAttributeProcessor,
Monitor monitor)
contributionFactory - assemblyFactory - policyFactory - extensionProcessor - | Method Detail |
|---|
public Composite read(javax.xml.stream.XMLStreamReader reader)
throws ContributionReadException
StAXArtifactProcessor
read in interface StAXArtifactProcessor<Composite>reader - The XMLStreamReader
ContributionReadException
public void write(Composite composite,
javax.xml.stream.XMLStreamWriter writer)
throws ContributionWriteException,
javax.xml.stream.XMLStreamException
StAXArtifactProcessor
write in interface StAXArtifactProcessor<Composite>composite - A model representing the sourcewriter - The XML stream writer
ContributionWriteException
javax.xml.stream.XMLStreamException
public void resolve(Composite composite,
ModelResolver resolver)
throws ContributionResolveException
ArtifactProcessor
resolve in interface ArtifactProcessor<Composite>composite - The model to resolveresolver - The resolver to use to resolve referenced models
ContributionResolveExceptionpublic javax.xml.namespace.QName getArtifactType()
StAXArtifactProcessor
getArtifactType in interface StAXArtifactProcessor<Composite>public java.lang.Class<Composite> getModelType()
ArtifactProcessor
getModelType in interface ArtifactProcessor<Composite>
protected void warning(java.lang.String message,
java.lang.Object model,
java.lang.String... messageParameters)
message - model - messageParameters -
protected void error(java.lang.String message,
java.lang.Object model,
java.lang.Object... messageParameters)
problems - message - model -
protected void error(java.lang.String message,
java.lang.Object model,
java.lang.Exception ex)
problems - message - model -
protected void writeStart(javax.xml.stream.XMLStreamWriter writer,
java.lang.String name,
BaseStAXArtifactProcessor.XAttr... attrs)
throws javax.xml.stream.XMLStreamException
writer - name - attrs -
javax.xml.stream.XMLStreamException
protected void writeStartDocument(javax.xml.stream.XMLStreamWriter writer,
java.lang.String name,
BaseStAXArtifactProcessor.XAttr... attrs)
throws javax.xml.stream.XMLStreamException
writer -
javax.xml.stream.XMLStreamException
protected void readTargets(Reference reference,
javax.xml.stream.XMLStreamReader reader)
reference - reader - protected BaseStAXArtifactProcessor.XAttr writeTargets(Reference reference)
reference -
protected void readMultiplicity(AbstractReference reference,
javax.xml.stream.XMLStreamReader reader)
reference - reader - protected BaseStAXArtifactProcessor.XAttr writeMultiplicity(AbstractReference reference)
protected ConstrainingType readConstrainingType(javax.xml.stream.XMLStreamReader reader)
reader -
protected void readAbstractProperty(AbstractProperty property,
javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException,
ContributionReadException
property - reader -
javax.xml.stream.XMLStreamException
ContributionReadException
protected Implementation resolveImplementation(Implementation implementation,
ModelResolver resolver)
throws ContributionResolveException,
PolicyValidationException
implementation - resolver -
ContributionResolveException
PolicyValidationException
protected <C extends Contract> void resolveContracts(java.util.List<C> contracts,
ModelResolver resolver)
throws ContributionResolveException
contracts - the list of contractsresolver - the resolver to use to resolve models
ContributionResolveException
protected <C extends Contract> void resolveContracts(Base parent,
java.util.List<C> contracts,
ModelResolver resolver)
throws ContributionResolveException
parent - element for the contractscontracts - the list of contractsresolver - the resolver to use to resolve models
ContributionResolveException
protected <C extends AbstractContract> void resolveAbstractContracts(java.util.List<C> contracts,
ModelResolver resolver)
throws ContributionResolveException
contracts - the list of contractsresolver - the resolver to use to resolve models
ContributionResolveExceptionprotected BaseStAXArtifactProcessor.XAttr writeConstrainingType(ComponentType componentType)
componentType -
protected org.w3c.dom.Document readPropertyValue(javax.xml.namespace.QName element,
javax.xml.namespace.QName type,
javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException,
ContributionReadException
element - type - reader -
javax.xml.stream.XMLStreamException
ContributionReadException
javax.xml.parsers.ParserConfigurationException
protected void resolveIntents(java.util.List<Intent> policyIntents,
ModelResolver resolver)
policyIntents - list of policy intentsresolver -
protected void resolvePolicySets(java.util.List<PolicySet> policySets,
ModelResolver resolver)
policySets - list of attached policy setsresolver -
protected void writePropertyValue(java.lang.Object propertyValue,
javax.xml.namespace.QName element,
javax.xml.namespace.QName type,
javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
document - element - type - writer -
javax.xml.stream.XMLStreamException
protected void addInheritedIntents(java.util.List<Intent> sourceList,
java.util.List<Intent> targetList)
protected void addInheritedPolicySets(java.util.List<PolicySet> sourceList,
java.util.List<PolicySet> targetList)
protected void readExtendedAttributes(javax.xml.stream.XMLStreamReader reader,
javax.xml.namespace.QName elementName,
Extensible estensibleElement,
StAXAttributeProcessor extensionAttributeProcessor)
throws ContributionReadException,
javax.xml.stream.XMLStreamException
reader - elementName - estensibleElement - extensionAttributeProcessor -
ContributionReadException
javax.xml.stream.XMLStreamException
protected void writeExtendedAttributes(javax.xml.stream.XMLStreamWriter writer,
Extensible extensibleElement,
StAXAttributeProcessor extensionAttributeProcessor)
throws ContributionWriteException,
javax.xml.stream.XMLStreamException
attributeModel - writer - extensibleElement - extensionAttributeProcessor -
ContributionWriteException
javax.xml.stream.XMLStreamException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||