+ public List<DeploymentItem> getDeploymentItems(Rapp rApp) {
+ List<DeploymentItem> deploymentItems = new ArrayList<>();
+ File csarFile = getCsarFile(rApp);
+ String asdDefinitionLocation = getAsdDefinitionLocation(csarFile);
+ if (asdDefinitionLocation != null && !asdDefinitionLocation.isEmpty()) {
+ try {
+ String asdContent = getFileFromCsar(csarFile, asdDefinitionLocation).toString();
+ JsonNode jsonNode = getAsdContentNode(asdContent);
+ JsonNode artifactsJsonNode = jsonNode.at(ARTIFACTS_LOCATION_JSON_POINTER);
+ artifactsJsonNode.forEach(artifactJsonNode -> {
+ DeploymentItem deploymentItem =
+ objectMapper.convertValue(artifactJsonNode.at("/properties"), DeploymentItem.class);
+ deploymentItem.setFile(artifactJsonNode.at("/file").asText());
+ deploymentItems.add(deploymentItem);
+ });
+ } catch (Exception e) {
+ logger.warn("Unable to get the deployment items", e);
+ }
+ }
+ return deploymentItems;
+ }
+