Fix checkstyle warnings in the client module 73/60273/5
authorDinh Danh Le <dinh.danh.le@ericsson.com>
Mon, 13 Aug 2018 10:20:21 +0000 (11:20 +0100)
committerDinh Danh Le <dinh.danh.le@ericsson.com>
Tue, 14 Aug 2018 11:27:52 +0000 (12:27 +0100)
Change-Id: I3263a833cc9dd6d86afdf2ae53de0e53c92850c9
Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com>
Issue-ID: POLICY-1034

41 files changed:
client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRest.java
client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestMain.java
client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestParameterException.java
client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestParameterParser.java
client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestParameters.java
client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestResource.java
client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ParameterCheck.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorException.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorMain.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameterException.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorRestResource.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/RestUtils.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanContextAlbum.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanContextSchema.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanEvent.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanKeyRef.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanLogic.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanModel.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanPolicy.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanStateTaskRef.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanTask.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/bean/BeanTaskParameter.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/package-info.java
client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorRestResource.java
client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestApexEditorStartup.java
client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/TestExceptions.java
client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/BeanFake.java
client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/bean/TestBeans.java
client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRest.java
client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java
client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestParameterException.java
client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestParameterParser.java
client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestParameters.java
client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ParameterCheck.java
client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRest.java
client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java
client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterException.java
client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java
client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameters.java
client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java

