diff options
author | Christophe Closset <christophe.closset@intl.att.com> | 2021-01-05 17:03:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-01-05 17:03:41 +0000 |
commit | eab7cf1a5737862be98ac97afcfff66b8661d596 (patch) | |
tree | c6508636b2cd9d91b2a80de55249a0d354b6b672 /src/main | |
parent | 7d183eff61bd7bffa2e4ba87184cc4b9c8f7ad89 (diff) | |
parent | 025e65f581a5e659db81e8b987b88cc5ef221d31 (diff) |
Merge "Align the clamp code on policy project"
Diffstat (limited to 'src/main')
51 files changed, 102 insertions, 168 deletions
diff --git a/src/main/java/org/onap/clamp/authorization/SecureServicePermission.java b/src/main/java/org/onap/clamp/authorization/SecureServicePermission.java index 374aab90c..0ee126ead 100644 --- a/src/main/java/org/onap/clamp/authorization/SecureServicePermission.java +++ b/src/main/java/org/onap/clamp/authorization/SecureServicePermission.java @@ -83,7 +83,7 @@ public class SecureServicePermission { } /** - * Instantiate permission given type from concatenated string + * Instantiate permission given type from concatenated string. * * @param concatenatedString * the string type|instance|action, less than 3 params can be diff --git a/src/main/java/org/onap/clamp/clds/ClampServlet.java b/src/main/java/org/onap/clamp/clds/ClampServlet.java index 8ebc7a16b..5ca3dfb6e 100644 --- a/src/main/java/org/onap/clamp/clds/ClampServlet.java +++ b/src/main/java/org/onap/clamp/clds/ClampServlet.java @@ -27,20 +27,17 @@ package org.onap.clamp.clds; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; - import fj.data.Array; import java.io.IOException; import java.security.Principal; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import java.util.stream.Collector; import java.util.stream.Collectors; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - import org.apache.camel.component.servlet.CamelHttpTransportServlet; import org.onap.clamp.authorization.SecureServicePermission; import org.springframework.context.ApplicationContext; diff --git a/src/main/java/org/onap/clamp/clds/client/CdsServices.java b/src/main/java/org/onap/clamp/clds/client/CdsServices.java index fd3b3539a..31960cc02 100644 --- a/src/main/java/org/onap/clamp/clds/client/CdsServices.java +++ b/src/main/java/org/onap/clamp/clds/client/CdsServices.java @@ -29,10 +29,8 @@ import com.att.eelf.configuration.EELFManager; import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
-
import java.util.Date;
import java.util.Map;
-
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.builder.ExchangeBuilder;
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java index b24bc99b2..ade96e0a7 100644 --- a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java +++ b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java @@ -26,10 +26,8 @@ package org.onap.clamp.clds.client; import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
-
import java.io.IOException;
import java.util.Date;
-
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.builder.ExchangeBuilder;
diff --git a/src/main/java/org/onap/clamp/clds/config/AafConfiguration.java b/src/main/java/org/onap/clamp/clds/config/AafConfiguration.java index d9178cb9a..7c86728bb 100644 --- a/src/main/java/org/onap/clamp/clds/config/AafConfiguration.java +++ b/src/main/java/org/onap/clamp/clds/config/AafConfiguration.java @@ -24,7 +24,6 @@ package org.onap.clamp.clds.config; import javax.servlet.Filter; - import org.onap.clamp.clds.filter.ClampCadiFilter; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; diff --git a/src/main/java/org/onap/clamp/clds/config/SystemPropertiesLoader.java b/src/main/java/org/onap/clamp/clds/config/SystemPropertiesLoader.java index 7480beb8d..10c6901fb 100644 --- a/src/main/java/org/onap/clamp/clds/config/SystemPropertiesLoader.java +++ b/src/main/java/org/onap/clamp/clds/config/SystemPropertiesLoader.java @@ -25,11 +25,8 @@ package org.onap.clamp.clds.config; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; - import java.util.Properties; - import javax.annotation.Resource; - import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/onap/clamp/clds/config/sdc/SdcControllersConfiguration.java b/src/main/java/org/onap/clamp/clds/config/sdc/SdcControllersConfiguration.java index ad2751bb8..b6f1e1a65 100644 --- a/src/main/java/org/onap/clamp/clds/config/sdc/SdcControllersConfiguration.java +++ b/src/main/java/org/onap/clamp/clds/config/sdc/SdcControllersConfiguration.java @@ -31,9 +31,7 @@ import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; - import javax.annotation.PostConstruct; - import org.onap.clamp.clds.exception.sdc.controller.SdcParametersException; import org.onap.clamp.clds.util.JsonUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/org/onap/clamp/clds/config/spring/SdcControllerConfiguration.java b/src/main/java/org/onap/clamp/clds/config/spring/SdcControllerConfiguration.java index eca45d66f..62c3a1fd1 100644 --- a/src/main/java/org/onap/clamp/clds/config/spring/SdcControllerConfiguration.java +++ b/src/main/java/org/onap/clamp/clds/config/spring/SdcControllerConfiguration.java @@ -25,13 +25,10 @@ package org.onap.clamp.clds.config.spring; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; - import java.util.ArrayList; import java.util.List; - import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; - import org.onap.clamp.clds.config.ClampProperties; import org.onap.clamp.clds.config.sdc.SdcControllersConfiguration; import org.onap.clamp.clds.exception.sdc.controller.SdcControllerException; diff --git a/src/main/java/org/onap/clamp/clds/model/cds/CdsBpWorkFlowListResponse.java b/src/main/java/org/onap/clamp/clds/model/cds/CdsBpWorkFlowListResponse.java index 66025c479..36510ea8f 100644 --- a/src/main/java/org/onap/clamp/clds/model/cds/CdsBpWorkFlowListResponse.java +++ b/src/main/java/org/onap/clamp/clds/model/cds/CdsBpWorkFlowListResponse.java @@ -23,7 +23,6 @@ package org.onap.clamp.clds.model.cds; import com.google.gson.annotations.Expose; - import java.util.LinkedList; import java.util.List; diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java b/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java index f9b43abb7..8afb3e81a 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java @@ -26,11 +26,9 @@ package org.onap.clamp.clds.sdc.controller; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; - import java.util.Date; import java.util.Map.Entry; import java.util.concurrent.ThreadLocalRandom; - import org.onap.clamp.clds.config.ClampProperties; import org.onap.clamp.clds.config.sdc.SdcSingleControllerConfiguration; import org.onap.clamp.clds.exception.sdc.controller.BlueprintParserException; diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParser.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParser.java index 5d5027d29..0c6ec8d83 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParser.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParser.java @@ -30,7 +30,6 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; - import java.util.AbstractMap; import java.util.Collections; import java.util.HashSet; @@ -38,7 +37,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; - import org.json.JSONObject; import org.onap.clamp.clds.exception.sdc.controller.BlueprintParserException; import org.yaml.snakeyaml.Yaml; diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/ChainGenerator.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/ChainGenerator.java index 2bd259c2b..7768cd817 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/ChainGenerator.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/ChainGenerator.java @@ -27,7 +27,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.stream.Collectors; - import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java index 471415a37..aa1a6af71 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java @@ -25,7 +25,6 @@ package org.onap.clamp.clds.sdc.controller.installer; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; - import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -40,7 +39,6 @@ import java.util.Map; import java.util.Optional; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; - import org.apache.commons.io.IOUtils; import org.codehaus.plexus.util.StringUtils; import org.onap.clamp.clds.exception.sdc.controller.CsarHandlerException; diff --git a/src/main/java/org/onap/clamp/clds/tosca/update/parser/ToscaConverterToJsonSchema.java b/src/main/java/org/onap/clamp/clds/tosca/update/parser/ToscaConverterToJsonSchema.java index 9721e33d9..d23dc79ec 100644 --- a/src/main/java/org/onap/clamp/clds/tosca/update/parser/ToscaConverterToJsonSchema.java +++ b/src/main/java/org/onap/clamp/clds/tosca/update/parser/ToscaConverterToJsonSchema.java @@ -145,8 +145,7 @@ public class ToscaConverterToJsonSchema { if (getToscaElement((String) property.getValue().getItems().get("type")) != null) { jsonSchema.add(property.getValue().getName(), this.getJsonSchemaOfToscaElement((String) property.getValue().getItems().get("type"))); - } - else { + } else { jsonSchema.add(property.getValue().getName(), this.complexParse(property.getValue())); } } @@ -176,8 +175,7 @@ public class ToscaConverterToJsonSchema { String typeProperty = (String) toscaElementProperty.getItems().get("type"); if (typeProperty.toLowerCase().equals("list") || typeProperty.toLowerCase().equals("map")) { currentPropertyJsonTemplate = templates.get("object"); - } - else { + } else { String propertyType = (String) toscaElementProperty.getItems().get("type"); currentPropertyJsonTemplate = templates.get(propertyType.toLowerCase()); } @@ -264,9 +262,8 @@ public class ToscaConverterToJsonSchema { break; } - } - // Native cases - else if (toscaElementProperty.getItems().get("type").equals("list")) { + } else if (toscaElementProperty.getItems().get("type").equals("list")) { + // Native cases JsonObject itemContainer = new JsonObject(); String valueInEntrySchema = this.extractSpecificFieldFromMap(toscaElementProperty, "entry_schema"); diff --git a/src/main/java/org/onap/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java b/src/main/java/org/onap/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java index 33e084279..3fdd192d6 100644 --- a/src/main/java/org/onap/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java +++ b/src/main/java/org/onap/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java @@ -58,8 +58,7 @@ public class ToscaMetadataParserWithDictionarySupport implements ToscaMetadataPa if (dictionaryService != null) { return parseMetadataPossibleValues(toscaElementProperty.getItems(), dictionaryService, serviceModel, toscaMetadataExecutor); - } - else { + } else { return null; } } @@ -163,8 +162,7 @@ public class ToscaMetadataParserWithDictionarySupport implements ToscaMetadataPa if (dictionaryFullNames.size() > 0) { if (childObject.get(JsonEditorSchemaConstants.ENUM) != null) { childObject.get(JsonEditorSchemaConstants.ENUM).getAsJsonArray().add(dictionaryFullNames); - } - else { + } else { childObject.add(JsonEditorSchemaConstants.ENUM, dictionaryFullNames); } // Add Enum titles for generated translated values during JSON instance @@ -173,17 +171,14 @@ public class ToscaMetadataParserWithDictionarySupport implements ToscaMetadataPa enumTitles.add(JsonEditorSchemaConstants.ENUM_TITLES, dictionaryNames); if (childObject.get(JsonEditorSchemaConstants.OPTIONS) != null) { childObject.get(JsonEditorSchemaConstants.OPTIONS).getAsJsonArray().add(enumTitles); - } - else { + } else { childObject.add(JsonEditorSchemaConstants.OPTIONS, enumTitles); } - } - else { + } else { if (childObject.get(JsonEditorSchemaConstants.ENUM) != null) { childObject.get(JsonEditorSchemaConstants.ENUM).getAsJsonArray().add(dictionaryNames); - } - else { + } else { childObject.add(JsonEditorSchemaConstants.ENUM, dictionaryNames); } } @@ -196,8 +191,7 @@ public class ToscaMetadataParserWithDictionarySupport implements ToscaMetadataPa dictionaryReference.length()).split("#"); if (dictionaryKeyArray.length > 1) { processComplexDictionaryElements(dictionaryKeyArray, childObject, dictionaryService); - } - else { + } else { processSimpleDictionaryElements(dictionaryKeyArray, childObject, dictionaryService); } } @@ -206,11 +200,9 @@ public class ToscaMetadataParserWithDictionarySupport implements ToscaMetadataPa String jsonType = null; if (toscaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_INTEGER)) { jsonType = JsonEditorSchemaConstants.TYPE_INTEGER; - } - else if (toscaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_LIST)) { + } else if (toscaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_LIST)) { jsonType = JsonEditorSchemaConstants.TYPE_ARRAY; - } - else { + } else { jsonType = JsonEditorSchemaConstants.TYPE_STRING; } return jsonType; diff --git a/src/main/java/org/onap/clamp/clds/tosca/update/templates/JsonTemplate.java b/src/main/java/org/onap/clamp/clds/tosca/update/templates/JsonTemplate.java index f64ba68cf..0b7a9a171 100644 --- a/src/main/java/org/onap/clamp/clds/tosca/update/templates/JsonTemplate.java +++ b/src/main/java/org/onap/clamp/clds/tosca/update/templates/JsonTemplate.java @@ -197,8 +197,7 @@ public class JsonTemplate { if (fieldStaticStatus(fieldName)) { String defaultValue = (String) this.getSpecificField(fieldName).getValue(); jsonSchema.addProperty(fieldName, defaultValue); - } - else { + } else { jsonSchema.addProperty(fieldName, value); } } diff --git a/src/main/java/org/onap/clamp/clds/tosca/update/templates/JsonTemplateManager.java b/src/main/java/org/onap/clamp/clds/tosca/update/templates/JsonTemplateManager.java index 0b399ba0b..a278cb667 100644 --- a/src/main/java/org/onap/clamp/clds/tosca/update/templates/JsonTemplateManager.java +++ b/src/main/java/org/onap/clamp/clds/tosca/update/templates/JsonTemplateManager.java @@ -52,8 +52,7 @@ public class JsonTemplateManager { if (toscaYamlContent != null && !toscaYamlContent.isEmpty()) { this.toscaElements = ToscaElementParser.searchAllToscaElements(toscaYamlContent, nativeToscaDatatypes); this.jsonSchemaTemplates = initializeTemplates(jsonSchemaTemplates); - } - else { + } else { toscaElements = null; } } @@ -111,10 +110,9 @@ public class JsonTemplateManager { if (operation && !this.jsonSchemaTemplates.get(nameTemplate).getJsonTemplateFields().contains(jsonTemplateField)) { this.jsonSchemaTemplates.get(nameTemplate).addField(jsonTemplateField); - } - // Operation = false && field is present => remove Field - else if (!operation + } else if (!operation && this.jsonSchemaTemplates.get(nameTemplate).getJsonTemplateFields().contains(jsonTemplateField)) { + // Operation = false && field is present => remove Field this.jsonSchemaTemplates.get(nameTemplate).removeField(jsonTemplateField); } } @@ -139,8 +137,8 @@ public class JsonTemplateManager { * For a given policy type, get a corresponding JsonObject from the tosca model. * * @param policyType The policy type in the tosca - * @param toscaMetadataParser The MetadataParser class that must be used if metadata section are encountered, if null - * they will be skipped + * @param toscaMetadataParser The MetadataParser class that must be used if metadata section are encountered, + * if null they will be skipped * @return an json object defining the equivalent json schema from the tosca for a given policy type */ public JsonObject getJsonSchemaForPolicyType(String policyType, ToscaMetadataParser toscaMetadataParser, diff --git a/src/main/java/org/onap/clamp/clds/util/ClampVersioning.java b/src/main/java/org/onap/clamp/clds/util/ClampVersioning.java index ec0162cb1..bcdae5e43 100644 --- a/src/main/java/org/onap/clamp/clds/util/ClampVersioning.java +++ b/src/main/java/org/onap/clamp/clds/util/ClampVersioning.java @@ -26,7 +26,6 @@ package org.onap.clamp.clds.util; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; - import java.io.InputStream; import java.util.Properties; diff --git a/src/main/java/org/onap/clamp/clds/util/JsonUtils.java b/src/main/java/org/onap/clamp/clds/util/JsonUtils.java index 8024331f2..fa639a0a1 100644 --- a/src/main/java/org/onap/clamp/clds/util/JsonUtils.java +++ b/src/main/java/org/onap/clamp/clds/util/JsonUtils.java @@ -27,9 +27,7 @@ import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import com.google.gson.Gson; import com.google.gson.GsonBuilder; - import java.time.Instant; - import org.onap.clamp.authorization.SecureServicePermission; import org.onap.clamp.authorization.SecureServicePermissionDeserializer; import org.onap.clamp.dao.model.gson.converter.InstantDeserializer; diff --git a/src/main/java/org/onap/clamp/clds/util/LoggingUtils.java b/src/main/java/org/onap/clamp/clds/util/LoggingUtils.java index 0ac1a14fc..a502a52cb 100644 --- a/src/main/java/org/onap/clamp/clds/util/LoggingUtils.java +++ b/src/main/java/org/onap/clamp/clds/util/LoggingUtils.java @@ -168,9 +168,9 @@ public class LoggingUtils { return dateFormat; } - /********************************************************************************************* + /* ******************************************************************************************* * Method for ONAP Application Logging Specification v1.2 - ********************************************************************************************/ + * *******************************************************************************************/ /** * Report <tt>ENTERING</tt> marker. diff --git a/src/main/java/org/onap/clamp/clds/util/OnapLogConstants.java b/src/main/java/org/onap/clamp/clds/util/OnapLogConstants.java index 8952e5df1..8185b7592 100644 --- a/src/main/java/org/onap/clamp/clds/util/OnapLogConstants.java +++ b/src/main/java/org/onap/clamp/clds/util/OnapLogConstants.java @@ -190,10 +190,10 @@ public final class OnapLogConstants { /** MDC reporting outcome description. */ public static final String RESPONSE_DESCRIPTION = "ResponseDesc"; - /** MDC reporting severity */ + /** MDC reporting severity. */ public static final String RESPONSE_SEVERITY = "Severity"; - /** MDC reporting response status code */ + /** MDC reporting response status code. */ public static final String RESPONSE_STATUS_CODE = "StatusCode"; /** MDC recording error code. */ @@ -267,20 +267,20 @@ public final class OnapLogConstants { ASYNCHRONOUS("ASYNCHRONOUS", Markers.INVOKE_ASYNCHRONOUS); /** Enum value. */ - private String mString; + private String enumValue; /** Corresponding marker. */ - private Marker mMarker; + private Marker marker; /** * Construct enum. * - * @param s enum value. - * @param m corresponding Marker. + * @param enumValue enum value. + * @param marker corresponding Marker. */ - InvocationMode(final String s, final Marker m) { - this.mString = s; - this.mMarker = m; + InvocationMode(final String enumValue, final Marker marker) { + this.enumValue = enumValue; + this.marker = marker; } /** @@ -289,7 +289,7 @@ public final class OnapLogConstants { * @return Marker. */ public Marker getMarker() { - return this.mMarker; + return this.marker; } /** @@ -297,7 +297,7 @@ public final class OnapLogConstants { */ @Override public String toString() { - return this.mString; + return this.enumValue; } } diff --git a/src/main/java/org/onap/clamp/configuration/ClampGsonDataFormat.java b/src/main/java/org/onap/clamp/configuration/ClampGsonDataFormat.java index ca5f37656..3b56772ca 100644 --- a/src/main/java/org/onap/clamp/configuration/ClampGsonDataFormat.java +++ b/src/main/java/org/onap/clamp/configuration/ClampGsonDataFormat.java @@ -23,7 +23,6 @@ package org.onap.clamp.configuration; import com.google.gson.Gson; - import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStream; @@ -32,7 +31,6 @@ import java.io.OutputStream; import java.io.OutputStreamWriter; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; - import org.apache.camel.Exchange; import org.apache.camel.spi.DataFormat; import org.apache.camel.spi.DataFormatName; diff --git a/src/main/java/org/onap/clamp/dao/model/gson/converter/InstantDeserializer.java b/src/main/java/org/onap/clamp/dao/model/gson/converter/InstantDeserializer.java index 2d63e55fa..2c6c47f54 100644 --- a/src/main/java/org/onap/clamp/dao/model/gson/converter/InstantDeserializer.java +++ b/src/main/java/org/onap/clamp/dao/model/gson/converter/InstantDeserializer.java @@ -26,7 +26,6 @@ package org.onap.clamp.dao.model.gson.converter; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; - import java.lang.reflect.Type; import java.time.Instant; import java.time.ZoneId; diff --git a/src/main/java/org/onap/clamp/dao/model/gson/converter/InstantSerializer.java b/src/main/java/org/onap/clamp/dao/model/gson/converter/InstantSerializer.java index cdb439e46..3705f122b 100644 --- a/src/main/java/org/onap/clamp/dao/model/gson/converter/InstantSerializer.java +++ b/src/main/java/org/onap/clamp/dao/model/gson/converter/InstantSerializer.java @@ -27,7 +27,6 @@ import com.google.gson.JsonElement; import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; - import java.lang.reflect.Type; import java.time.Instant; import java.time.format.DateTimeFormatter; diff --git a/src/main/java/org/onap/clamp/dao/model/jsontype/JsonStringSqlTypeDescriptor.java b/src/main/java/org/onap/clamp/dao/model/jsontype/JsonStringSqlTypeDescriptor.java index f5aba4e11..7370e40bf 100644 --- a/src/main/java/org/onap/clamp/dao/model/jsontype/JsonStringSqlTypeDescriptor.java +++ b/src/main/java/org/onap/clamp/dao/model/jsontype/JsonStringSqlTypeDescriptor.java @@ -28,7 +28,6 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; - import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; import org.hibernate.type.descriptor.WrapperOptions; diff --git a/src/main/java/org/onap/clamp/dao/model/jsontype/JsonTypeDescriptor.java b/src/main/java/org/onap/clamp/dao/model/jsontype/JsonTypeDescriptor.java index 518ec2d04..266809401 100644 --- a/src/main/java/org/onap/clamp/dao/model/jsontype/JsonTypeDescriptor.java +++ b/src/main/java/org/onap/clamp/dao/model/jsontype/JsonTypeDescriptor.java @@ -24,9 +24,7 @@ package org.onap.clamp.dao.model.jsontype; import com.google.gson.JsonObject; - import java.io.Serializable; - import org.hibernate.type.descriptor.WrapperOptions; import org.hibernate.type.descriptor.java.AbstractTypeDescriptor; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; diff --git a/src/main/java/org/onap/clamp/dao/model/jsontype/StringJsonUserType.java b/src/main/java/org/onap/clamp/dao/model/jsontype/StringJsonUserType.java index 621fa8dad..509057d16 100644 --- a/src/main/java/org/onap/clamp/dao/model/jsontype/StringJsonUserType.java +++ b/src/main/java/org/onap/clamp/dao/model/jsontype/StringJsonUserType.java @@ -24,7 +24,6 @@ package org.onap.clamp.dao.model.jsontype; import com.google.gson.JsonObject; - import org.hibernate.type.AbstractSingleColumnStandardBasicType; import org.hibernate.type.descriptor.java.JavaTypeDescriptor; import org.hibernate.type.descriptor.sql.SqlTypeDescriptor; diff --git a/src/main/java/org/onap/clamp/loop/CsarInstaller.java b/src/main/java/org/onap/clamp/loop/CsarInstaller.java index 6752a1a36..a1ef612c6 100644 --- a/src/main/java/org/onap/clamp/loop/CsarInstaller.java +++ b/src/main/java/org/onap/clamp/loop/CsarInstaller.java @@ -187,9 +187,9 @@ public class CsarInstaller { loopElementModel.addPolicyModel(newPolicyModel); } else { throw new SdcArtifactInstallerException( - "Unable to find the policy specified in the blueprint " + - blueprintArtifact.getBlueprintArtifactName() + ") on the Policy Engine:" + - microService.getModelType() + "/" + microService.getModelVersion()); + "Unable to find the policy specified in the blueprint " + blueprintArtifact + .getBlueprintArtifactName() + ") on the Policy Engine:" + + microService.getModelType() + "/" + microService.getModelVersion()); } } return newSet; diff --git a/src/main/java/org/onap/clamp/loop/Loop.java b/src/main/java/org/onap/clamp/loop/Loop.java index 36f74221e..9fde19542 100644 --- a/src/main/java/org/onap/clamp/loop/Loop.java +++ b/src/main/java/org/onap/clamp/loop/Loop.java @@ -162,8 +162,7 @@ public class Loop extends AuditEntity implements Serializable { if (LoopElementModel.MICRO_SERVICE_TYPE.equals(element.getLoopElementModel().getLoopElementType())) { this.addMicroServicePolicy((MicroServicePolicy) element.getLoopElementModel() .createPolicyInstance(this, toscaConverter)); - } - else if (LoopElementModel.OPERATIONAL_POLICY_TYPE + } else if (LoopElementModel.OPERATIONAL_POLICY_TYPE .equals(element.getLoopElementModel().getLoopElementType())) { this.addOperationalPolicy((OperationalPolicy) element.getLoopElementModel() .createPolicyInstance(this, toscaConverter)); @@ -381,8 +380,7 @@ public class Loop extends AuditEntity implements Serializable { if (other.name != null) { return false; } - } - else if (!name.equals(other.name)) { + } else if (!name.equals(other.name)) { return false; } return true; diff --git a/src/main/java/org/onap/clamp/loop/LoopsRepository.java b/src/main/java/org/onap/clamp/loop/LoopsRepository.java index aaa49116f..c2ef2fd0e 100644 --- a/src/main/java/org/onap/clamp/loop/LoopsRepository.java +++ b/src/main/java/org/onap/clamp/loop/LoopsRepository.java @@ -24,7 +24,6 @@ package org.onap.clamp.loop; import java.util.List; - import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; diff --git a/src/main/java/org/onap/clamp/loop/cds/CdsDataInstaller.java b/src/main/java/org/onap/clamp/loop/cds/CdsDataInstaller.java index d18cae1d6..4c331b7d0 100644 --- a/src/main/java/org/onap/clamp/loop/cds/CdsDataInstaller.java +++ b/src/main/java/org/onap/clamp/loop/cds/CdsDataInstaller.java @@ -80,8 +80,7 @@ public class CdsDataInstaller { resourcesPropByType.getAsJsonObject(nodeTemplate.getName()) .add(CONTROLLER_PROPERTIES, controllerProperties); logger.info("Successfully installed the CDS data in Service"); - } - else { + } else { logger.warn("Skipping CDS data installation in Service, as sdnc_model_name and " + "sdnc_model_version are not provided in the CSAR"); } diff --git a/src/main/java/org/onap/clamp/loop/common/AuditEntity.java b/src/main/java/org/onap/clamp/loop/common/AuditEntity.java index 7ce12ec6b..d5a1bfc59 100644 --- a/src/main/java/org/onap/clamp/loop/common/AuditEntity.java +++ b/src/main/java/org/onap/clamp/loop/common/AuditEntity.java @@ -74,8 +74,7 @@ public class AuditEntity { public void setCreatedDate(Instant createdDate) { if (createdDate != null) { this.createdDate = createdDate.truncatedTo(ChronoUnit.SECONDS); - } - else { + } else { this.createdDate = null; } } @@ -97,8 +96,7 @@ public class AuditEntity { public void setUpdatedDate(Instant updatedDate) { if (updatedDate != null) { this.updatedDate = updatedDate.truncatedTo(ChronoUnit.SECONDS); - } - else { + } else { this.updatedDate = null; } } diff --git a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java index 8b8547195..d6a061f41 100644 --- a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java +++ b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java @@ -26,12 +26,10 @@ package org.onap.clamp.loop.components.external; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import com.google.gson.JsonObject; - import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.UUID; - import javax.persistence.Transient; import org.apache.camel.Exchange; import org.json.simple.JSONArray; @@ -209,22 +207,37 @@ public class DcaeComponent extends ExternalComponent { if (dcaeResponse == null) { setState(BLUEPRINT_DEPLOYED); - } else if (dcaeResponse.getOperationType().equals("install") && dcaeResponse.getStatus().equals("succeeded")) { - setState(MICROSERVICE_INSTALLED_SUCCESSFULLY); - } else if (dcaeResponse.getOperationType().equals("install") && dcaeResponse.getStatus().equals("processing")) { - setState(PROCESSING_MICROSERVICE_INSTALLATION); - } else if (dcaeResponse.getOperationType().equals("install") && dcaeResponse.getStatus().equals("failed")) { - setState(MICROSERVICE_INSTALLATION_FAILED); - } else if (dcaeResponse.getOperationType().equals("uninstall") - && dcaeResponse.getStatus().equals("succeeded")) { - setState(MICROSERVICE_UNINSTALLED_SUCCESSFULLY); - } else if (dcaeResponse.getOperationType().equals("uninstall") - && dcaeResponse.getStatus().equals("processing")) { - setState(PROCESSING_MICROSERVICE_UNINSTALLATION); - } else if (dcaeResponse.getOperationType().equals("uninstall") && dcaeResponse.getStatus().equals("failed")) { - setState(MICROSERVICE_UNINSTALLATION_FAILED); } else { - setState(IN_ERROR); + if (dcaeResponse.getOperationType().equals("install") && dcaeResponse.getStatus().equals("succeeded")) { + setState(MICROSERVICE_INSTALLED_SUCCESSFULLY); + } else { + if (dcaeResponse.getOperationType().equals("install") && dcaeResponse.getStatus() + .equals("processing")) { + setState(PROCESSING_MICROSERVICE_INSTALLATION); + } else { + if (dcaeResponse.getOperationType().equals("install") && dcaeResponse.getStatus() + .equals("failed")) { + setState(MICROSERVICE_INSTALLATION_FAILED); + } else { + if (dcaeResponse.getOperationType().equals("uninstall") + && dcaeResponse.getStatus().equals("succeeded")) { + setState(MICROSERVICE_UNINSTALLED_SUCCESSFULLY); + } else { + if (dcaeResponse.getOperationType().equals("uninstall") + && dcaeResponse.getStatus().equals("processing")) { + setState(PROCESSING_MICROSERVICE_UNINSTALLATION); + } else { + if (dcaeResponse.getOperationType().equals("uninstall") && dcaeResponse.getStatus() + .equals("failed")) { + setState(MICROSERVICE_UNINSTALLATION_FAILED); + } else { + setState(IN_ERROR); + } + } + } + } + } + } } return this.getState(); } diff --git a/src/main/java/org/onap/clamp/loop/components/external/ExternalComponent.java b/src/main/java/org/onap/clamp/loop/components/external/ExternalComponent.java index 2be707fe4..1cfb93a35 100644 --- a/src/main/java/org/onap/clamp/loop/components/external/ExternalComponent.java +++ b/src/main/java/org/onap/clamp/loop/components/external/ExternalComponent.java @@ -24,7 +24,6 @@ package org.onap.clamp.loop.components.external; import com.google.gson.annotations.Expose; - import org.apache.camel.Exchange; /** diff --git a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java index 4ea5b7118..8a5ff7fc6 100644 --- a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java +++ b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java @@ -75,7 +75,8 @@ public class PolicyComponent extends ExternalComponent { /** * Generates the Json that must be sent to policy to add all policies to Active * PDP group. - * @param loop the loop object + * + * @param loop the loop object * @param action POST (to add policy to group) or DELETE (to delete policy from group) * @return The json, payload to send */ @@ -113,13 +114,11 @@ public class PolicyComponent extends ExternalComponent { if (pdpGroupMap.get(pdpGroup) == null) { pdpSubGroupMap = new HashMap<>(); policyList = new LinkedList<>(); - } - else { + } else { pdpSubGroupMap = pdpGroupMap.get(pdpGroup); if (pdpSubGroupMap.get(pdpSubGroup) == null) { policyList = new LinkedList<>(); - } - else { + } else { policyList = (List<JsonObject>) pdpSubGroupMap.get(pdpSubGroup); } } @@ -162,12 +161,14 @@ public class PolicyComponent extends ExternalComponent { ExternalComponentState newState = NOT_SENT; if (found && deployed) { newState = SENT_AND_DEPLOYED; - } - else if (found) { - newState = SENT; - } - else if (deployed) { - newState = IN_ERROR; + } else { + if (found) { + newState = SENT; + } else { + if (deployed) { + newState = IN_ERROR; + } + } } return newState; } diff --git a/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java b/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java index 65506a479..b00c99c5f 100644 --- a/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java +++ b/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java @@ -63,8 +63,7 @@ public class DcaeDeployParameters { Object defaultValue = ((Map<String, Object>) elem.getValue()).get("default"); if (defaultValue != null) { addPropertyToNode(deployJsonBody, elem.getKey(), defaultValue); - } - else { + } else { deployJsonBody.addProperty(elem.getKey(), ""); } }); @@ -75,17 +74,13 @@ public class DcaeDeployParameters { private static void addPropertyToNode(JsonObject node, String key, Object value) { if (value instanceof String) { node.addProperty(key, (String) value); - } - else if (value instanceof Number) { + } else if (value instanceof Number) { node.addProperty(key, (Number) value); - } - else if (value instanceof Boolean) { + } else if (value instanceof Boolean) { node.addProperty(key, (Boolean) value); - } - else if (value instanceof Character) { + } else if (value instanceof Character) { node.addProperty(key, (Character) value); - } - else { + } else { node.addProperty(key, JsonUtils.GSON.toJson(value)); } } @@ -105,8 +100,7 @@ public class DcaeDeployParameters { generateDcaeDeployParameter(loop.getLoopTemplate().getBlueprint(), ((MicroServicePolicy) loop.getMicroServicePolicies().toArray()[0]).getName())); - } - else { + } else { LinkedHashMap<String, JsonObject> deploymentParamMap = init(loop); for (Map.Entry<String, JsonObject> mapElement : deploymentParamMap.entrySet()) { deployParamJson.add(mapElement.getKey(), mapElement.getValue()); diff --git a/src/main/java/org/onap/clamp/loop/log/LoopLog.java b/src/main/java/org/onap/clamp/loop/log/LoopLog.java index e49598879..ad3c7970f 100644 --- a/src/main/java/org/onap/clamp/loop/log/LoopLog.java +++ b/src/main/java/org/onap/clamp/loop/log/LoopLog.java @@ -24,11 +24,9 @@ package org.onap.clamp.loop.log; import com.google.gson.annotations.Expose; - import java.io.Serializable; import java.time.Instant; import java.time.temporal.ChronoUnit; - import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; @@ -40,7 +38,6 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; - import org.onap.clamp.loop.Loop; /** diff --git a/src/main/java/org/onap/clamp/loop/service/Service.java b/src/main/java/org/onap/clamp/loop/service/Service.java index 338032a16..2ac9d7e87 100644 --- a/src/main/java/org/onap/clamp/loop/service/Service.java +++ b/src/main/java/org/onap/clamp/loop/service/Service.java @@ -158,9 +158,10 @@ public class Service implements Serializable { if (other.serviceUuid != null) { return false; } - } - else if (!serviceUuid.equals(other.serviceUuid)) { - return false; + } else { + if (!serviceUuid.equals(other.serviceUuid)) { + return false; + } } return true; } diff --git a/src/main/java/org/onap/clamp/loop/template/LoopElementModel.java b/src/main/java/org/onap/clamp/loop/template/LoopElementModel.java index 70cdbe233..f210df949 100644 --- a/src/main/java/org/onap/clamp/loop/template/LoopElementModel.java +++ b/src/main/java/org/onap/clamp/loop/template/LoopElementModel.java @@ -212,7 +212,7 @@ public class LoopElementModel extends AuditEntity implements Serializable { } /** - * @param shortName the shortName to set. + * * @param shortName the shortName to set. */ public void setShortName(String shortName) { this.shortName = shortName; @@ -255,11 +255,9 @@ public class LoopElementModel extends AuditEntity implements Serializable { public Policy createPolicyInstance(Loop loop, ToscaConverterWithDictionarySupport toscaConverter) { if (LoopElementModel.MICRO_SERVICE_TYPE.equals(this.getLoopElementType())) { return new MicroServicePolicy(loop, loop.getModelService(), this, toscaConverter); - } - else if (LoopElementModel.OPERATIONAL_POLICY_TYPE.equals(this.getLoopElementType())) { + } else if (LoopElementModel.OPERATIONAL_POLICY_TYPE.equals(this.getLoopElementType())) { return new OperationalPolicy(loop, loop.getModelService(), this, toscaConverter); - } - else { + } else { return null; } } @@ -288,8 +286,7 @@ public class LoopElementModel extends AuditEntity implements Serializable { if (other.name != null) { return false; } - } - else if (!name.equals(other.name)) { + } else if (!name.equals(other.name)) { return false; } return true; diff --git a/src/main/java/org/onap/clamp/loop/template/LoopTemplate.java b/src/main/java/org/onap/clamp/loop/template/LoopTemplate.java index 6f896f3d4..1204c6c62 100644 --- a/src/main/java/org/onap/clamp/loop/template/LoopTemplate.java +++ b/src/main/java/org/onap/clamp/loop/template/LoopTemplate.java @@ -223,7 +223,7 @@ public class LoopTemplate extends AuditEntity implements Serializable { * @param loopElementModel The loopElementModel to add */ public void addLoopElementModel(LoopElementModel loopElementModel) { - this.addLoopElementModel(loopElementModel,this.loopElementModelsUsed.size()); + this.addLoopElementModel(loopElementModel, this.loopElementModelsUsed.size()); } /** diff --git a/src/main/java/org/onap/clamp/loop/template/LoopTemplateLoopElementModel.java b/src/main/java/org/onap/clamp/loop/template/LoopTemplateLoopElementModel.java index aca16bc04..36fc3fb1d 100644 --- a/src/main/java/org/onap/clamp/loop/template/LoopTemplateLoopElementModel.java +++ b/src/main/java/org/onap/clamp/loop/template/LoopTemplateLoopElementModel.java @@ -24,9 +24,7 @@ package org.onap.clamp.loop.template; import com.google.gson.annotations.Expose; - import java.io.Serializable; - import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.EmbeddedId; diff --git a/src/main/java/org/onap/clamp/loop/template/LoopTemplatesRepository.java b/src/main/java/org/onap/clamp/loop/template/LoopTemplatesRepository.java index 07f304de7..c647c261a 100644 --- a/src/main/java/org/onap/clamp/loop/template/LoopTemplatesRepository.java +++ b/src/main/java/org/onap/clamp/loop/template/LoopTemplatesRepository.java @@ -24,7 +24,6 @@ package org.onap.clamp.loop.template; import java.util.List; - import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModelId.java b/src/main/java/org/onap/clamp/loop/template/PolicyModelId.java index c4dd1933b..3fd19171f 100644 --- a/src/main/java/org/onap/clamp/loop/template/PolicyModelId.java +++ b/src/main/java/org/onap/clamp/loop/template/PolicyModelId.java @@ -24,7 +24,6 @@ package org.onap.clamp.loop.template; import com.google.gson.annotations.Expose; - import java.io.Serializable; public class PolicyModelId implements Serializable { diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModelsRepository.java b/src/main/java/org/onap/clamp/loop/template/PolicyModelsRepository.java index a76e386b5..f4b09caeb 100644 --- a/src/main/java/org/onap/clamp/loop/template/PolicyModelsRepository.java +++ b/src/main/java/org/onap/clamp/loop/template/PolicyModelsRepository.java @@ -24,7 +24,6 @@ package org.onap.clamp.loop.template; import java.util.List; - import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java b/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java index 17cf5c1c8..c482c34d5 100644 --- a/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java +++ b/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java @@ -142,7 +142,7 @@ public class PolicyModelsService { */ @Transactional(propagation = Propagation.REQUIRES_NEW) public PolicyModel savePolicyModelInNewTransaction(PolicyModel policyModel) { - return policyModelsRepository.saveAndFlush(policyModel); + return policyModelsRepository.saveAndFlush(policyModel); } /** diff --git a/src/main/java/org/onap/clamp/policy/PolicyService.java b/src/main/java/org/onap/clamp/policy/PolicyService.java index ae15f86da..ad092b516 100644 --- a/src/main/java/org/onap/clamp/policy/PolicyService.java +++ b/src/main/java/org/onap/clamp/policy/PolicyService.java @@ -25,7 +25,6 @@ package org.onap.clamp.policy; import java.util.List; import java.util.Set; - import org.onap.clamp.loop.Loop; public interface PolicyService<T extends Policy> { diff --git a/src/main/java/org/onap/clamp/policy/downloader/PolicyEngineController.java b/src/main/java/org/onap/clamp/policy/downloader/PolicyEngineController.java index 0c3f677a1..b9777029a 100644 --- a/src/main/java/org/onap/clamp/policy/downloader/PolicyEngineController.java +++ b/src/main/java/org/onap/clamp/policy/downloader/PolicyEngineController.java @@ -25,9 +25,7 @@ package org.onap.clamp.policy.downloader; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; - import java.time.Instant; - import org.json.simple.parser.ParseException; import org.onap.clamp.clds.client.PolicyEngineServices; import org.onap.clamp.loop.template.PolicyModelsRepository; diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java index 77627a31a..a654edab9 100644 --- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java +++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java @@ -267,8 +267,7 @@ public class MicroServicePolicy extends Policy implements Serializable { if (other.name != null) { return false; } - } - else if (!name.equals(other.name)) { + } else if (!name.equals(other.name)) { return false; } return true; diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java index 0381f0a2a..9bae7bd04 100644 --- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java +++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java @@ -29,12 +29,10 @@ import com.att.eelf.configuration.EELFManager; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; - import java.io.IOException; import java.util.Map; import java.util.Map.Entry; import java.util.Set; - import org.onap.clamp.clds.util.JsonUtils; import org.onap.clamp.clds.util.ResourceFileUtils; import org.onap.clamp.loop.service.Service; @@ -57,7 +55,7 @@ public class OperationalPolicyRepresentationBuilder { public static final String TYPE_ARRAY = "array"; private OperationalPolicyRepresentationBuilder() { - throw new IllegalStateException("This is Utility class, not supposed to be initiated."); + throw new IllegalStateException("This is Utility class, not supposed to be initiated."); } /** @@ -282,7 +280,7 @@ public class OperationalPolicyRepresentationBuilder { jsonObject.add("artifact_version", createSchemaProperty( "artifact version", STRING, artifactVersion, "True", null)); jsonObject.add("mode", createCdsInputProperty( - "mode", STRING, "async" ,null)); + "mode", STRING, "async", null)); jsonObject.add("data", createDataProperty(inputs, workFlowName)); return jsonObject; } @@ -308,7 +306,7 @@ public class OperationalPolicyRepresentationBuilder { dataObj, workFlowName); } else { dataObj.add(entry.getKey(), - createCdsInputProperty(key, inputProperty.get(TYPE).getAsString(),null, + createCdsInputProperty(key, inputProperty.get(TYPE).getAsString(), null, entry.getValue().getAsJsonObject())); } } diff --git a/src/main/java/org/onap/clamp/policy/pdpgroup/PdpGroup.java b/src/main/java/org/onap/clamp/policy/pdpgroup/PdpGroup.java index a3cf4e053..6a070c550 100644 --- a/src/main/java/org/onap/clamp/policy/pdpgroup/PdpGroup.java +++ b/src/main/java/org/onap/clamp/policy/pdpgroup/PdpGroup.java @@ -26,7 +26,6 @@ package org.onap.clamp.policy.pdpgroup; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.annotations.Expose; - import java.util.List; /** diff --git a/src/main/java/org/onap/clamp/policy/pdpgroup/PolicyModelKey.java b/src/main/java/org/onap/clamp/policy/pdpgroup/PolicyModelKey.java index 707b3bd2f..6d9343dc5 100644 --- a/src/main/java/org/onap/clamp/policy/pdpgroup/PolicyModelKey.java +++ b/src/main/java/org/onap/clamp/policy/pdpgroup/PolicyModelKey.java @@ -24,7 +24,6 @@ package org.onap.clamp.policy.pdpgroup; import com.google.gson.annotations.Expose; - import java.io.Serializable; public class PolicyModelKey implements Serializable { |