diff options
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/info')
10 files changed, 141 insertions, 118 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactAccessInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactAccessInfo.java index d3fcf9f6c0..bedbff46b1 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactAccessInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactAccessInfo.java @@ -30,7 +30,7 @@ public class ArtifactAccessInfo { this.id = artifactData.getId(); } - public ArtifactAccessInfo(ESArtifactData artifactData, String servletContext) { + public ArtifactAccessInfo(String servletContext) { StringBuilder urlBuilder = new StringBuilder(); urlBuilder = urlBuilder.append(servletContext).append("/"); urlBuilder.append("resources/") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTemplateInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTemplateInfo.java index 141dd7b66d..8bf56df3da 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTemplateInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTemplateInfo.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,12 +20,9 @@ package org.openecomp.sdc.be.info; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - +import com.google.gson.Gson; +import com.google.gson.JsonObject; +import fj.data.Either; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.Configuration.ArtifactTypeConfig; import org.openecomp.sdc.be.config.ConfigurationManager; @@ -34,44 +31,38 @@ import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.ArtifactType; import org.openecomp.sdc.common.api.ArtifactTypeEnum; +import org.openecomp.sdc.common.log.wrappers.Logger; import org.openecomp.sdc.exception.ResponseFormat; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.google.gson.Gson; -import com.google.gson.JsonObject; - -import fj.data.Either; +import java.util.*; public class ArtifactTemplateInfo { - public static final String TYPE = "type"; - public static final String FILE_NAME = "fileName"; - public static final String ENV = "env"; - public static final String IS_BASE = "isBase"; - - public static final String CSAR_HEAT = "HEAT"; + private static final Logger log = Logger.getLogger(ArtifactTemplateInfo.class); + private static final Gson gson = new Gson(); public static final String CSAR_ARTIFACT = "artifacts"; - public static final String CSAR_NETWORK = "network"; - public static final String CSAR_VOLUME = "volume"; - public static final String CSAR_NESTED = "nested"; - private static final Object DESC = "description"; - private static final Logger log = LoggerFactory.getLogger(ArtifactTemplateInfo.class); - String type; - String fileName; - String env; - boolean isBase; - String groupName; - String description; - - List<ArtifactTemplateInfo> relatedArtifactsInfo; - private static Gson gson = new Gson(); - - public ArtifactTemplateInfo() { - super(); - } + + private static final String ARTIFACT_TEMPLATE_TYPE = "type"; + private static final String FILE_NAME = "fileName"; + private static final String ARTIFACT_TEMPLATE_ENV = "env"; + private static final String IS_BASE = "isBase"; + private static final String CSAR_HEAT = "HEAT"; + private static final String CSAR_NETWORK = "network"; + private static final String CSAR_VOLUME = "volume"; + private static final String CSAR_NESTED = "nested"; + private static final String DESC = "description"; + + private String type; + private String fileName; + private String env; + private boolean isBase; + private String groupName; + private String description; + + private List<ArtifactTemplateInfo> relatedArtifactsInfo; + + public ArtifactTemplateInfo() {} public ArtifactTemplateInfo(String type, String fileName, String env, List<ArtifactTemplateInfo> relatedArtifactsInfo) { - super(); this.type = type; this.fileName = fileName; this.env = env; @@ -147,19 +138,23 @@ public class ArtifactTemplateInfo { jsonElement = gson.fromJson(content, jsonElement.getClass()); - Map<String, Object> artifactTemplateMap = componentsUtils.parseJsonToObject(jsonElement.toString(), HashMap.class); - if (artifactTemplateMap.containsKey(TYPE)) - resourceInfo.setType((String) artifactTemplateMap.get(TYPE)); - if (artifactTemplateMap.containsKey(FILE_NAME)) + Map<String, Object> artifactTemplateMap = ComponentsUtils.parseJsonToObject(jsonElement.toString(), HashMap.class); + if (artifactTemplateMap.containsKey(ARTIFACT_TEMPLATE_TYPE)) { + resourceInfo.setType((String) artifactTemplateMap.get(ARTIFACT_TEMPLATE_TYPE)); + } + if (artifactTemplateMap.containsKey(FILE_NAME)) { resourceInfo.setFileName((String) artifactTemplateMap.get(FILE_NAME)); - if (artifactTemplateMap.containsKey(IS_BASE)) + } + if (artifactTemplateMap.containsKey(IS_BASE)) { resourceInfo.setBase((Boolean) artifactTemplateMap.get(IS_BASE)); - if (artifactTemplateMap.containsKey(ENV)) { - Object envObj = artifactTemplateMap.get(ENV); + } + if (artifactTemplateMap.containsKey(ARTIFACT_TEMPLATE_ENV)) { + Object envObj = artifactTemplateMap.get(ARTIFACT_TEMPLATE_ENV); String envStr = ""; if (envObj instanceof String) { envStr = (String) envObj; - } else if (envObj instanceof Map) { + } + else if (envObj instanceof Map) { Map envMap = (Map) envObj; if (envMap.containsKey(FILE_NAME)) { envStr = (String) envMap.get(FILE_NAME); @@ -174,23 +169,30 @@ public class ArtifactTemplateInfo { } boolean artifactTypeExist = false; - String correctType = type; - if (type.equalsIgnoreCase(CSAR_NESTED)) + String correctType; + if (type.equalsIgnoreCase(CSAR_NESTED)) { correctType = ArtifactTypeEnum.HEAT_NESTED.getType(); - else if (type.equalsIgnoreCase(CSAR_VOLUME)) + } + else if (type.equalsIgnoreCase(CSAR_VOLUME)) { correctType = ArtifactTypeEnum.HEAT_VOL.getType(); - else if (type.equalsIgnoreCase(CSAR_NETWORK)) + } + else if (type.equalsIgnoreCase(CSAR_NETWORK)) { correctType = ArtifactTypeEnum.HEAT_NET.getType(); + } else if (type.equalsIgnoreCase(CSAR_ARTIFACT)){ - if( parentArtifact != null) + if( parentArtifact != null) { correctType = ArtifactTypeEnum.HEAT_ARTIFACT.getType(); - else + } + else { correctType = resourceInfo.type; + } } - else if (type.equalsIgnoreCase(CSAR_HEAT)) + else if (type.equalsIgnoreCase(CSAR_HEAT)) { correctType = ArtifactTypeEnum.HEAT.getType(); - else + } + else { correctType = ArtifactTypeEnum.OTHER.getType(); + } Either<List<ArtifactType>, ActionStatus> allArtifactTypes = getDeploymentArtifactTypes(NodeTypeEnum.Resource); if (allArtifactTypes.isRight()) { @@ -214,24 +216,29 @@ public class ArtifactTemplateInfo { } Either<Boolean, ResponseFormat> eitherNeedToCreate = validateEnv(componentsUtils, createdArtifactTemplateInfoList, resourceInfo); - if (eitherNeedToCreate.isRight()) + if (eitherNeedToCreate.isRight()) { return Either.right(eitherNeedToCreate.right().value()); + } eitherNeedToCreate = validateParentType(componentsUtils, resourceInfo, parentArtifact); - if (eitherNeedToCreate.isRight()) + if (eitherNeedToCreate.isRight()) { return Either.right(eitherNeedToCreate.right().value()); + } eitherNeedToCreate = validateIsAlreadyExist(componentsUtils, resourceInfo, createdArtifactTemplateInfoList, parentArtifact); - if (eitherNeedToCreate.isRight()) + if (eitherNeedToCreate.isRight()) { return Either.right(eitherNeedToCreate.right().value()); + } Set<String> keys = o.keySet(); for (String key : keys) { if (o.get(key) instanceof List) { List<Map<String, Object>> artifList = (List<Map<String, Object>>) o.get(key); for (Map<String, Object> relatedArtifactsMap : artifList) { Either<ArtifactTemplateInfo, ResponseFormat> relatedArtifact = ArtifactTemplateInfo.createArtifactTemplateInfoFromJson(componentsUtils, key, relatedArtifactsMap, createdArtifactTemplateInfoList, resourceInfo); - if (relatedArtifact.isRight()) + if (relatedArtifact.isRight()) { return relatedArtifact; - if (resourceInfo.relatedArtifactsInfo == null) - resourceInfo.relatedArtifactsInfo = new ArrayList<ArtifactTemplateInfo>(); + } + if (resourceInfo.relatedArtifactsInfo == null) { + resourceInfo.relatedArtifactsInfo = new ArrayList<>(); + } resourceInfo.relatedArtifactsInfo.add(relatedArtifact.left().value()); } } @@ -255,10 +262,8 @@ public class ArtifactTemplateInfo { if (relatedArtifacts == null || relatedArtifacts.isEmpty()) return Either.left(true); for (ArtifactTemplateInfo relatedArtifact : relatedArtifacts) { - if (relatedArtifact.getType().equalsIgnoreCase(resourceInfo.getType())) { - if (relatedArtifact.getFileName().equalsIgnoreCase(resourceInfo.getFileName())) { - return Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_ALRADY_EXIST_IN_MASTER_IN_CSAR, resourceInfo.getFileName(), parentArtifact.getFileName())); - } + if (relatedArtifact.getType().equalsIgnoreCase(resourceInfo.getType()) && relatedArtifact.getFileName().equalsIgnoreCase(resourceInfo.getFileName())) { + return Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_ALRADY_EXIST_IN_MASTER_IN_CSAR, resourceInfo.getFileName(), parentArtifact.getFileName())); } } return Either.left(true); @@ -267,11 +272,13 @@ public class ArtifactTemplateInfo { private static Either<Boolean, ResponseFormat> validateParentType(ComponentsUtils componentsUtils, ArtifactTemplateInfo resourceInfo, ArtifactTemplateInfo parentArtifact) { - if (parentArtifact == null) + if (parentArtifact == null) { return Either.left(true); - if (resourceInfo.getType().equalsIgnoreCase(ArtifactTypeEnum.HEAT_ARTIFACT.getType())) + } + if (resourceInfo.getType().equalsIgnoreCase(ArtifactTypeEnum.HEAT_ARTIFACT.getType())) { return Either.left(true); - if (resourceInfo.getType().equalsIgnoreCase(ArtifactTypeEnum.HEAT.getType()) && parentArtifact != null) { + } + if (resourceInfo.getType().equalsIgnoreCase(ArtifactTypeEnum.HEAT.getType())) { return Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_NOT_VALID_IN_MASTER, resourceInfo.getFileName(), resourceInfo.getType(), parentArtifact.getFileName(), parentArtifact.getType())); } if ((resourceInfo.getType().equalsIgnoreCase(ArtifactTypeEnum.HEAT_NET.getType()) || resourceInfo.getType().equalsIgnoreCase(ArtifactTypeEnum.HEAT_VOL.getType())) @@ -329,7 +336,7 @@ public class ArtifactTemplateInfo { private static Either<List<ArtifactType>, ActionStatus> getDeploymentArtifactTypes(NodeTypeEnum parentType) { Map<String, ArtifactTypeConfig> deploymentArtifacts = null; - List<ArtifactType> artifactTypes = new ArrayList<ArtifactType>(); + List<ArtifactType> artifactTypes = new ArrayList<>(); if (parentType.equals(NodeTypeEnum.Service)) { deploymentArtifacts = ConfigurationManager.getConfigurationManager().getConfiguration().getServiceDeploymentArtifacts(); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTypesInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTypesInfo.java index da7f178862..5d635f05ff 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTypesInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTypesInfo.java @@ -20,10 +20,10 @@ package org.openecomp.sdc.be.info; -import java.util.List; - import org.openecomp.sdc.be.model.ArtifactType; +import java.util.List; + public class ArtifactTypesInfo { Integer heatDefaultTimeout = 60; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatus.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatus.java index 795d5f6046..11a42694bf 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatus.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatus.java @@ -20,8 +20,7 @@ package org.openecomp.sdc.be.info; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.openecomp.sdc.common.log.wrappers.Logger; public enum DistributionStatus { DEPLOYED("Deployed", "DEPLOYED"); @@ -29,7 +28,7 @@ public enum DistributionStatus { private String name; private String auditingStatus; - private static final Logger log = LoggerFactory.getLogger(DistributionStatus.class); + private static final Logger log = Logger.getLogger(DistributionStatus.class); DistributionStatus(String name, String auditingStatus) { this.name = name; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java index dd8ef32124..c9eba2e764 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java @@ -20,7 +20,7 @@ package org.openecomp.sdc.be.info; -import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; +import org.openecomp.sdc.common.datastructure.AuditingFieldsKey; import org.openecomp.sdc.common.datastructure.ESTimeBasedEvent; public class DistributionStatusInfo { @@ -32,12 +32,11 @@ public class DistributionStatusInfo { public DistributionStatusInfo(ESTimeBasedEvent distributionStatusEvent) { super(); - omfComponentID = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID.getDisplayName()); - timestamp = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_STATUS_TIME.getDisplayName());// distributionStatusEvent.getStatusTime(); - url = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL.getDisplayName());// distributionStatusEvent.getResoureURL(); - status = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_STATUS.getDisplayName());// distributionStatusEvent.getStatus(); - errorReason = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_DESC.getDisplayName()); - + omfComponentID = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_CONSUMER_ID.getDisplayName()); + timestamp = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_STATUS_TIME.getDisplayName()); + url = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_RESOURCE_URL.getDisplayName()); + status = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_STATUS.getDisplayName()); + errorReason = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DESC.getDisplayName()); } public DistributionStatusInfo(String omfComponentID, String timestamp, String url, String status) { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/GroupDefinitionInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/GroupDefinitionInfo.java index 456ffd095b..e7a0706b31 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/GroupDefinitionInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/GroupDefinitionInfo.java @@ -20,15 +20,19 @@ package org.openecomp.sdc.be.info; -import java.util.List; - import org.openecomp.sdc.be.model.GroupDefinition; import org.openecomp.sdc.be.model.GroupInstance; import org.openecomp.sdc.be.model.GroupProperty; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class GroupDefinitionInfo { private String name; + private String description; + // the id is unique per group instance on graph. private String uniqueId; @@ -48,12 +52,14 @@ public class GroupDefinitionInfo { private String invariantUUID; private String customizationUUID; - Boolean isBase = null; + private Boolean isBase = null; // artifacts - list of artifact uid. All artifacts in the group must already // be uploaded to the VF private List<ArtifactDefinitionInfo> artifacts; + private Map<String, String> members; + private List<? extends GroupProperty> properties; public GroupDefinitionInfo() { @@ -62,17 +68,20 @@ public class GroupDefinitionInfo { public GroupDefinitionInfo(GroupDefinition other) { this.setName(other.getName()); + this.setDescription(other.getDescription()); this.setUniqueId(other.getUniqueId()); this.setVersion(other.getVersion()); this.setGroupUUID(other.getGroupUUID()); this.setInvariantUUID(other.getInvariantUUID()); this.setProperties(other.convertToGroupProperties()); - - + if (other.getMembers() != null) { + this.members = new HashMap<>(other.getMembers()); + } } public GroupDefinitionInfo(GroupInstance other) { this.setName(other.getGroupName()); + this.setDescription(other.getDescription()); this.setUniqueId(other.getGroupUid()); this.setGroupInstanceUniqueId(other.getUniqueId()); this.setVersion(other.getVersion()); @@ -80,8 +89,6 @@ public class GroupDefinitionInfo { this.setCustomizationUUID(other.getCustomizationUUID()); this.setInvariantUUID(other.getInvariantUUID()); this.setProperties(other.convertToGroupInstancesProperties()); - - } public String getInvariantUUID() { @@ -100,6 +107,14 @@ public class GroupDefinitionInfo { this.name = name; } + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + public String getUniqueId() { return uniqueId; } @@ -142,19 +157,19 @@ public class GroupDefinitionInfo { } public List<ArtifactDefinitionInfo> getArtifacts() { - return artifacts; + return (artifacts==null) ? null : new ArrayList<>(artifacts); } public void setArtifacts(List<ArtifactDefinitionInfo> artifacts) { - this.artifacts = artifacts; + this.artifacts = (artifacts==null) ? null : new ArrayList<>(artifacts); } - public List<? extends GroupProperty> getProperties() { - return properties; + public List<GroupProperty> getProperties() { + return (properties==null) ? null : new ArrayList<>(properties); } public void setProperties(List<? extends GroupProperty> properties) { - this.properties = properties; + this.properties = (properties==null) ? null : new ArrayList<>(properties); } @@ -167,6 +182,14 @@ public class GroupDefinitionInfo { this.groupInstanceUniqueId = groupInstanceUniqueId; } + public Map<String, String> getMembers() { + return members; + } + + public void setMembers(Map<String, String> members) { + this.members = members; + } + @Override public String toString() { return "GroupDefinitionInfo [" + super.toString() + ", isBase=" + isBase + ", artifacts=" + artifacts + "]"; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/MergedArtifactInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/MergedArtifactInfo.java index d5da29f77d..455bf40246 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/MergedArtifactInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/MergedArtifactInfo.java @@ -20,14 +20,11 @@ package org.openecomp.sdc.be.info; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; - import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.model.ArtifactDefinition; + +import java.util.*; + public class MergedArtifactInfo { private List<ArtifactDefinition> createdArtifact; @@ -40,7 +37,7 @@ public class MergedArtifactInfo { public void setCreatedArtifact(List<ArtifactDefinition> createdArtifact) { this.createdArtifact = createdArtifact; - parsetArtifactsNames = new HashSet<String>(); + parsetArtifactsNames = new HashSet<>(); parsetArtifactsNames.add(jsonArtifactTemplate.getFileName()); List<ArtifactTemplateInfo> relatedGroupTemplateList = jsonArtifactTemplate.getRelatedArtifactsInfo(); if (relatedGroupTemplateList != null && !relatedGroupTemplateList.isEmpty()) { @@ -58,7 +55,7 @@ public class MergedArtifactInfo { } public List<ArtifactTemplateInfo> getListToAssociateArtifactToGroup() { - List<ArtifactTemplateInfo> resList = new ArrayList<ArtifactTemplateInfo>(); + List<ArtifactTemplateInfo> resList = new ArrayList<>(); List<ArtifactTemplateInfo> relatedArtifacts = jsonArtifactTemplate.getRelatedArtifactsInfo(); if (relatedArtifacts != null && !relatedArtifacts.isEmpty()) { getNewArtifactsInGroup(resList, relatedArtifacts); @@ -67,7 +64,7 @@ public class MergedArtifactInfo { } public List<ArtifactDefinition> getListToDissotiateArtifactFromGroup(List<ArtifactDefinition> deletedArtifacts) { - List<ArtifactDefinition> resList = new ArrayList<ArtifactDefinition>(); + List<ArtifactDefinition> resList = new ArrayList<>(); for (ArtifactDefinition artifactDefinition : createdArtifact) { boolean isDissotiate = true; if(parsetArtifactsNames.contains(artifactDefinition.getArtifactName())){ @@ -106,10 +103,10 @@ public class MergedArtifactInfo { } public List<ImmutablePair<ArtifactDefinition, ArtifactTemplateInfo>> getListToUpdateArtifactInGroup() { - List<ImmutablePair<ArtifactDefinition, ArtifactTemplateInfo>> resList = new ArrayList<ImmutablePair<ArtifactDefinition, ArtifactTemplateInfo>>(); + List<ImmutablePair<ArtifactDefinition, ArtifactTemplateInfo>> resList = new ArrayList<>(); for (ArtifactDefinition artifactDefinition : createdArtifact) { if (artifactDefinition.getArtifactName().equalsIgnoreCase(jsonArtifactTemplate.getFileName())) { - resList.add(new ImmutablePair<ArtifactDefinition, ArtifactTemplateInfo>(artifactDefinition, jsonArtifactTemplate)); + resList.add(new ImmutablePair<>(artifactDefinition, jsonArtifactTemplate)); } } List<ArtifactTemplateInfo> relatedArtifacts = jsonArtifactTemplate.getRelatedArtifactsInfo(); @@ -125,7 +122,7 @@ public class MergedArtifactInfo { for (ArtifactDefinition artifactDefinition : createdArtifact) { if (artifactDefinition.getArtifactName().equalsIgnoreCase(artifactTemplateInfo.getFileName())) { - resList.add(new ImmutablePair<ArtifactDefinition, ArtifactTemplateInfo>(artifactDefinition, artifactTemplateInfo)); + resList.add(new ImmutablePair<>(artifactDefinition, artifactTemplateInfo)); } } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/NodeTypeInfoToUpdateArtifacts.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/NodeTypeInfoToUpdateArtifacts.java index 2aef7808ae..766581bd62 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/NodeTypeInfoToUpdateArtifacts.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/NodeTypeInfoToUpdateArtifacts.java @@ -1,12 +1,12 @@ package org.openecomp.sdc.be.info; +import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationEnum; +import org.openecomp.sdc.be.model.ArtifactDefinition; + import java.util.EnumMap; import java.util.List; import java.util.Map; -import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationEnum; -import org.openecomp.sdc.be.model.ArtifactDefinition; - public class NodeTypeInfoToUpdateArtifacts { private String nodeName; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/OperationalEnvInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/OperationalEnvInfo.java index f49722aa42..68ef5ac5b7 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/OperationalEnvInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/OperationalEnvInfo.java @@ -1,22 +1,20 @@ package org.openecomp.sdc.be.info; -import java.io.IOException; - -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.lang3.StringUtils; +import org.openecomp.sdc.common.log.wrappers.Logger; + +import java.io.IOException; public final class OperationalEnvInfo { @JsonIgnore private static ObjectMapper objectMapper = new ObjectMapper(); @JsonIgnore - private static final Logger logger = LoggerFactory.getLogger(OperationalEnvInfo.class); + private static final Logger logger = Logger.getLogger(OperationalEnvInfo.class); @JsonProperty("operational-environment-id") private String operationalEnvId; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/Relationship.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/Relationship.java index 5fd51e3dee..fba6632698 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/Relationship.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/Relationship.java @@ -1,10 +1,10 @@ package org.openecomp.sdc.be.info; +import com.fasterxml.jackson.annotation.JsonProperty; + import java.util.ArrayList; import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - public final class Relationship { @JsonProperty("related-to") |