index b6ed37d..1fb7a22 100644 (file)
@@ -29,7 +29,8 @@ import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
 
 /**
- * This class is used to launch the services. It creates a Grizzly embedded web server and runs the services.
+ * This class is used to launch the services. It creates a Grizzly embedded web server and runs the
+ * services.
  */
 public class ApexDeploymentRest {
     // Logger for this class
@@ -39,16 +40,17 @@ public class ApexDeploymentRest {
     private HttpServer server;
 
     /**
-     * Starts the HTTP server for the Apex services client on the default base URI and with the default REST packages
+     * Starts the HTTP server for the Apex services client on the default base URI and with the
+     * default REST packages.
      */
     public ApexDeploymentRest() {
         this(new ApexDeploymentRestParameters());
     }
 
     /**
-     * Starts the HTTP server for the Apex services client
+     * Starts the HTTP server for the Apex services client.
      *
-     * @param parameters: The Apex parameters to use to start the server
+     * @param parameters The Apex parameters to use to start the server
      */
     public ApexDeploymentRest(final ApexDeploymentRestParameters parameters) {
         Assertions.argumentNotNull(parameters, "parameters may not be null");
@@ -74,7 +76,7 @@ public class ApexDeploymentRest {
     }
 
     /**
-     * Shut down the web server
+     * Shut down the web server.
      */
     public void shutdown() {
         logger.debug("Apex services RESTful client shutting down . . .");
index 6e72204..a0e6641 100644 (file)
@@ -23,13 +23,15 @@ package org.onap.policy.apex.client.deployment.rest;
 import java.io.PrintStream;
 
 /**
- * User: ewatkmi Date: 31 Jul 2017
+ * The main class for ApexDeploymentRest.
+ *
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexDeploymentRestMain {
     // Services state
     public enum ServicesState {
         STOPPED, READY, INITIALIZING, RUNNING
-    };
+    }
 
     private ServicesState state = ServicesState.STOPPED;
 
@@ -43,7 +45,7 @@ public class ApexDeploymentRestMain {
     private ApexDeploymentRest apexDeploymentRest = null;
 
     /**
-     * Main method, main entry point for command
+     * Main method, main entry point for command.
      *
      * @param args The command line arguments for the client
      */
@@ -57,7 +59,7 @@ public class ApexDeploymentRestMain {
     }
 
     /**
-     * Constructor, kicks off the rest service
+     * Constructor, kicks off the rest service.
      *
      * @param args The command line arguments for the RESTful service
      * @param outStream The stream for output messages
@@ -95,7 +97,7 @@ public class ApexDeploymentRestMain {
     }
 
     /**
-     * Initialize the rest service
+     * Initialize the rest service.
      */
     public void init() {
         outStream.println("Apex Services REST endpoint (" + this.toString() + ") starting at "
@@ -161,7 +163,7 @@ public class ApexDeploymentRestMain {
     }
 
     /**
-     * Explicitly shut down the services
+     * Explicitly shut down the services.
      */
     public void shutdown() {
         if (apexDeploymentRest != null) {
@@ -173,7 +175,7 @@ public class ApexDeploymentRestMain {
     }
 
     /**
-     * This class is a shutdown hook for the Apex services command
+     * This class is a shutdown hook for the Apex services command.
      */
     private class ApexServicesShutdownHook implements Runnable {
         /*
index 87785b7..325128d 100644 (file)
@@ -23,13 +23,13 @@ package org.onap.policy.apex.client.deployment.rest;
 /**
  * A run time exception used to report parsing and parameter input errors.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexDeploymentRestParameterException extends IllegalArgumentException {
     private static final long serialVersionUID = 6520231162404452427L;
 
     /**
-     * Create an ApexServicesRestParameterException with a message
+     * Create an ApexServicesRestParameterException with a message.
      *
      * @param message the message
      */
index 35ad9cd..564be43 100644 (file)
@@ -32,16 +32,16 @@ import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 
 /**
- * This class reads and handles command line parameters to the Apex RESTful services
+ * This class reads and handles command line parameters to the Apex RESTful services.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexDeploymentRestParameterParser {
     // Apache Commons CLI options
     Options options;
 
     /**
-     * Construct the options for the CLI RESTful services
+     * Construct the options for the CLI RESTful services.
      */
     public ApexDeploymentRestParameterParser() {
         options = new Options();
@@ -54,7 +54,7 @@ public class ApexDeploymentRestParameterParser {
     }
 
     /**
-     * Parse the command line options
+     * Parse the command line options.
      *
      * @param args the arguments
      * @return the parsed arguments
@@ -99,7 +99,7 @@ public class ApexDeploymentRestParameterParser {
     }
 
     /**
-     * Get help information
+     * Get help information.
      *
      * @param mainClassName the main class name for the help output
      * @return help string
index 952492f..af8cc5a 100644 (file)
@@ -23,9 +23,9 @@ package org.onap.policy.apex.client.deployment.rest;
 import java.net.URI;
 
 /**
- * This class reads and handles command line parameters to the Apex RESTful services
+ * This class reads and handles command line parameters to the Apex RESTful services.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexDeploymentRestParameters {
     public static final int DEFAULT_REST_PORT = 18989;
index 810b59c..13192aa 100644 (file)
@@ -42,11 +42,12 @@ import org.slf4j.ext.XLoggerFactory;
 
 /**
  * The class represents the root resource exposed at the base URL<br>
- * The url to access this resource would be in the form {@code <baseURL>/rest/....} <br>
+ *
+ * <p>The url to access this resource would be in the form {@code <baseURL>/rest/....} <br>
  * For example: a GET request to the following URL
  * {@code http://localhost:18989/apexservices/rest/?hostName=localhost&port=12345}
  *
- * <b>Note:</b> An allocated {@code hostName} and {@code port} query parameter must be included in all requests.
+ * <p><b>Note:</b> An allocated {@code hostName} and {@code port} query parameter must be included in all requests.
  * Datasets for different {@code hostName} are completely isolated from one another.
  *
  */
@@ -64,7 +65,7 @@ public class ApexDeploymentRestResource {
     public ApexDeploymentRestResource() {}
 
     /**
-     * Query the engine service for data
+     * Query the engine service for data.
      *
      * @param hostName the host name of the engine service to connect to.
      * @param port the port number of the engine service to connect to.
index 87e76cd..50117e5 100644 (file)
@@ -40,7 +40,7 @@ public final class ParameterCheck {
     private ParameterCheck() {}
 
     /**
-     * The Enum StartStop is used to hold .
+     * The Enum StartStop is used to hold.
      *
      * @author Liam Fallon (liam.fallon@ericsson.com)
      */
@@ -49,7 +49,7 @@ public final class ParameterCheck {
         START,
         /** Stop of an Apex engine has been ordered. */
         STOP
-    };
+    }
 
     private static final XLogger LOGGER = XLoggerFactory.getXLogger(ParameterCheck.class);
 
index b674e60..18dcc9f 100644 (file)
@@ -53,21 +53,21 @@ public class ApexEditorException extends ApexException {
      * Instantiates a new apex editor exception.
      *
      * @param message the message on the exception
-     * @param e the exception that caused this Apex exception
+     * @param ex the exception that caused this Apex exception
      */
-    public ApexEditorException(final String message, final Exception e) {
-        super(message, e);
+    public ApexEditorException(final String message, final Exception ex) {
+        super(message, ex);
     }
 
     /**
      * Instantiates a new apex editor exception.
      *
      * @param message the message on the exception
-     * @param e the exception that caused this Apex exception
+     * @param ex the exception that caused this Apex exception
      * @param object the object that the exception was thrown on
      */
-    public ApexEditorException(final String message, final Exception e, final Object object) {
-        super(message, e, object);
+    public ApexEditorException(final String message, final Exception ex, final Object object) {
+        super(message, ex, object);
     }
 
 }
index ee7199f..0fa8011 100644 (file)
@@ -40,7 +40,7 @@ public class ApexEditorMain {
         INITIALIZING,
         /** The editor is running. */
         RUNNING
-    };
+    }
 
     private static final int EDITOR_RNNING_CHECK_TIMEOUT = 1000;
 
index 921b4c0..0ba12de 100644 (file)
@@ -41,9 +41,9 @@ public class ApexEditorParameterException extends IllegalArgumentException {
      * Create an ApexEditorParameterException with a message and an exception.
      *
      * @param message the message
-     * @param t the t
+     * @param th the Throwable instance
      */
-    public ApexEditorParameterException(final String message, final Throwable t) {
-        super(message, t);
+    public ApexEditorParameterException(final String message, final Throwable th) {
+        super(message, th);
     }
 }
index 09b34eb..83ca529 100644 (file)
@@ -1000,7 +1000,8 @@ public class ApexEditorRestResource {
                     if (p.getValue() == null) {
                         ret = new ApexAPIResult(RESULT.FAILED, "Null event parameter information for parameter \""
                                 + p.getKey() + "\" in event " + jsonbean.getName() + ":" + jsonbean.getVersion()
-                                + ". The event was created, but there was an error adding the event parameters. The event has only been partially defined.");
+                                + ". The event was created, but there was an error adding the event parameters."
+                                + " The event has only been partially defined.");
                         return ret;
                     }
                     final ApexAPIResult rettmp =
@@ -1009,7 +1010,8 @@ public class ApexEditorRestResource {
                     if (rettmp.isNOK()) {
                         rettmp.addMessage("Failed to add event parameter information for parameter \"" + p.getKey()
                                 + "\" in event " + jsonbean.getName() + ":" + jsonbean.getVersion()
-                                + ". The event was created, but there was an error adding the event parameters. The event has only been partially defined.");
+                                + ". The event was created, but there was an error adding the event parameters."
+                                + " The event has only been partially defined.");
                         ret = rettmp;
                         return ret;
                     }
@@ -1240,7 +1242,8 @@ public class ApexEditorRestResource {
                     if (fin.getValue() == null) {
                         ret = new ApexAPIResult(RESULT.FAILED, "Null task input field information for field \""
                                 + fin.getKey() + "\" in task " + jsonbean.getName() + ":" + jsonbean.getVersion()
-                                + ". The task was created, but there was an error adding the input fields. The task has only been partially defined.");
+                                + ". The task was created, but there was an error adding the input fields."
+                                + " The task has only been partially defined.");
                         return ret;
                     }
                     if (fin.getKey() == null || !fin.getKey().equals(fin.getValue().getLocalName())) {
@@ -1248,7 +1251,8 @@ public class ApexEditorRestResource {
                                 + fin.getKey() + "\" in task " + jsonbean.getName() + ":" + jsonbean.getVersion()
                                 + ". The localName of the field (\"" + fin.getValue().getLocalName()
                                 + "\") is not the same as the field name. "
-                                + "The task was created, but there was an error adding the input fields. The task has only been partially defined.");
+                                + "The task was created, but there was an error adding the input fields."
+                                + " The task has only been partially defined.");
                         return ret;
                     }
                     tempres = sessionApexModel.createTaskInputField(jsonbean.getName(), jsonbean.getVersion(),
@@ -1257,7 +1261,8 @@ public class ApexEditorRestResource {
                     if (tempres.isNOK()) {
                         tempres.addMessage("Failed to add task input field information for field \"" + fin.getKey()
                                 + "\" in task " + jsonbean.getName() + ":" + jsonbean.getVersion()
-                                + ". The task was created, but there was an error adding the input fields. The task has only been partially defined.");
+                                + ". The task was created, but there was an error adding the input fields."
+                                + " The task has only been partially defined.");
                         ret = tempres;
                         return ret;
                     }
@@ -1268,7 +1273,8 @@ public class ApexEditorRestResource {
                     if (fout.getValue() == null) {
                         ret = new ApexAPIResult(RESULT.FAILED, "Null task output field information for field \""
                                 + fout.getKey() + "\" in task " + jsonbean.getName() + ":" + jsonbean.getVersion()
-                                + ". The task was created, but there was an error adding the output fields. The task has only been partially defined.");
+                                + ". The task was created, but there was an error adding the output fields."
+                                + " The task has only been partially defined.");
                         return ret;
                     }
                     if (fout.getKey() == null || !fout.getKey().equals(fout.getValue().getLocalName())) {
@@ -1276,7 +1282,8 @@ public class ApexEditorRestResource {
                                 + fout.getKey() + "\" in task " + jsonbean.getName() + ":" + jsonbean.getVersion()
                                 + ". The localName of the field (\"" + fout.getValue().getLocalName()
                                 + "\") is not the same as the field name. "
-                                + "The task was created, but there was an error adding the output fields. The task has only been partially defined.");
+                                + "The task was created, but there was an error adding the output fields."
+                                + " The task has only been partially defined.");
                         return ret;
                     }
                     tempres = sessionApexModel.createTaskOutputField(jsonbean.getName(), jsonbean.getVersion(),
@@ -1285,7 +1292,8 @@ public class ApexEditorRestResource {
                     if (tempres.isNOK()) {
                         tempres.addMessage("Failed to add task output field information for field \"" + fout.getKey()
                                 + "\" in task " + jsonbean.getName() + ":" + jsonbean.getVersion()
-                                + ". The task was created, but there was an error adding the output fields. The task has only been partially defined.");
+                                + ". The task was created, but there was an error adding the output fields."
+                                + " The task has only been partially defined.");
                         ret = tempres;
                         return ret;
                     }
@@ -1298,7 +1306,8 @@ public class ApexEditorRestResource {
                 if (tempres.isNOK()) {
                     tempres.addMessage("Failed to add task logic in task " + jsonbean.getName() + ":"
                             + jsonbean.getVersion()
-                            + ". The task was created, but there was an error adding the logic. The task has only been partially defined.");
+                            + ". The task was created, but there was an error adding the logic."
+                            + " The task has only been partially defined.");
                     ret = tempres;
                     return ret;
                 }
@@ -1310,7 +1319,8 @@ public class ApexEditorRestResource {
                         ret = new ApexAPIResult(RESULT.FAILED,
                                 "Null or invalid task parameter information for parameter \"" + param.getKey()
                                         + "\" in task " + jsonbean.getName() + ":" + jsonbean.getVersion()
-                                        + ". The task was created, but there was an error adding the parameters. The task has only been partially defined.");
+                                        + ". The task was created, but there was an error adding the parameters."
+                                        + " The task has only been partially defined.");
                         return ret;
                     }
                     tempres = sessionApexModel.createTaskParameter(jsonbean.getName(), jsonbean.getVersion(),
@@ -1318,7 +1328,8 @@ public class ApexEditorRestResource {
                     if (tempres.isNOK()) {
                         tempres.addMessage("Failed to add task parameter \"" + param.getKey() + "\" in task "
                                 + jsonbean.getName() + ":" + jsonbean.getVersion()
-                                + ". The task was created, but there was an error adding the parameters. The task has only been partially defined.");
+                                + ". The task was created, but there was an error adding the parameters."
+                                + " The task has only been partially defined.");
                         ret = tempres;
                         return ret;
                     }
@@ -1577,7 +1588,8 @@ public class ApexEditorRestResource {
             if (jsonbean.getStates() == null || jsonbean.getStates().isEmpty()) {
                 ret = new ApexAPIResult(RESULT.FAILED, "Null or empty state map; no states defined for policy \""
                         + policyname + ":" + policyversion
-                        + "\". The policy was created, but there was an error adding states. The policy has only been partially defined.");
+                        + "\". The policy was created, but there was an error adding states."
+                        + " The policy has only been partially defined.");
                 return ret;
             }
 
@@ -1589,19 +1601,22 @@ public class ApexEditorRestResource {
                 if (state == null) {
                     ret = new ApexAPIResult(RESULT.FAILED, "Null or invalid state information for state \"" + statename
                             + "\" for policy \"" + policyname + ":" + policyversion
-                            + "\". The policy was created, but there was an error adding the state. The policy has only been partially defined.");
+                            + "\". The policy was created, but there was an error adding the state."
+                            + " The policy has only been partially defined.");
                     return ret;
                 }
                 if (state.getTrigger() == null) {
                     ret = new ApexAPIResult(RESULT.FAILED, "Null or invalid state trigger for state \"" + statename
                             + "\" for policy \"" + policyname + ":" + policyversion
-                            + "\". The policy was created, but there was an error adding the state. The policy has only been partially defined.");
+                            + "\". The policy was created, but there was an error adding the state."
+                            + " The policy has only been partially defined.");
                     return ret;
                 }
                 if (state.getDefaultTask() == null) {
                     ret = new ApexAPIResult(RESULT.FAILED, "Null or invalid default task for state \"" + statename
                             + "\" for policy \"" + policyname + ":" + policyversion
-                            + "\". The policy was created, but there was an error adding the state. The policy has only been partially defined.");
+                            + "\". The policy was created, but there was an error adding the state."
+                            + " The policy has only been partially defined.");
                     return ret;
                 }
                 tempres = sessionApexModel.createPolicyState(policyname, policyversion, statename,
@@ -1624,8 +1639,8 @@ public class ApexEditorRestResource {
                     if (tempres.isNOK()) {
                         tempres.addMessage("Failed to add task selection logic for state \"" + statename + "\" for"
                                 + " policy \"" + policyname + ":" + policyversion
-                                + "\". The policy was created, but there was an error adding the task selection logic for "
-                                + "the state. The policy has only been partially defined.");
+                                + "\". The policy was created, but there was an error adding the task selection logic "
+                                + "for the state. The policy has only been partially defined.");
                         ret = tempres;
                         return ret;
                     }
@@ -1638,8 +1653,8 @@ public class ApexEditorRestResource {
                             ret = new ApexAPIResult(RESULT.FAILED,
                                     "Null or invalid context reference \"" + c + "\" for" + " state \"" + statename
                                             + "\" for policy \"" + policyname + ":" + policyversion
-                                            + "\". The policy was created, but there was an error adding the context reference for the state."
-                                            + " The policy has only been partially defined.");
+                                            + "\". The policy was created, but there was an error adding the context "
+                                            + "reference for the state. The policy has only been partially defined.");
                             return ret;
                         }
                         tempres = sessionApexModel.createPolicyStateContextRef(policyname, policyversion, statename,
@@ -1647,8 +1662,8 @@ public class ApexEditorRestResource {
                         if (tempres.isNOK()) {
                             tempres.addMessage("Failed to add context reference \"" + c + "\" for state \"" + statename
                                     + "\" for policy \"" + policyname + ":" + policyversion
-                                    + "\". The policy was created, but there was an error adding the context reference for the state."
-                                    + " The policy has only been partially defined.");
+                                    + "\". The policy was created, but there was an error adding the context reference "
+                                    + "for the state. The policy has only been partially defined.");
                             ret = tempres;
                             return ret;
                         }
@@ -1663,10 +1678,10 @@ public class ApexEditorRestResource {
                         if (finalizername == null || finalizer == null) {
                             ret = new ApexAPIResult(RESULT.FAILED,
                                     "Null or invalid finalizer information for finalizer " + "named \"" + finalizername
-                                            + "\" in state \"" + statename + "\" for policy \"" + policyname + ":"
+                                            + "\" in state \"" + statename + "\" for policy \"" + policyname + ":" 
                                             + policyversion
-                                            + "\". The policy and state were created, but there was an error adding the finalizer."
-                                            + " The policy has only been partially defined.");
+                                            + "\". The policy and state were created, but there was an error adding the"
+                                            + " finalizer. The policy has only been partially defined.");
                             return ret;
                         }
                         tempres = sessionApexModel.createPolicyStateFinalizerLogic(policyname, policyversion, statename,
@@ -1675,8 +1690,8 @@ public class ApexEditorRestResource {
                             tempres.addMessage("Failed to add finalizer information for finalizer named \""
                                     + finalizername + "\" in" + " state \"" + statename + "\" for policy \""
                                     + policyname + ":" + policyversion
-                                    + "\". The policy and state were created, but there was an error adding the finalizer."
-                                    + " The policy has only been partially defined.");
+                                    + "\". The policy and state were created, but there was an error adding the"
+                                    + " finalizer. The policy has only been partially defined.");
                             ret = tempres;
                             return ret;
                         }
@@ -1687,8 +1702,8 @@ public class ApexEditorRestResource {
                     ret = new ApexAPIResult(RESULT.FAILED,
                             "No state outputs have been defined in state \"" + statename + "\" for policy \""
                                     + policyname + ":" + policyversion
-                                    + "\". The policy and state were created, but there was an error adding state outputs."
-                                    + " The policy has only been partially defined.");
+                                    + "\". The policy and state were created, but there was an error adding state"
+                                    + " outputs. The policy has only been partially defined.");
                     return ret;
                 }
                 for (final Map.Entry<String, BeanStateOutput> o : outputs.entrySet()) {
@@ -1698,8 +1713,8 @@ public class ApexEditorRestResource {
                         ret = new ApexAPIResult(RESULT.FAILED,
                                 "Null or invalid output information for output named \"" + outputname + "\" in state \""
                                         + statename + "\" for policy \"" + policyname + ":" + policyversion
-                                        + "\". The policy and state were created, but there was an error adding the output."
-                                        + " The policy has only been partially defined.");
+                                        + "\". The policy and state were created, but there was an error adding the"
+                                        + " output. The policy has only been partially defined.");
                         return ret;
                     }
                     tempres = sessionApexModel.createPolicyStateOutput(policyname, policyversion, statename, outputname,
@@ -1730,8 +1745,8 @@ public class ApexEditorRestResource {
                         ret = new ApexAPIResult(RESULT.FAILED,
                                 "Null or invalid task information for task named \"" + tasklocalname + "\" in state \""
                                         + statename + "\" for for policy \"" + policyname + ":" + policyversion
-                                        + "\". The policy and state were created, but there was an error adding the task. "
-                                        + "The policy has only been partially defined.");
+                                        + "\". The policy and state were created, but there was an error adding the "
+                                        + "task. The policy has only been partially defined.");
                         return ret;
                     }
                     tempres = sessionApexModel.createPolicyStateTaskRef(policyname, policyversion, statename,
@@ -1740,8 +1755,8 @@ public class ApexEditorRestResource {
                     if (tempres.isNOK()) {
                         tempres.addMessage("Failed to add task reference \"" + t + "\" for state \"" + statename
                                 + "\" for policy \"" + policyname + ":" + policyversion
-                                + "\". The policy was created, but there was an error adding the task reference for the state."
-                                + " The policy has only been partially defined.");
+                                + "\". The policy was created, but there was an error adding the task reference for"
+                                + " the state. The policy has only been partially defined.");
                         ret = tempres;
                         return ret;
                     }
@@ -1799,7 +1814,11 @@ public class ApexEditorRestResource {
                 final ApexAPIResult existingPeriodicEvent = sessionApexModel.listEvent("PeriodicEvent", null);
                 if (existingPeriodicEvent.isNOK()) {
                     final String periodicEventString =
-                            "{\"name\":\"PeriodicEvent\",\"version\":\"0.0.1\",\"uuid\":\"44236da1-3d47-4988-8033-b6fee9d6a0f4\",\"description\":\"Generated description for concept referred to by key 'PeriodicEvent:0.0.1'\",\"source\":\"System\",\"target\":\"Apex\",\"nameSpace\":\"org.onap.policy.apex.domains.aadm.events\",\"parameters\":{}}";
+                            "{\"name\":\"PeriodicEvent\",\"version\":\"0.0.1\","
+                            + "\"uuid\":\"44236da1-3d47-4988-8033-b6fee9d6a0f4\","
+                            + "\"description\":\"Generated description for concept referred to by key "
+                            + "'PeriodicEvent:0.0.1'\",\"source\":\"System\",\"target\":\"Apex\","
+                            + "\"nameSpace\":\"org.onap.policy.apex.domains.aadm.events\",\"parameters\":{}}";
                     ret = createEvent(periodicEventString);
                     if (ret.isNOK()) {
                         return ret;
index 2c5b6e8..02779a4 100644 (file)
@@ -97,7 +97,8 @@ public abstract class RestUtils {
     }
 
     /**
-     * Apex HTTP PUT requests send simple single level JSON strings, this method reads those strings into a map.
+     * Apex HTTP PUT requests send simple single level JSON strings, this method reads those strings
+     * into a map.
      *
      * @param jsonString the incoming JSON string
      * @return a map of the JSON strings
@@ -116,7 +117,8 @@ public abstract class RestUtils {
     }
 
     /**
-     * Apex HTTP PUT requests send simple single level JSON strings, this method reads those strings into a map.
+     * Apex HTTP PUT requests send simple single level JSON strings, this method reads those strings
+     * into a map.
      *
      * @param <CLZ> the generic type
      * @param jsonString the incoming JSON string
@@ -137,13 +139,11 @@ public abstract class RestUtils {
     }
 
     // Regular expressions for checking input types
-    private static final String XML_INPUT_TYPE_REGEXP = "^\\s*<\\?xml.*>\\s*"; // (starts with <?xml...>
-    private static final String JSON_INPUT_TYPE_REGEXP = "^\\s*[\\(\\{\\[][\\s+\\S]*[\\)\\}\\]]"; // starts with some
-                                                                                                  // kind of bracket [
-                                                                                                  // or ( or {, then has
-                                                                                                  // something, then has
-                                                                                                  // and has a close
-                                                                                                  // bracket
+    private static final String XML_INPUT_TYPE_REGEXP = "^\\s*<\\?xml.*>\\s*"; //starts with <?xml...>
+    /**
+     * starts with some kind of bracket [ or ( or {, then has something, then has bracket.
+     */
+    private static final String JSON_INPUT_TYPE_REGEXP = "^\\s*[\\(\\{\\[][\\s+\\S]*[\\)\\}\\]]";
 
     /**
      * Gets the concept from JSON.
index 848665a..1cc6c7c 100644 (file)
@@ -27,8 +27,11 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanContextAlbum extends BeanBase {
-
-    private String name = null, version = null, scope = null, uuid = null, description = null;
+    private String name = null;
+    private String version = null;
+    private String scope = null;
+    private String uuid = null;
+    private String description = null;
     private BeanKeyRef itemSchema = null;
     private boolean writeable;
 
@@ -105,5 +108,4 @@ public class BeanContextAlbum extends BeanBase {
         return "ContextAlbum [name=" + name + ", version=" + version + ", scope=" + scope + ", uuid=" + uuid
                 + ", description=" + description + ", itemSchema=" + itemSchema + ", writeable=" + writeable + "]";
     }
-
 }
index 0d86c27..95b296f 100644 (file)
@@ -27,9 +27,12 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanContextSchema extends BeanBase {
-
-    private String name = null, version = null, schemaFlavour = null, schemaDefinition = null, uuid = null,
-            description = null;
+    private String name = null;
+    private String version = null;
+    private String schemaFlavour = null;
+    private String schemaDefinition = null;
+    private String uuid = null;
+    private String description = null;
 
     /**
      * Gets the name.
index 8b7c6bc..c867bea 100644 (file)
@@ -29,9 +29,13 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanEvent extends BeanBase {
-
-    private String name = null, version = null, nameSpace = null, source = null, target = null, uuid = null,
-            description = null;
+    private String name = null;
+    private String version = null;
+    private String nameSpace = null;
+    private String source = null;
+    private String target = null;
+    private String uuid = null;
+    private String description = null;
     private Map<String, BeanField> parameters = null;
 
     /**
@@ -109,12 +113,12 @@ public class BeanEvent extends BeanBase {
     /**
      * Gets the parameter.
      *
-     * @param p the p
+     * @param ps the parameter string
      * @return the parameter
      */
-    public BeanField getParameter(final String p) {
+    public BeanField getParameter(final String ps) {
         if (parameters != null) {
-            return parameters.get(p);
+            return parameters.get(ps);
         }
         return null;
     }
index a498b94..dfe8ac6 100644 (file)
@@ -27,8 +27,8 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanKeyRef extends BeanBase {
-
-    private String name = null, version = null;
+    private String name = null;
+    private String version = null;
 
     /**
      * Gets the name.
index 48fba16..ef8e3c7 100644 (file)
@@ -27,8 +27,8 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanLogic extends BeanBase {
-
-    private String logic = null, logicFlavour = null;
+    private String logic = null;
+    private String logicFlavour = null;
 
     /**
      * Gets the logic flavour.
@@ -57,5 +57,4 @@ public class BeanLogic extends BeanBase {
     public String toString() {
         return "Logic [logicFlavour=" + logicFlavour + ", logic=" + logic + "]";
     }
-
 }
index 3170ea3..0d69be9 100644 (file)
@@ -28,7 +28,10 @@ import javax.xml.bind.annotation.XmlType;
 @XmlType
 public class BeanModel extends BeanBase {
 
-    private String name = null, version = null, uuid = null, description = null;
+    private String name = null;
+    private String version = null;
+    private String uuid = null;
+    private String description = null;
 
     /**
      * Gets the name.
index bdbfb6d..fad64f6 100644 (file)
@@ -29,8 +29,12 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanPolicy extends BeanBase {
-
-    private String name = null, version = null, uuid = null, description = null, firstState = null, template = null;
+    private String name = null;
+    private String version = null;
+    private String uuid = null;
+    private String description = null;
+    private String firstState = null;
+    private String template = null;
     private Map<String, BeanState> states = null;
 
     /**
index 9d446e7..c3525b0 100644 (file)
@@ -27,9 +27,9 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanStateTaskRef extends BeanBase {
-
     private BeanKeyRef task = null;
-    private String outputType = null, outputName = null;
+    private String outputType = null;
+    private String outputName = null;
 
     /**
      * Gets the task.
index 0df810c..bf14838 100644 (file)
@@ -30,8 +30,10 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanTask extends BeanBase {
-
-    private String name = null, version = null, uuid = null, description = null;
+    private String name = null;
+    private String version = null;
+    private String uuid = null;
+    private String description = null;
     private BeanLogic taskLogic = null;
     private Map<String, BeanField> inputFields = null;
     private Map<String, BeanField> outputFields = null;
index 2de1c7a..ef4f39a 100644 (file)
@@ -28,7 +28,8 @@ import javax.xml.bind.annotation.XmlType;
 @XmlType
 public class BeanTaskParameter extends BeanBase {
 
-    private String parameterName = null, defaultValue = null;
+    private String parameterName = null;
+    private String defaultValue = null;
 
     /**
      * Gets the parameter name.
index e9bf636..7e61cc9 100644 (file)
@@ -20,8 +20,8 @@
 
 /**
  * Implements the RESTful editor for Apex. It implements a RESTful service towards the
- * {@link org.onap.policy.apex.model.modelapi.ApexEditorAPI} Java interface for use by clients over REST. It also
- * provides a web-based client written in Javascript.
+ * {@link org.onap.policy.apex.model.modelapi.ApexEditorAPI} Java interface for use by clients over
+ * REST. It also provides a web-based client written in Javascript.
  *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
index ee156e0..1fb3a0a 100644 (file)
@@ -37,6 +37,7 @@ import org.onap.policy.apex.model.modelapi.ApexAPIResult.RESULT;
 import org.onap.policy.apex.model.utilities.TextFileUtils;
 
 /**
+ * Test Apex Editor Rest Resource.
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class TestApexEditorRestResource extends JerseyTest {
@@ -537,7 +538,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         entityString = "{" + "\"name\"             : \"HowsItGoing\"," + "\"version\"          : \"0.0.2\","
                 + "\"namespace\"        : \"somewhere.over.the.rainbow\"," + "\"source\"           : \"beginning\","
                 + "\"target\"           : \"end\","
-                + "\"parameters\"       : {\"Par0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", \"localName\" : \"Par0\", \"optional\" : false}},"
+                + "\"parameters\"       : {\"Par0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", "
+                + "\"localName\" : \"Par0\", \"optional\" : false}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -556,7 +558,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         entityString = "{" + "\"name\"             : \"GoodDay\"," + "\"version\"          : \"0.0.2\","
                 + "\"namespace\"        : \"somewhere.over.the.rainbow\"," + "\"source\"           : \"beginning\","
                 + "\"target\"           : \"end\","
-                + "\"parameters\"       : {\"Par0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"Par0\", \"optional\" : false}},"
+                + "\"parameters\"       : {\"Par0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
+                + "\"localName\" : \"Par0\", \"optional\" : false}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -725,7 +728,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.SUCCESS, result.getResult());
 
         entityString = "{" + "\"name\"             : \"HowsItGoing\"," + "\"version\"          : \"0.0.2\","
-                + "\"inputFields\"      : {\"IField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", \"localName\" : \"IField0\", \"optional\" : false}},"
+                + "\"inputFields\"      : {\"IField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", "
+                + "\"localName\" : \"IField0\", \"optional\" : false}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -741,7 +745,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
 
         entityString = "{" + "\"name\"             : \"GoodDay\"," + "\"version\"          : \"0.0.2\","
-                + "\"inputFields\"      : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"IField0\", \"optional\" : false}},"
+                + "\"inputFields\"      : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
+                + "\"localName\" : \"IField0\", \"optional\" : false}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -749,7 +754,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         entityString = "{" + "\"name\"             : \"Howdy\"," + "\"version\"          : \"0.0.2\","
-                + "\"inputFields\"      : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"NotIField0\", \"optional\" : false}},"
+                + "\"inputFields\"      : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
+                + "\"localName\" : \"NotIField0\", \"optional\" : false}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -757,7 +763,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
 
         entityString = "{" + "\"name\"             : \"HowsItGoing2\"," + "\"version\"          : \"0.0.2\","
-                + "\"outputFields\"     : {\"OField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", \"localName\" : \"OField0\", \"optional\" : false}},"
+                + "\"outputFields\"     : {\"OField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", "
+                + "\"localName\" : \"OField0\", \"optional\" : false}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -773,7 +780,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
 
         entityString = "{" + "\"name\"             : \"GoodDay2\"," + "\"version\"          : \"0.0.2\","
-                + "\"outputFields\"     : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"OField0\", \"optional\" : false}},"
+                + "\"outputFields\"     : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\","
+                + " \"localName\" : \"OField0\", \"optional\" : false}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -781,7 +789,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         entityString = "{" + "\"name\"             : \"Howdy2\"," + "\"version\"          : \"0.0.2\","
-                + "\"outputFields\"     : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", \"localName\" : \"NotOField0\", \"optional\" : false}},"
+                + "\"outputFields\"     : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
+                + "\"localName\" : \"NotOField0\", \"optional\" : false}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -789,8 +798,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
 
         entityString = "{" + "\"name\"             : \"HowsItGoing3\"," + "\"version\"          : \"0.0.2\","
-                + "\"taskLogic\"        : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
-                + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+                + "\"taskLogic\"        : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons,"
+                + " lots of lime\"}," + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
         result = target("editor/" + sessionId + "/Task/Create").request().post(entity, ApexAPIResult.class);
@@ -806,8 +815,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         entityString = "{" + "\"name\"             : \"GoodDay3\"," + "\"version\"          : \"0.0.2\","
                 + "\"namespace\"        : \"somewhere.over.the.rainbow\"," + "\"source\"           : \"beginning\","
                 + "\"target\"           : \"end\","
-                + "\"taskLogic\"        : {\"logicFlavour\" : \"UNDEFINED\", \"logic\" : \"lots of lemons, lots of lime\"},"
-                + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
+                + "\"taskLogic\"        : {\"logicFlavour\" : \"UNDEFINED\", \"logic\" : \"lots of lemons,"
+                + " lots of lime\"}," + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
         result = target("editor/" + sessionId + "/Task/Create").request().post(entity, ApexAPIResult.class);
@@ -822,7 +831,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
 
         entityString = "{" + "\"name\"             : \"HowsItGoing4\"," + "\"version\"          : \"0.0.2\","
-                + "\"parameters\"       : {\"Par0\" : {\"parameterName\" : \"Par0\", \"defaultValue\" : \"Parameter Defaultvalue\"}},"
+                + "\"parameters\"       : {\"Par0\" : {\"parameterName\" : \"Par0\", "
+                + "\"defaultValue\" : \"Parameter Defaultvalue\"}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -838,7 +848,8 @@ public class TestApexEditorRestResource extends JerseyTest {
         assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
 
         entityString = "{" + "\"name\"             : \"GoodDay4\"," + "\"version\"          : \"0.0.2\","
-                + "\"parameters\"       : {\"Par0\" : {\"parameterName\" : \"NotPar0\", \"defaultValue\" : \"Parameter Defaultvalue\"}},"
+                + "\"parameters\"       : {\"Par0\" : {\"parameterName\" : \"NotPar0\", \"defaultValue\" : "
+                + "\"Parameter Defaultvalue\"}},"
                 + "\"uuid\"             : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
                 + "\"description\"      : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -1223,8 +1234,8 @@ public class TestApexEditorRestResource extends JerseyTest {
                 + "  \"name\"               : \"state\","
                 + "  \"trigger\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "  \"defaultTask\"        : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
-                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
-                + "  \"stateOutputs\"       : {" + "   \"so0\"               : {"
+                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+                + "lots of lime\"}," + "  \"stateOutputs\"       : {" + "   \"so0\"               : {"
                 + "    \"event\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "    \"nextState\"        : null" + "   }" + "  }," + "  \"tasks\"              : {"
                 + "   \"tr0\"               : {"
@@ -1261,7 +1272,8 @@ public class TestApexEditorRestResource extends JerseyTest {
                 + "  \"name\"               : \"state\","
                 + "  \"trigger\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "  \"defaultTask\"        : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
-                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+                + "lots of lime\"},"
                 + "  \"contexts\"           : [{\"name\" : \"contextAlbum0\", \"version\" : \"0.0.1\"}],"
                 + "  \"stateOutputs\"       : {" + "   \"so0\"               : {"
                 + "    \"event\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
@@ -1281,7 +1293,8 @@ public class TestApexEditorRestResource extends JerseyTest {
                 + "  \"name\"               : \"state\","
                 + "  \"trigger\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "  \"defaultTask\"        : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
-                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+                + "lots of lime\"},"
                 + "  \"contexts\"           : [{\"name\" : \"IDontExist\", \"version\" : \"0.0.1\"}],"
                 + "  \"stateOutputs\"       : {" + "   \"so0\"               : {"
                 + "    \"event\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
@@ -1301,7 +1314,8 @@ public class TestApexEditorRestResource extends JerseyTest {
                 + "  \"name\"               : \"state\","
                 + "  \"trigger\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "  \"defaultTask\"        : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
-                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+                + "lots of lime\"},"
                 + "  \"contexts\"           : [null]," + "  \"stateOutputs\"       : {" + "   \"so0\"               : {"
                 + "    \"event\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "    \"nextState\"        : null" + "   }" + "  }," + "  \"tasks\"              : {"
@@ -1320,7 +1334,8 @@ public class TestApexEditorRestResource extends JerseyTest {
                 + "  \"name\"               : \"state\","
                 + "  \"trigger\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "  \"defaultTask\"        : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
-                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+                + "lots of lime\"},"
                 + "  \"contexts\"           : [{\"name\" : \"contextAlbum0\", \"version\" : \"0.0.1\"}],"
                 + "  \"stateOutputs\"       : {" + "   \"so0\"               : {"
                 + "    \"event\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
@@ -1329,7 +1344,8 @@ public class TestApexEditorRestResource extends JerseyTest {
                 + "    \"task\"             : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
                 + "    \"outputType\"       : \"DIRECT\"," + "    \"outputName\"       : \"so0\"" + "   }" + "  },"
                 + "  \"finalizers\"         : {"
-                + "   \"sf0\"               : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"}"
+                + "   \"sf0\"               : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+                + "lots of lime\"}"
                 + "  }" + " }" + "}," + "\"uuid\"                 : \"1fa2e430-f2b2-11e6-bc64-92361f002671\","
                 + "\"description\"          : \"A description of hello\"" + "}";
         entity = Entity.entity(entityString, MediaType.APPLICATION_JSON);
@@ -1342,7 +1358,8 @@ public class TestApexEditorRestResource extends JerseyTest {
                 + "  \"name\"               : \"state\","
                 + "  \"trigger\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "  \"defaultTask\"        : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
-                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+                + "lots of lime\"},"
                 + "  \"contexts\"           : [{\"name\" : \"contextAlbum0\", \"version\" : \"0.0.1\"}],"
                 + "  \"stateOutputs\"       : {" + "   \"so0\"               : {"
                 + "    \"event\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
@@ -1363,7 +1380,8 @@ public class TestApexEditorRestResource extends JerseyTest {
                 + "  \"name\"               : \"state\","
                 + "  \"trigger\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
                 + "  \"defaultTask\"        : {\"name\" : \"task\", \"version\" : \"0.0.1\"},"
-                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, lots of lime\"},"
+                + "  \"taskSelectionLogic\" : {\"logicFlavour\" : \"LemonAndLime\", \"logic\" : \"lots of lemons, "
+                + "lots of lime\"},"
                 + "  \"contexts\"           : [{\"name\" : \"contextAlbum0\", \"version\" : \"0.0.1\"}],"
                 + "  \"stateOutputs\"       : {" + "   \"so0\"               : {"
                 + "    \"event\"            : {\"name\" : \"inEvent\", \"version\" : \"0.0.1\"},"
index d61d43b..699505a 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.Test;
 import org.onap.policy.apex.client.editor.rest.ApexEditorMain.EditorState;
 
 /**
- * The Class TestApexEditorStartup.
+ * Test Apex Editor Startup.
  */
 public class TestApexEditorStartup {
     // CHECKSTYLE:OFF: MagicNumber
@@ -54,7 +54,8 @@ public class TestApexEditorStartup {
                 + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=-1sec], "
                 + "State=RUNNING) started at http://localhost:18989/apexservices/"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=-1sec], State=STOPPED) shut down "));
+                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=-1sec],"
+                + " State=STOPPED) shut down "));
     }
 
     /**
@@ -71,8 +72,9 @@ public class TestApexEditorStartup {
             runEditor(args);
             fail("test should throw an exception here");
         } catch (final Exception e) {
-            assertTrue(e.getLocalizedMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                    + "Config=[null], State=STOPPED) parameter error, too many command line arguments specified : [12321]"));
+            assertTrue(e.getLocalizedMessage().startsWith(
+                    "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+                    + " too many command line arguments specified : [12321]"));
         }
     }
 
@@ -90,8 +92,9 @@ public class TestApexEditorStartup {
             runEditor(args);
             fail("test should throw an exception here");
         } catch (final Exception e) {
-            assertTrue(e.getLocalizedMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                    + "Config=[null], State=STOPPED) parameter error, too many command line arguments specified : [12321 12322 12323]"));
+            assertTrue(e.getLocalizedMessage().startsWith(
+                    "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+                    + " too many command line arguments specified : [12321 12322 12323]"));
         }
     }
 
@@ -109,8 +112,9 @@ public class TestApexEditorStartup {
             runEditor(args);
             fail("test should throw an exception here");
         } catch (final Exception e) {
-            assertTrue(e.getLocalizedMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                    + "Config=[null], State=STOPPED) parameter error, invalid command line arguments specified : Unrecognized option: -z"));
+            assertTrue(e.getLocalizedMessage().startsWith(
+                    "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+                    + " invalid command line arguments specified : Unrecognized option: -z"));
         }
     }
 
@@ -128,8 +132,9 @@ public class TestApexEditorStartup {
             runEditor(args);
             fail("test should throw an exception here");
         } catch (final Exception e) {
-            assertTrue(e.getLocalizedMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                    + "Config=[null], State=STOPPED) parameter error, invalid command line arguments specified : Unrecognized option: --hello"));
+            assertTrue(e.getLocalizedMessage().startsWith(
+                    "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+                    + " invalid command line arguments specified : Unrecognized option: --hello"));
         }
     }
 
@@ -213,7 +218,8 @@ public class TestApexEditorStartup {
                 + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec], "
                 + "State=RUNNING) started at http://localhost:12321/apexservices/"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec], State=STOPPED) shut down "));
+                + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec],"
+                + " State=STOPPED) shut down "));
     }
 
     /**
@@ -235,7 +241,8 @@ public class TestApexEditorStartup {
                 + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec], "
                 + "State=RUNNING) started at http://localhost:12321/apexservices/"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("(ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec], State=STOPPED) shut down "));
+                + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=-1sec],"
+                + " State=STOPPED) shut down "));
     }
 
 
@@ -253,8 +260,9 @@ public class TestApexEditorStartup {
             runEditor(args);
             fail("test should throw an exception here");
         } catch (final Exception e) {
-            assertTrue(e.getMessage().startsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                    + "Config=[null], State=STOPPED) parameter error, error parsing argument \"port\" :For input string: \" 12321\""));
+            assertTrue(e.getMessage().startsWith(
+                    "Apex Editor REST endpoint (ApexEditorMain: Config=[null], State=STOPPED) parameter error,"
+                    + " error parsing argument \"port\" :For input string: \" 12321\""));
         }
     }
 
@@ -337,9 +345,11 @@ public class TestApexEditorStartup {
                 + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], "
                 + "State=READY) starting at http://localhost:18989/apexservices/"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").contains("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=RUNNING) started"));
+                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=RUNNING)"
+                + " started"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=STOPPED) shut down "));
+                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=STOPPED)"
+                + " shut down "));
     }
 
     /**
@@ -358,9 +368,11 @@ public class TestApexEditorStartup {
                 + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], "
                 + "State=READY) starting at http://localhost:18989/apexservices/"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").contains("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=RUNNING) started"));
+                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=RUNNING)"
+                + " started"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=STOPPED) shut down "));
+                + "Config=[ApexEditorParameters: URI=http://localhost:18989/apexservices/, TTL=10sec], State=STOPPED)"
+                + " shut down "));
     }
 
     /**
@@ -379,9 +391,11 @@ public class TestApexEditorStartup {
                 + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], "
                 + "State=READY) starting at http://localhost:12321/apexservices/"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").contains("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], State=RUNNING) started"));
+                + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], State=RUNNING)"
+                + " started"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], State=STOPPED) shut down "));
+                + "Config=[ApexEditorParameters: URI=http://localhost:12321/apexservices/, TTL=10sec], State=STOPPED)"
+                + " shut down "));
     }
 
 
@@ -401,9 +415,11 @@ public class TestApexEditorStartup {
                 + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], "
                 + "State=READY) starting at http://127.0.0.1:12321/apexservices/"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").contains("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], State=RUNNING) started"));
+                + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], State=RUNNING)"
+                + " started"));
         assertTrue(outString.replaceAll("[\\r?\\n]+", " ").endsWith("Apex Editor REST endpoint (ApexEditorMain: "
-                + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], State=STOPPED) shut down "));
+                + "Config=[ApexEditorParameters: URI=http://127.0.0.1:12321/apexservices/, TTL=10sec], State=STOPPED)"
+                + " shut down "));
     }
 
     /**
index 5648e30..c166dc2 100644 (file)
@@ -27,9 +27,11 @@ import javax.xml.bind.annotation.XmlType;
  */
 @XmlType
 public class BeanFake extends BeanBase {
-
-    private String name = null, version = null, field1 = null;
-    private int field2 = 0, field3 = 0;
+    private String name = null;
+    private String version = null;
+    private String field1 = null;
+    private int field2 = 0;
+    private int field3 = 0;
 
     public String getName() {
         field1 = name;
index 3a38dc0..c6460d2 100644 (file)
@@ -29,7 +29,8 @@ import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
 
 /**
- * This class is used to launch the services. It creates a Grizzly embedded web server and runs the services.
+ * This class is used to launch the services. It creates a Grizzly embedded web server and runs the
+ * services.
  */
 public class ApexServicesRest {
     // Logger for this class
@@ -39,16 +40,17 @@ public class ApexServicesRest {
     private HttpServer server;
 
     /**
-     * Starts the HTTP server for the Apex services client on the default base URI and with the default REST packages
+     * Starts the HTTP server for the Apex services client on the default base URI and with the
+     * default REST packages.
      */
     public ApexServicesRest() {
         this(new ApexServicesRestParameters());
     }
 
     /**
-     * Starts the HTTP server for the Apex services client
+     * Starts the HTTP server for the Apex services client.
      *
-     * @param parameters: The Apex parameters to use to start the server
+     * @param parameters The Apex parameters to use to start the server
      */
     public ApexServicesRest(final ApexServicesRestParameters parameters) {
         Assertions.argumentNotNull(parameters, "parameters may not be null");
@@ -74,7 +76,7 @@ public class ApexServicesRest {
     }
 
     /**
-     * Shut down the web server
+     * Shut down the web server.
      */
     public void shutdown() {
         logger.debug("Apex services RESTful client shutting down . . .");
index a9e5db9..a2fb0ac 100644 (file)
@@ -40,7 +40,7 @@ public class ApexServicesRestMain {
         INITIALIZING,
         /** The editor is running. */
         RUNNING
-    };
+    }
 
     private static final int EDITOR_RNNING_CHECK_TIMEOUT = 1000;
 
index 8b966b1..f78de67 100644 (file)
@@ -23,13 +23,13 @@ package org.onap.policy.apex.client.full.rest;
 /**
  * A run time exception used to report parsing and parameter input errors.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexServicesRestParameterException extends IllegalArgumentException {
     private static final long serialVersionUID = 6520231162404452427L;
 
     /**
-     * Create an ApexServicesRestParameterException with a message
+     * Create an ApexServicesRestParameterException with a message.
      *
      * @param message the message
      */
index 28b0d4c..8a90aa6 100644 (file)
@@ -32,16 +32,16 @@ import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 
 /**
- * This class reads and handles command line parameters to the Apex RESTful services
+ * This class reads and handles command line parameters to the Apex RESTful services.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexServicesRestParameterParser {
     // Apache Commons CLI options
     Options options;
 
     /**
-     * Construct the options for the CLI RESTful services
+     * Construct the options for the CLI RESTful services.
      */
     public ApexServicesRestParameterParser() {
         options = new Options();
index ab81d4b..52ad885 100644 (file)
@@ -23,9 +23,9 @@ package org.onap.policy.apex.client.full.rest;
 import java.net.URI;
 
 /**
- * This class reads and handles command line parameters to the Apex RESTful services
+ * This class reads and handles command line parameters to the Apex RESTful services.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexServicesRestParameters {
     public static final int DEFAULT_REST_PORT = 18989;
index 3384a17..8e7cbea 100644 (file)
@@ -40,7 +40,7 @@ public final class ParameterCheck {
     private ParameterCheck() {}
 
     /**
-     * The Enum StartStop is used to hold .
+     * The Enum StartStop is used to hold.
      *
      * @author Liam Fallon (liam.fallon@ericsson.com)
      */
@@ -49,7 +49,7 @@ public final class ParameterCheck {
         START,
         /** Stop of an Apex engine has been ordered. */
         STOP
-    };
+    }
 
     private static final XLogger LOGGER = XLoggerFactory.getXLogger(ParameterCheck.class);
 
index d6f7e64..e7802ae 100644 (file)
@@ -38,16 +38,16 @@ public class ApexMonitoringRest {
     private HttpServer server;
 
     /**
-     * Starts the HTTP server for the Apex services client on the default base URI and with the default REST packages
+     * Starts the HTTP server for the Apex services client on the default base URI and with the default REST packages.
      */
     public ApexMonitoringRest() {
         this(new ApexMonitoringRestParameters());
     }
 
     /**
-     * Starts the HTTP server for the Apex services client
+     * Starts the HTTP server for the Apex services client.
      *
-     * @param parameters: The Apex parameters to use to start the server
+     * @param parameters The Apex parameters to use to start the server.
      */
     public ApexMonitoringRest(final ApexMonitoringRestParameters parameters) {
         Assertions.argumentNotNull(parameters, "parameters may not be null");
@@ -70,7 +70,7 @@ public class ApexMonitoringRest {
     }
 
     /**
-     * Shut down the web server
+     * Shut down the web server.
      */
     public void shutdown() {
         logger.debug("Apex services RESTful client shutting down . . .");
index fcc29ed..bf2365f 100644 (file)
@@ -23,13 +23,15 @@ package org.onap.policy.apex.client.monitoring.rest;
 import java.io.PrintStream;
 
 /**
- * User: ewatkmi Date: 31 Jul 2017
+ * The main class for Apex Restful Monitoring.
+ *
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexMonitoringRestMain {
     // Services state
     public enum ServicesState {
         STOPPED, READY, INITIALIZING, RUNNING
-    };
+    }
 
     private ServicesState state = ServicesState.STOPPED;
 
@@ -43,7 +45,7 @@ public class ApexMonitoringRestMain {
     private ApexMonitoringRest apexMonitoringRest = null;
 
     /**
-     * Main method, main entry point for command
+     * Main method, main entry point for command.
      *
      * @param args The command line arguments for the client
      */
@@ -57,7 +59,7 @@ public class ApexMonitoringRestMain {
     }
 
     /**
-     * Constructor, kicks off the rest service
+     * Constructor, kicks off the rest service.
      *
      * @param args The command line arguments for the RESTful service
      * @param outStream The stream for output messages
@@ -95,7 +97,7 @@ public class ApexMonitoringRestMain {
     }
 
     /**
-     * Initialize the rest service
+     * Initialize the rest service.
      */
     public void init() {
         outStream.println("Apex Services REST endpoint (" + this.toString() + ") starting at "
@@ -161,7 +163,7 @@ public class ApexMonitoringRestMain {
     }
 
     /**
-     * Explicitly shut down the services
+     * Explicitly shut down the services.
      */
     public void shutdown() {
         if (apexMonitoringRest != null) {
@@ -173,7 +175,7 @@ public class ApexMonitoringRestMain {
     }
 
     /**
-     * This class is a shutdown hook for the Apex services command
+     * This class is a shutdown hook for the Apex services command.
      */
     private class ApexServicesShutdownHook implements Runnable {
         /*
index cbbc294..9ca309f 100644 (file)
@@ -21,9 +21,9 @@
 package org.onap.policy.apex.client.monitoring.rest;
 
 /**
- * A run time exception used to report parsing and parameter input errors
+ * A run time exception used to report parsing and parameter input errors.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexMonitoringRestParameterException extends IllegalArgumentException {
     private static final long serialVersionUID = 6520231162404452427L;
index 35ee6b4..af2ff68 100644 (file)
@@ -32,16 +32,16 @@ import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 
 /**
- * This class reads and handles command line parameters to the Apex RESTful services
+ * This class reads and handles command line parameters to the Apex RESTful services.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexMonitoringRestParameterParser {
     // Apache Commons CLI options
     Options options;
 
     /**
-     * Construct the options for the CLI RESTful services
+     * Construct the options for the CLI RESTful services.
      */
     public ApexMonitoringRestParameterParser() {
         options = new Options();
index cb6d76f..fea7ae4 100644 (file)
@@ -23,9 +23,9 @@ package org.onap.policy.apex.client.monitoring.rest;
 import java.net.URI;
 
 /**
- * This class reads and handles command line parameters to the Apex RESTful services
+ * This class reads and handles command line parameters to the Apex RESTful services.
  *
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
  */
 public class ApexMonitoringRestParameters {
     public static final int DEFAULT_REST_PORT = 18989;
index 84f29df..6a614f3 100644 (file)
@@ -81,7 +81,7 @@ public class ApexMonitoringRestResource {
     public ApexMonitoringRestResource() {}
 
     /**
-     * Query the engine service for data
+     * Query the engine service for data.
      *
      * @param hostName the host name of the engine service to connect to.
      * @param port the port number of the engine service to connect to.
@@ -163,7 +163,7 @@ public class ApexMonitoringRestResource {
     }
 
     /**
-     * Start/Stop and Apex engine
+     * Start/Stop and Apex engine.
      *
      * @param hostName the host name of the engine service to connect to.
      * @param port the port number of the engine service to connect to.
@@ -210,7 +210,7 @@ public class ApexMonitoringRestResource {
     }
 
     /**
-     * Start/Stop and Apex engine
+     * Start/Stop and Apex engine.
      *
      * @param hostName the host name of the engine service to connect to.
      * @param port the port number of the engine service to connect to.
@@ -252,7 +252,7 @@ public class ApexMonitoringRestResource {
     }
 
     /**
-     * Check if periodic events are running
+     * Check if periodic events are running.
      *
      * @param host the engine's host url
      * @return a boolean stating if periodic events are running for a given host
@@ -262,7 +262,7 @@ public class ApexMonitoringRestResource {
     }
 
     /**
-     * Sets the state of periodic events for a host
+     * Sets the state of periodic events for a host.
      *
      * @param host the engine's host url
      * @param boolean that states if periodic events have been started or stopped
@@ -273,7 +273,7 @@ public class ApexMonitoringRestResource {
 
     /**
      * This method takes in the latest data entry for an engine, adds it to an existing data set and returns the full
-     * map for that host and engine
+     * map for that host and engine.
      *
      * @param host the engine's host url
      * @param id the engines id
@@ -314,12 +314,12 @@ public class ApexMonitoringRestResource {
         }
 
         @Override
-        public boolean add(final V e) {
+        public boolean add(final V elm) {
             if (this.size() > (maxEntries - 1)) {
                 this.removeFirst();
             }
-            return super.add(e);
-        };
+            return super.add(elm);
+        }
 
     }
 
index 8edeb54..5bc40c8 100644 (file)
@@ -49,7 +49,7 @@ public final class ParameterCheck {
         START,
         /** Stop of an Apex engine has been ordered. */
         STOP
-    };
+    }
 
     private static final XLogger LOGGER = XLoggerFactory.getXLogger(ParameterCheck.class);