use of alien4cloud.component.repository.exception.CSARUsedInActiveDeployment in project alien4cloud by alien4cloud.
the class PluginArchiveIndexer method indexArchive.
private void indexArchive(PluginArchive pluginArchive, Orchestrator orchestrator, Location location) {
ArchiveRoot archive = pluginArchive.getArchive();
// inject a specific tag to allow components catalog filtering search
injectWorkSpace(archive.getNodeTypes().values(), orchestrator, location);
injectWorkSpace(archive.getArtifactTypes().values(), orchestrator, location);
injectWorkSpace(archive.getCapabilityTypes().values(), orchestrator, location);
injectWorkSpace(archive.getRelationshipTypes().values(), orchestrator, location);
List<ParsingError> parsingErrors = Lists.newArrayList();
// index the archive in alien catalog
try {
archiveIndexer.importArchive(archive, CSARSource.ORCHESTRATOR, pluginArchive.getArchiveFilePath(), parsingErrors);
} catch (AlreadyExistException e) {
log.debug("Skipping location archive import as the released version already exists in the repository.");
} catch (CSARUsedInActiveDeployment e) {
log.debug("Skipping orchestrator archive import as it is used in an active deployment. " + e.getMessage());
} catch (ToscaTypeAlreadyDefinedInOtherCSAR e) {
log.debug("Skipping orchestrator archive import, it's archive contain's a tosca type already defined in an other archive." + e.getMessage());
}
// Publish event to allow plugins to post-process elements (portability plugin for example).
publishLocationTypeIndexedEvent(archive.getNodeTypes().values(), orchestrator, location);
}
Aggregations