summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-06-19 10:14:45 +0100
committerliamfallon <liam.fallon@est.tech>2020-06-19 10:17:21 +0100
commit379075d6195eb100a97024fbd2cabaaf8f8bc17d (patch)
tree62494ad8274c7bfb1b1d93a48d8cd8d8c7365e66 /main
parent39264f69609078b6caa193497688520c1df784e4 (diff)
Changes for Checkstyle 8.32
Issue-ID: POLICY-2188 Change-Id: I8765849462cd866f2a3049a5a4a02bce17330e66 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java34
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java10
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/provider/CommonModelProvider.java2
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java1
-rw-r--r--main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java1
-rw-r--r--main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java1
-rw-r--r--main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterHandler.java1
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java2
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/TestCommonRestController.java2
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/TestStatisticsReport.java1
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/provider/TestLegacyOperationalPolicyProvider.java1
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java1
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java1
13 files changed, 22 insertions, 36 deletions
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java b/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
index 7661c273..79d8a64a 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
@@ -37,9 +37,7 @@ import io.swagger.annotations.Info;
import io.swagger.annotations.ResponseHeader;
import io.swagger.annotations.SecurityDefinition;
import io.swagger.annotations.SwaggerDefinition;
-
import java.util.UUID;
-
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
@@ -51,7 +49,6 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
-
import org.onap.policy.api.main.rest.provider.HealthCheckProvider;
import org.onap.policy.api.main.rest.provider.PolicyProvider;
import org.onap.policy.api.main.rest.provider.PolicyTypeProvider;
@@ -115,7 +112,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"HealthCheck",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"HealthCheck", },
extensions = {
@Extension(name = "interface info", properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -152,7 +149,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Statistics",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Statistics", },
extensions = {
@Extension(name = "interface info", properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -190,7 +187,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType", },
extensions = {
@Extension(name = "interface info", properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -236,7 +233,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType", },
extensions = {
@Extension(name = "interface info", properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -284,7 +281,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType", },
extensions = {
@Extension(name = "interface info", properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -332,7 +329,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType", },
extensions = {
@Extension(name = "interface info", properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -365,7 +362,7 @@ public class ApiRestController extends CommonRestController {
@POST
@Path("/policytypes")
@ApiOperation(value = "Create a new policy type", notes = "Client should provide TOSCA body of the new policy type",
- authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType", },
response = ToscaServiceTemplate.class,
responseHeaders = {
@ResponseHeader(name = "X-MinorVersion",
@@ -421,7 +418,7 @@ public class ApiRestController extends CommonRestController {
notes = "Rule 1: pre-defined policy types cannot be deleted;"
+ "Rule 2: policy types that are in use (parameterized by a TOSCA policy) cannot be deleted."
+ "The parameterizing TOSCA policies must be deleted first;",
- authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType", },
response = ToscaServiceTemplate.class,
responseHeaders = {
@ResponseHeader(name = "X-MinorVersion",
@@ -549,7 +546,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Policy", },
extensions = {
@Extension(name = "interface info", properties = {
@ExtensionProperty(name = "api-version", value = "1.0.0"),
@@ -614,7 +611,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Policy", },
extensions = {
@Extension(name = "interface info", properties = {
@ExtensionProperty(name = "api-version", value = "1.0.0"),
@@ -678,7 +675,7 @@ public class ApiRestController extends CommonRestController {
response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Policy", },
extensions = {
@Extension(name = "interface info", properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -721,7 +718,8 @@ public class ApiRestController extends CommonRestController {
@Path("/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies")
@ApiOperation(value = "Create a new policy for a policy type version",
notes = "Client should provide TOSCA body of the new policy",
- authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",}, response = ToscaServiceTemplate.class,
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Policy", },
+ response = ToscaServiceTemplate.class,
responseHeaders = {
@ResponseHeader(name = "X-MinorVersion",
description = "Used to request or communicate a MINOR version back from the client"
@@ -778,7 +776,8 @@ public class ApiRestController extends CommonRestController {
@Path("/policies")
@ApiOperation(value = "Create one or more new policies",
notes = "Client should provide TOSCA body of the new polic(ies)",
- authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",}, response = ToscaServiceTemplate.class,
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Policy", },
+ response = ToscaServiceTemplate.class,
responseHeaders = {
@ResponseHeader(name = "X-MinorVersion",
description = "Used to request or communicate a MINOR version back from the client"
@@ -834,7 +833,8 @@ public class ApiRestController extends CommonRestController {
@Path("/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}")
@ApiOperation(value = "Delete a particular version of a policy",
notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",
- authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",}, response = ToscaServiceTemplate.class,
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Policy", },
+ response = ToscaServiceTemplate.class,
responseHeaders = {
@ResponseHeader(name = "X-MinorVersion",
description = "Used to request or communicate a MINOR version back from the client"
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java b/main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java
index 0fcf985d..ccbe3b47 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java
@@ -93,7 +93,7 @@ public class LegacyApiRestController extends CommonRestController {
description = "Used only to communicate an API's latest version", response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy", },
extensions = {@Extension(name = "interface info",
properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -143,7 +143,7 @@ public class LegacyApiRestController extends CommonRestController {
description = "Used only to communicate an API's latest version", response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy", },
extensions = {@Extension(name = "interface info",
properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -193,7 +193,7 @@ public class LegacyApiRestController extends CommonRestController {
description = "Used only to communicate an API's latest version", response = String.class),
@ResponseHeader(name = "X-ONAP-RequestID",
description = "Used to track REST transactions for logging purpose", response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy", },
extensions = {@Extension(name = "interface info",
properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),
@ExtensionProperty(name = "last-mod-release", value = "Dublin")})})
@@ -227,7 +227,7 @@ public class LegacyApiRestController extends CommonRestController {
@Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies")
@ApiOperation(value = "Create a new operational policy",
notes = "Client should provide entity body of the new operational policy",
- authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy", },
response = LegacyOperationalPolicy.class,
responseHeaders = {
@ResponseHeader(name = "X-MinorVersion",
@@ -290,7 +290,7 @@ public class LegacyApiRestController extends CommonRestController {
+ "policies/{policyId}/versions/{policyVersion}")
@ApiOperation(value = "Delete a particular version of a specified operational policy",
notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",
- authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy",},
+ authorizations = @Authorization(value = "basicAuth"), tags = {"Legacy Operational Policy", },
response = LegacyOperationalPolicy.class,
responseHeaders = {
@ResponseHeader(name = "X-MinorVersion",
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/provider/CommonModelProvider.java b/main/src/main/java/org/onap/policy/api/main/rest/provider/CommonModelProvider.java
index db864d7a..03f46b9e 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/provider/CommonModelProvider.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/provider/CommonModelProvider.java
@@ -28,9 +28,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
-
import javax.ws.rs.core.Response;
-
import org.apache.commons.lang3.tuple.Pair;
import org.onap.policy.api.main.parameters.ApiParameterGroup;
import org.onap.policy.common.parameters.ParameterService;
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java b/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java
index a433e02c..11a6f2dc 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java
@@ -26,7 +26,6 @@ package org.onap.policy.api.main.rest.provider;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-
import org.apache.commons.lang3.tuple.Pair;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelException;
diff --git a/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java b/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java
index a7c36006..8073f7cd 100644
--- a/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java
+++ b/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java
@@ -25,7 +25,6 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
import java.util.Arrays;
-
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
diff --git a/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java b/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java
index 45653883..74562260 100644
--- a/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java
+++ b/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java
@@ -28,7 +28,6 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.Collections;
-
import org.junit.Test;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.parameters.GroupValidationResult;
diff --git a/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterHandler.java b/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterHandler.java
index 9cc09f60..34379085 100644
--- a/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterHandler.java
+++ b/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterHandler.java
@@ -28,7 +28,6 @@ import static org.junit.Assert.fail;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
-
import org.junit.Test;
import org.onap.policy.api.main.exception.PolicyApiException;
import org.onap.policy.api.main.startstop.ApiCommandLineArguments;
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java b/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
index c3c81f6b..2f794fd7 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
@@ -39,7 +39,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Properties;
-
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.ws.rs.client.Client;
@@ -48,7 +47,6 @@ import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
-
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.junit.AfterClass;
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/TestCommonRestController.java b/main/src/test/java/org/onap/policy/api/main/rest/TestCommonRestController.java
index 62bd0c37..68377003 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/TestCommonRestController.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/TestCommonRestController.java
@@ -27,10 +27,8 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.util.UUID;
-
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
-
import org.junit.Test;
/**
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/TestStatisticsReport.java b/main/src/test/java/org/onap/policy/api/main/rest/TestStatisticsReport.java
index e65a8c88..01d5a9c5 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/TestStatisticsReport.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/TestStatisticsReport.java
@@ -28,7 +28,6 @@ import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-
import org.junit.Test;
import org.onap.policy.common.utils.test.ToStringTester;
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestLegacyOperationalPolicyProvider.java b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestLegacyOperationalPolicyProvider.java
index 90ff2f04..bb4eca95 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestLegacyOperationalPolicyProvider.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestLegacyOperationalPolicyProvider.java
@@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.Base64;
import java.util.Collections;
import java.util.List;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
index 0fcedbeb..23257e34 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
@@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.Base64;
import java.util.Collections;
import java.util.List;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java
index 58d4230c..73daf95e 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java
@@ -30,7 +30,6 @@ import static org.junit.Assert.assertNotNull;
import java.util.Base64;
import java.util.Collections;
-
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;