aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestMain.java17
-rw-r--r--client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorMain.java10
-rw-r--r--client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java12
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java17
4 files changed, 35 insertions, 21 deletions
diff --git a/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestMain.java b/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestMain.java
index b7d566ccf..6ba8d832c 100644
--- a/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestMain.java
+++ b/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestMain.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +40,10 @@ public class ApexDeploymentRestMain {
// Services state
public enum ServicesState {
- STOPPED, READY, INITIALIZING, RUNNING
+ STOPPED,
+ READY,
+ INITIALIZING,
+ RUNNING
}
private ServicesState state = ServicesState.STOPPED;
@@ -72,12 +76,12 @@ public class ApexDeploymentRestMain {
} catch (final ApexDeploymentRestParameterException e) {
throw new ApexDeploymentRestParameterException(
REST_ENDPOINT_PREFIX + this.toString() + ") parameter error, " + e.getMessage() + '\n'
- + parser.getHelp(ApexDeploymentRestMain.class.getCanonicalName()), e);
+ + parser.getHelp(ApexDeploymentRestMain.class.getName()),
+ e);
}
if (parameters.isHelpSet()) {
- throw new ApexDeploymentRestParameterException(
- parser.getHelp(ApexDeploymentRestMain.class.getCanonicalName()));
+ throw new ApexDeploymentRestParameterException(parser.getHelp(ApexDeploymentRestMain.class.getName()));
}
// Validate the parameters
@@ -85,7 +89,7 @@ public class ApexDeploymentRestMain {
if (validationMessage.length() > 0) {
throw new ApexDeploymentRestParameterException(
REST_ENDPOINT_PREFIX + this.toString() + ") parameters invalid, " + validationMessage + '\n'
- + parser.getHelp(ApexDeploymentRestMain.class.getCanonicalName()));
+ + parser.getHelp(ApexDeploymentRestMain.class.getName()));
}
state = ServicesState.READY;
@@ -131,7 +135,8 @@ public class ApexDeploymentRestMain {
String message = REST_ENDPOINT_PREFIX + this.toString() + ") failed at with error: " + e.getMessage();
outStream.println(message);
LOGGER.warn(message, e);
- } finally {
+ }
+ finally {
if (apexDeploymentRest != null) {
apexDeploymentRest.shutdown();
apexDeploymentRest = null;
diff --git a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorMain.java b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorMain.java
index b7e1f97c6..558cbadc7 100644
--- a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorMain.java
+++ b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorMain.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -82,18 +83,18 @@ public class ApexEditorMain {
parameters = parser.parse(args);
} catch (final ApexEditorParameterException e) {
throw new ApexEditorParameterException(REST_ENDPOINT_PREFIX + this.toString() + ") parameter error, "
- + e.getMessage() + '\n' + parser.getHelp(ApexEditorMain.class.getCanonicalName()), e);
+ + e.getMessage() + '\n' + parser.getHelp(ApexEditorMain.class.getName()), e);
}
if (parameters.isHelpSet()) {
- throw new ApexEditorParameterException(parser.getHelp(ApexEditorMain.class.getCanonicalName()));
+ throw new ApexEditorParameterException(parser.getHelp(ApexEditorMain.class.getName()));
}
// Validate the parameters
final String validationMessage = parameters.validate();
if (validationMessage.length() > 0) {
throw new ApexEditorParameterException(REST_ENDPOINT_PREFIX + this.toString() + ") parameters invalid, "
- + validationMessage + '\n' + parser.getHelp(ApexEditorMain.class.getCanonicalName()));
+ + validationMessage + '\n' + parser.getHelp(ApexEditorMain.class.getName()));
}
state = EditorState.READY;
@@ -139,7 +140,8 @@ public class ApexEditorMain {
String message = REST_ENDPOINT_PREFIX + this.toString() + ") failed at with error: " + e.getMessage();
outStream.println(message);
LOGGER.warn(message, e);
- } finally {
+ }
+ finally {
if (apexEditor != null) {
apexEditor.shutdown();
apexEditor = null;
diff --git a/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java b/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java
index df877baff..856aa6b0c 100644
--- a/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java
+++ b/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -82,11 +83,11 @@ public class ApexServicesRestMain {
parameters = parser.parse(args);
} catch (final ApexServicesRestParameterException e) {
throw new ApexServicesRestParameterException(REST_ENDPOINT_PREFIX + this.toString() + ") parameter error, "
- + e.getMessage() + '\n' + parser.getHelp(ApexServicesRestMain.class.getCanonicalName()), e);
+ + e.getMessage() + '\n' + parser.getHelp(ApexServicesRestMain.class.getName()), e);
}
if (parameters.isHelpSet()) {
- throw new ApexServicesRestParameterException(parser.getHelp(ApexServicesRestMain.class.getCanonicalName()));
+ throw new ApexServicesRestParameterException(parser.getHelp(ApexServicesRestMain.class.getName()));
}
// Validate the parameters
@@ -94,7 +95,7 @@ public class ApexServicesRestMain {
if (validationMessage.length() > 0) {
throw new ApexServicesRestParameterException(
REST_ENDPOINT_PREFIX + this.toString() + ") parameters invalid, " + validationMessage + '\n'
- + parser.getHelp(ApexServicesRestMain.class.getCanonicalName()));
+ + parser.getHelp(ApexServicesRestMain.class.getName()));
}
state = EditorState.READY;
@@ -140,7 +141,8 @@ public class ApexServicesRestMain {
String message = REST_ENDPOINT_PREFIX + this.toString() + ") failed at with error: " + e.getMessage();
outStream.println(message);
LOGGER.warn(message, e);
- } finally {
+ }
+ finally {
if (apexServices != null) {
apexServices.shutdown();
apexServices = null;
@@ -195,7 +197,7 @@ public class ApexServicesRestMain {
}
}
}
-
+
/**
* Main method, main entry point for command.
*
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java
index 468fd5aa7..abc30ce8f 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +40,10 @@ public class ApexMonitoringRestMain {
// Services state
public enum ServicesState {
- STOPPED, READY, INITIALIZING, RUNNING
+ STOPPED,
+ READY,
+ INITIALIZING,
+ RUNNING
}
private ServicesState state = ServicesState.STOPPED;
@@ -72,12 +76,12 @@ public class ApexMonitoringRestMain {
} catch (final ApexMonitoringRestParameterException e) {
throw new ApexMonitoringRestParameterException(
REST_ENDPOINT_PREFIX + this.toString() + ") parameter error, " + e.getMessage() + '\n'
- + parser.getHelp(ApexMonitoringRestMain.class.getCanonicalName()), e);
+ + parser.getHelp(ApexMonitoringRestMain.class.getName()),
+ e);
}
if (parameters.isHelpSet()) {
- throw new ApexMonitoringRestParameterException(
- parser.getHelp(ApexMonitoringRestMain.class.getCanonicalName()));
+ throw new ApexMonitoringRestParameterException(parser.getHelp(ApexMonitoringRestMain.class.getName()));
}
// Validate the parameters
@@ -85,7 +89,7 @@ public class ApexMonitoringRestMain {
if (validationMessage.length() > 0) {
throw new ApexMonitoringRestParameterException(
REST_ENDPOINT_PREFIX + this.toString() + ") parameters invalid, " + validationMessage + '\n'
- + parser.getHelp(ApexMonitoringRestMain.class.getCanonicalName()));
+ + parser.getHelp(ApexMonitoringRestMain.class.getName()));
}
state = ServicesState.READY;
@@ -131,7 +135,8 @@ public class ApexMonitoringRestMain {
String message = REST_ENDPOINT_PREFIX + this.toString() + ") failed at with error: " + e.getMessage();
outStream.println(message);
LOGGER.warn(message, e);
- } finally {
+ }
+ finally {
if (apexMonitoringRest != null) {
apexMonitoringRest.shutdown();
apexMonitoringRest = null;