* @throws IntegrationException
*/
private boolean prepareIntegration(XMLReference reference)
throws IntegrationException {
boolean hasChanged = false;
PluginManager pluginManager = PluginManager.getInstance();
List<XMLArtefactOperation> operations = reference.getOperations();
XMLProvider xmlProvider = reference.getProvider();
if (xmlProvider == null) {
// TODO externalize
String message = "there is no provider"; //$NON-NLS-1$
showError(message);
throw new MissingProviderException();
}
String id = xmlProvider.getId();
MetaProvider provider = pluginManager.getProvider(id);
if (provider == null) {
// TODO externalize
String message = "can't insantiate provider '" + id + "'"; //$NON-NLS-1$ //$NON-NLS-2$
showError(message);
throw new MissingProviderException(id);
}
String firstArtefactType = provider.getProvidedArtefactType();
checkOperationOrder(firstArtefactType, operations);
String lastRepresentationType = firstArtefactType;
if (!operations.isEmpty()) {
id = operations.get(operations.size() - 1).getId();
lastRepresentationType = pluginManager.getArtefactOperation(id)
.getTargetType();
}
XMLIntegrator integrator = reference.getIntegrator();
if (integrator == null