org.apache.tuscany.sca.workspace.processor.impl
Class ContributionContentProcessor

java.lang.Object
  extended by org.apache.tuscany.sca.workspace.processor.impl.ContributionContentProcessor
All Implemented Interfaces:
ArtifactProcessor<Contribution>, URLArtifactProcessor<Contribution>

public class ContributionContentProcessor
extends java.lang.Object
implements URLArtifactProcessor<Contribution>

URLArtifactProcessor that handles contribution files and the artifacts they contain and returns a contribution model.


Constructor Summary
ContributionContentProcessor(ExtensionPointRegistry extensionPoints, StAXArtifactProcessor<java.lang.Object> extensionProcessor, Monitor monitor)
           
ContributionContentProcessor(ModelFactoryExtensionPoint modelFactories, ModelResolverExtensionPoint modelResolvers, URLArtifactProcessor<java.lang.Object> artifactProcessor, StAXArtifactProcessor<java.lang.Object> extensionProcessor, Monitor monitor)
           
 
Method Summary
 java.lang.String getArtifactType()
          Returns the type of artifact handled by this artifact processor.
 java.lang.Class<Contribution> getModelType()
          Returns the type of model handled by this artifact processor.
 Contribution read(java.net.URL parentURL, java.net.URI contributionURI, java.net.URL contributionURL)
          Reads a model from a URL.
 void resolve(Contribution contribution, ModelResolver resolver)
          Resolve references from this model to other models.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContributionContentProcessor

public ContributionContentProcessor(ExtensionPointRegistry extensionPoints,
                                    StAXArtifactProcessor<java.lang.Object> extensionProcessor,
                                    Monitor monitor)

ContributionContentProcessor

public ContributionContentProcessor(ModelFactoryExtensionPoint modelFactories,
                                    ModelResolverExtensionPoint modelResolvers,
                                    URLArtifactProcessor<java.lang.Object> artifactProcessor,
                                    StAXArtifactProcessor<java.lang.Object> extensionProcessor,
                                    Monitor monitor)
Method Detail

getArtifactType

public java.lang.String getArtifactType()
Description copied from interface: URLArtifactProcessor
Returns the type of artifact handled by this artifact processor.

Specified by:
getArtifactType in interface URLArtifactProcessor<Contribution>
Returns:
The type of artifact handled by this artifact processor

getModelType

public java.lang.Class<Contribution> getModelType()
Description copied from interface: ArtifactProcessor
Returns the type of model handled by this artifact processor.

Specified by:
getModelType in interface ArtifactProcessor<Contribution>
Returns:
The type of model handled by this artifact processor

read

public Contribution read(java.net.URL parentURL,
                         java.net.URI contributionURI,
                         java.net.URL contributionURL)
                  throws ContributionReadException
Description copied from interface: URLArtifactProcessor
Reads a model from a URL.

Specified by:
read in interface URLArtifactProcessor<Contribution>
Parameters:
parentURL - Contribution location URL
contributionURI - Artifact URI
contributionURL - Artifact location URL
Returns:
A model representation of the input.
Throws:
ContributionReadException

resolve

public void resolve(Contribution contribution,
                    ModelResolver resolver)
             throws ContributionResolveException
Description copied from interface: ArtifactProcessor
Resolve references from this model to other models. For example references from a composite to another one, or references from a composite to a WSDL model.

Specified by:
resolve in interface ArtifactProcessor<Contribution>
Parameters:
contribution - The model to resolve
resolver - The resolver to use to resolve referenced models
Throws:
ContributionResolveException