/**
* A utility that provides system functions to handle Tuscany SCA application deployment
*/
public interface Deployer extends LifeCycleListener {
/**
* Attach a deployment composite to the given contribution
* @param contribution The target contribution
* @param composite The deployment composite
* @param appending A flag to indicate if existing deployable composites in the contribution should be appended or replaced
*/
void attachDeploymentComposite(Contribution contribution, Composite composite, boolean appending);
/**
* Configure a list of contributions to create a composite representing a view of the domain
* @param contributions
* @param bindingBaseURIs
* @param monitor
* @return
* @throws ContributionResolveException
* @throws CompositeBuilderException
*/
Composite build(List<Contribution> contributions, Map<QName, List<String>> bindingBaseURIs, Monitor monitor)
throws ContributionResolveException, CompositeBuilderException;
/**
* Load an artifact from the given location
* @param uri
* @param location
* @param monitor
* @return
* @throws ContributionReadException
*/
Artifact loadArtifact(URI uri, URL location, Monitor monitor) throws ContributionReadException;
/**
* Load a contribution from the given location
* @param uri
* @param location
* @param monitor
* @return
* @throws ContributionReadException
*/
Contribution loadContribution(URI uri, URL location, Monitor monitor) throws ContributionReadException;
/**
* @param <T>
* @param uri
* @param location
* @param monitor
* @return
* @throws ContributionReadException
*/
<T> T loadDocument(URI uri, URL location, Monitor monitor) throws ContributionReadException;
/**
* @param <T>
* @param reader
* @param monitor
* @return
* @throws XMLStreamException
* @throws ContributionReadException
*/
<T> T loadXMLDocument(Reader reader, Monitor monitor) throws XMLStreamException, ContributionReadException;
/**
* @param <T>
* @param location
* @param monitor
* @return
* @throws XMLStreamException
* @throws ContributionReadException
*/
<T> T loadXMLDocument(URL location, Monitor monitor) throws XMLStreamException, ContributionReadException;
/**
* @param <T>
* @param reader
* @param monitor
* @return
* @throws ContributionReadException
* @throws XMLStreamException
*/
<T> T loadXMLElement(XMLStreamReader reader, Monitor monitor) throws ContributionReadException, XMLStreamException;
/**
* Save the model as XML
* @param model
* @param writer
* @param monitor
* @throws XMLStreamException
* @throws ContributionWriteException
*/
void saveXMLDocument(Object model, Writer writer, Monitor monitor) throws XMLStreamException,
ContributionWriteException;
/**
* Save the model as XML
* @param model
* @param writer
* @param monitor
* @throws XMLStreamException
* @throws ContributionWriteException
*/
void saveXMLElement(Object model, XMLStreamWriter writer, Monitor monitor) throws XMLStreamException,
ContributionWriteException;
/**
* @return
*/
boolean isSchemaValidationEnabled();
/**
* @param schemaValidationEnabled
*/
void setSchemaValidationEnabled(boolean schemaValidationEnabled);
/**
*
* @return
*/
Monitor createMonitor();
/**
* Create an instance of {@link BuilderContext}
* @return
*/
BuilderContext createBuilderContext();
/**
* Create an instance of {@link ProcessorContext}
* @return
*/
ProcessorContext createProcessorContext();
/**
* Get the {@link ExtensionPointRegistry}
* @return
*/
ExtensionPointRegistry getExtensionPointRegistry();
/*
* @see org.apache.tuscany.sca.core.LifeCycleListener#start()
*/
void start();
/*
* @see org.apache.tuscany.sca.core.LifeCycleListener#stop()
*/
void stop();
}