From c19601d2080baa401cd17286985b6a0ee47d9a07 Mon Sep 17 00:00:00 2001 From: "saul.gill" Date: Tue, 29 Jun 2021 12:57:29 +0100 Subject: Added ITs for Commissioning Camel Endpoints Changed emulator to deal with new endpoint tests Added spring property to deal with camel endpoint issue Fixed lingering checkstyle violations Issue-ID: POLICY-3440 Change-Id: I5810913c4418e7893f3ad848618deec1b1a85a0f Signed-off-by: saul.gill --- .../org/onap/policy/clamp/clds/Application.java | 12 +-- .../clamp/loop/template/LoopElementModel.java | 111 +-------------------- .../org/onap/policy/clamp/tosca/Dictionary.java | 4 +- 3 files changed, 12 insertions(+), 115 deletions(-) (limited to 'runtime/src/main/java/org') diff --git a/runtime/src/main/java/org/onap/policy/clamp/clds/Application.java b/runtime/src/main/java/org/onap/policy/clamp/clds/Application.java index bdab9c9a2..aad678bf7 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/clds/Application.java +++ b/runtime/src/main/java/org/onap/policy/clamp/clds/Application.java @@ -121,8 +121,8 @@ public class Application extends SpringBootServletInitializer { @Bean public ServletRegistrationBean camelServletRegistrationBean() throws IOException { eelfLogger.info(ResourceFileUtils.getResourceAsString("boot-message.txt") + "(v" - + ClampVersioning.getCldsVersionFromProps() + ")" + System.getProperty("line.separator") - + getSslExpirationDate()); + + ClampVersioning.getCldsVersionFromProps() + ")" + System.getProperty("line.separator") + + getSslExpirationDate()); var registration = new ServletRegistrationBean(new ClampServlet(), "/restservices/clds/*"); registration.setName("CamelServlet"); return registration; @@ -150,7 +150,7 @@ public class Application extends SpringBootServletInitializer { private Connector createRedirectConnector(int redirectSecuredPort) { if (redirectSecuredPort <= 0) { eelfLogger.warn("HTTP port redirection to HTTPS is disabled because the HTTPS port is 0 (random port) or -1" - + " (Connector disabled)"); + + " (Connector disabled)"); return null; } var connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); @@ -167,15 +167,15 @@ public class Application extends SpringBootServletInitializer { if (keystoreFile != null) { var keystore = KeyStore.getInstance(keyStoreType); keystore.load(ResourceFileUtils.getResourceAsStream(keystoreFile.replace("classpath:", "")), - PassDecoder.decode(keyStorePass, keyFile).toCharArray()); + PassDecoder.decode(keyStorePass, keyFile).toCharArray()); Enumeration aliases = keystore.aliases(); while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); if ("X.509".equals(keystore.getCertificate(alias).getType())) { result.append("* " + alias + " expires " - + ((X509Certificate) keystore.getCertificate(alias)).getNotAfter() - + System.getProperty("line.separator")); + + ((X509Certificate) keystore.getCertificate(alias)).getNotAfter() + + System.getProperty("line.separator")); } } } else { diff --git a/runtime/src/main/java/org/onap/policy/clamp/loop/template/LoopElementModel.java b/runtime/src/main/java/org/onap/policy/clamp/loop/template/LoopElementModel.java index 52f1c5d23..f1ab35722 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/loop/template/LoopElementModel.java +++ b/runtime/src/main/java/org/onap/policy/clamp/loop/template/LoopElementModel.java @@ -40,6 +40,8 @@ import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OneToMany; import javax.persistence.Table; +import lombok.Getter; +import lombok.Setter; import org.hibernate.annotations.SortNatural; import org.onap.policy.clamp.clds.tosca.update.ToscaConverterWithDictionarySupport; import org.onap.policy.clamp.loop.Loop; @@ -52,7 +54,8 @@ import org.onap.policy.clamp.policy.operational.OperationalPolicy; * This class represents a micro service/operational/... model for a loop template. * So it's an element in the flow (a box shown in the loop). */ - +@Getter +@Setter @Entity @Table(name = "loop_element_models") public class LoopElementModel extends AuditEntity implements Serializable { @@ -112,15 +115,6 @@ public class LoopElementModel extends AuditEntity implements Serializable { @OneToMany(fetch = FetchType.LAZY, mappedBy = "loopElementModel", orphanRemoval = true) private Set usedByLoopTemplates = new HashSet<>(); - /** - * policyModels getter. - * - * @return the policyModel - */ - public SortedSet getPolicyModels() { - return policyModels; - } - /** * Method to add a new policyModel to the list. * @@ -131,103 +125,6 @@ public class LoopElementModel extends AuditEntity implements Serializable { policyModel.getUsedByElementModels().add(this); } - /** - * name getter. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * name setter. - * - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * blueprint getter. - * - * @return the blueprint - */ - public String getBlueprint() { - return blueprint; - } - - /** - * blueprint setter. - * - * @param blueprint the blueprint to set - */ - public void setBlueprint(String blueprint) { - this.blueprint = blueprint; - } - - /** - * dcaeBlueprintId getter. - * - * @return the dcaeBlueprintId - */ - public String getDcaeBlueprintId() { - return dcaeBlueprintId; - } - - /** - * dcaeBlueprintId setter. - * - * @param dcaeBlueprintId the dcaeBlueprintId to set - */ - public void setDcaeBlueprintId(String dcaeBlueprintId) { - this.dcaeBlueprintId = dcaeBlueprintId; - } - - /** - * loopElementType getter. - * - * @return the loopElementType - */ - public String getLoopElementType() { - return loopElementType; - } - - /** - * loopElementType setter. - * - * @param loopElementType the loopElementType to set - */ - public void setLoopElementType(String loopElementType) { - this.loopElementType = loopElementType; - } - - /** - * shortName getter. - * - * @return the shortName - */ - public String getShortName() { - return shortName; - } - - /** - * * @param shortName the shortName to set. - */ - public void setShortName(String shortName) { - this.shortName = shortName; - } - - /** - * usedByLoopTemplates getter. - * - * @return the usedByLoopTemplates - */ - public Set getUsedByLoopTemplates() { - return usedByLoopTemplates; - } - /** * Default constructor for serialization. */ diff --git a/runtime/src/main/java/org/onap/policy/clamp/tosca/Dictionary.java b/runtime/src/main/java/org/onap/policy/clamp/tosca/Dictionary.java index 40ea25ff8..da6454a44 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/tosca/Dictionary.java +++ b/runtime/src/main/java/org/onap/policy/clamp/tosca/Dictionary.java @@ -177,9 +177,9 @@ public class Dictionary extends AuditEntity implements Serializable { /** * Constructor. * - * @param name The Dictionary name + * @param name The Dictionary name * @param secondLevelDictionary defines if dictionary is a secondary level - * @param subDictionaryType defines the type of secondary level dictionary + * @param subDictionaryType defines the type of secondary level dictionary */ public Dictionary(String name, int secondLevelDictionary, String subDictionaryType) { this.name = name; -- cgit 1.2.3-korg