diff options
Diffstat (limited to 'src/main')
6 files changed, 24 insertions, 95 deletions
diff --git a/src/main/java/org/onap/aai/babel/csar/vnfcatalog/VendorImageConfiguration.java b/src/main/java/org/onap/aai/babel/csar/vnfcatalog/VendorImageConfiguration.java index 6142aac..bb4476a 100644 --- a/src/main/java/org/onap/aai/babel/csar/vnfcatalog/VendorImageConfiguration.java +++ b/src/main/java/org/onap/aai/babel/csar/vnfcatalog/VendorImageConfiguration.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.csar.vnfcatalog; import com.google.gson.annotations.SerializedName; @@ -79,30 +80,6 @@ class VendorImageConfiguration { this.applicationVersion = applicationVersion; } - public String getApplication() { - return application; - } - - public void setApplication(String application) { - this.application = application; - } - - public String getApplicationVendor() { - return applicationVendor; - } - - public void setApplicationVendor(String applicationVendor) { - this.applicationVendor = applicationVendor; - } - - public String getApplicationVersion() { - return applicationVersion; - } - - public void setApplicationVersion(String applicationVersion) { - this.applicationVersion = applicationVersion; - } - @Override public String toString() { return "VendorImage [" + application + ", " + applicationVendor + ", " + applicationVersion + "]"; diff --git a/src/main/java/org/onap/aai/babel/service/data/BabelArtifact.java b/src/main/java/org/onap/aai/babel/service/data/BabelArtifact.java index 81c237e..86bf0cc 100644 --- a/src/main/java/org/onap/aai/babel/service/data/BabelArtifact.java +++ b/src/main/java/org/onap/aai/babel/service/data/BabelArtifact.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +18,14 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.service.data; /** Bean representing the return artifacts of the Babel microservice. */ public class BabelArtifact { public enum ArtifactType { - MODEL, - VNFCATALOG; + MODEL, VNFCATALOG; } String name; @@ -42,23 +42,11 @@ public class BabelArtifact { return name; } - public void setName(String name) { - this.name = name; - } - public ArtifactType getType() { return type; } - public void setType(String type) { - this.type = ArtifactType.valueOf(type); - } - public String getPayload() { return payload; } - - public void setPayload(String payload) { - this.payload = payload; - } } diff --git a/src/main/java/org/onap/aai/babel/xml/generator/data/Artifact.java b/src/main/java/org/onap/aai/babel/xml/generator/data/Artifact.java index 50dfc89..2a2e32c 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/data/Artifact.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/data/Artifact.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.xml.generator.data; public class Artifact { @@ -50,18 +51,6 @@ public class Artifact { return payload; } - public String getChecksum() { - return checksum; - } - - public String getType() { - return type; - } - - public String getGroupType() { - return groupType; - } - public String getName() { return name; } @@ -70,18 +59,10 @@ public class Artifact { this.name = name; } - public String getLabel() { - return label; - } - public void setLabel(String label) { this.label = label; } - public String getDescription() { - return description; - } - public void setDescription(String description) { this.description = description; } diff --git a/src/main/java/org/onap/aai/babel/xml/generator/data/GenerationData.java b/src/main/java/org/onap/aai/babel/xml/generator/data/GenerationData.java index f59cb66..8ca8b6b 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/data/GenerationData.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/data/GenerationData.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.xml.generator.data; import java.util.ArrayList; @@ -30,17 +31,12 @@ public class GenerationData { List<Artifact> resultData = new ArrayList<>(); Map<String, List<String>> errorData = new HashMap<>(); - public void add(List<Artifact> resultData, Map<String, List<String>> errorData) { - this.resultData.addAll(resultData); - this.errorData.putAll(errorData); - } - public void add(Artifact generatedArtifact) { resultData.add(generatedArtifact); } /** - * Add the error code to the list of error codes for the given ID + * Add the error code to the list of error codes for the given ID. * * @param generatorId the generator id * @param errorCode the error code @@ -50,11 +46,6 @@ public class GenerationData { errorData.get(generatorId).add(errorCode); } - public void add(GenerationData generationData) { - this.resultData.addAll(generationData.resultData); - this.errorData.putAll(generationData.errorData); - } - public List<Artifact> getResultData() { return resultData; } diff --git a/src/main/java/org/onap/aai/babel/xml/generator/data/GeneratorUtil.java b/src/main/java/org/onap/aai/babel/xml/generator/data/GeneratorUtil.java index 42c8893..16f6b13 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/data/GeneratorUtil.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/data/GeneratorUtil.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.xml.generator.data; import java.util.Base64; @@ -27,21 +28,11 @@ import org.apache.commons.codec.digest.DigestUtils; public final class GeneratorUtil { /* - * Private constructor to prevent instantiation + * Private constructor to prevent instantiation. */ private GeneratorUtil() {} /** - * Decodes Base64 encode byte array input. - * - * @param input Base64 encoded byte array - * @return Decoded byte array - */ - public static byte[] decode(byte[] input) { - return input != null ? Base64.getDecoder().decode(input) : new byte[0]; - } - - /** * Encode a byte array input using Base64 encoding. * * @param input Input byte array to be encoded diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java index 67fac05..44beb65 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2019 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.xml.generator.model; import java.util.Collection; @@ -54,10 +55,10 @@ public class Widget extends Model { } /** - * Copy Constructor + * Copy Constructor. * * @param baseWidget - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException */ public Widget(Widget baseWidget) throws XmlArtifactGenerationException { this(baseWidget.getWidgetType(), baseWidget.getName(), baseWidget.getDeleteFlag()); @@ -75,7 +76,7 @@ public class Widget extends Model { * @param type * the type * @return a new widget of the specified type - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException * if there is no configuration defined for the specified type */ public static Widget getWidget(Type type) throws XmlArtifactGenerationException { |