From 9123228ff6b7784f290807916da588154d9b90c1 Mon Sep 17 00:00:00 2001 From: "Sindhuri.A" Date: Fri, 23 Nov 2018 18:01:21 +0530 Subject: Refactor Code ArtifactsBusinessLogic Code refactor : catalog-be classes Issue-ID: SDC-1880 Change-Id: I91cde08ff38ea5436673e142c0730153b37c2200 Signed-off-by: Sindhuri.A --- .../sdc/be/components/impl/ArtifactsBusinessLogic.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'catalog-be') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java index 65a87d444b..2b3ee0ed2e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java @@ -2067,7 +2067,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { private Either validateDeploymentArtifact(Component parentComponent, String parentId, boolean isCreate, ArtifactDefinition artifactInfo, ArtifactDefinition currentArtifact, NodeTypeEnum parentType) { Either result = Either.left(true); - Wrapper responseWrapper = new Wrapper(); + Wrapper responseWrapper = new Wrapper<>(); validateArtifactTypeExists(responseWrapper, artifactInfo); @@ -2272,8 +2272,8 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { private Either validateHeatEnvDeploymentArtifact(Component parentComponent, String parentId, ArtifactDefinition artifactInfo, NodeTypeEnum parentType) { - Wrapper errorWrapper = new Wrapper(); - Wrapper heatMDWrapper = new Wrapper(); + Wrapper errorWrapper = new Wrapper<>(); + Wrapper heatMDWrapper = new Wrapper<>(); Wrapper payloadWrapper = new Wrapper<>(); if (errorWrapper.isEmpty()) { @@ -2671,7 +2671,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { private Either, ActionStatus> getDeploymentArtifactTypes(NodeTypeEnum parentType) { Map deploymentArtifacts ; - List artifactTypes = new ArrayList(); + List artifactTypes = new ArrayList<>(); if (parentType.equals(NodeTypeEnum.Service)) { deploymentArtifacts = ConfigurationManager.getConfigurationManager() @@ -4243,7 +4243,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { public Map buildJsonForUpdateArtifact(String artifactId, String artifactName, String artifactType, ArtifactGroupTypeEnum artifactGroupType, String label, String displayName, String description, byte[] artifactContent, List updatedRequiredArtifacts, List heatParameters) { - Map json = new HashMap(); + Map json = new HashMap<>(); if (artifactId != null && !artifactId.isEmpty()) { json.put(Constants.ARTIFACT_ID, artifactId); } @@ -4758,8 +4758,6 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { public Either uploadArtifactToComponentByUUID(String data, HttpServletRequest request, ComponentTypeEnum componentType, String componentUuid, ResourceCommonInfo resourceCommonInfo,ArtifactOperationInfo operation) { Wrapper errorWrapper = new Wrapper<>(); Either, ResponseFormat> actionResult = null; - Either uploadArtifactResult; - ArtifactDefinition uploadArtifact = null; Component component = null; String componentId = null; ArtifactDefinition artifactInfo = RepresentationUtils.convertJsonToArtifactDefinition(data, ArtifactDefinition.class); -- cgit 1.2.3-korg