aboutsummaryrefslogtreecommitdiffstats
path: root/client/client-monitoring
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-04 17:24:15 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-04 17:25:22 +0100
commit87be30582d1db37bee7c6b456c0c5c3ca9584963 (patch)
tree28806c5866fc5d07c89a06014d7c7d2705772b4f /client/client-monitoring
parentf32508381ce0b555fc14978cbaa458aa4e2d91c5 (diff)
Fix checkstyle issues in apex model basic
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'client/client-monitoring')
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java16
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java2
2 files changed, 9 insertions, 9 deletions
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
index 6a614f326..85465a14b 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
@@ -105,9 +105,9 @@ public class ApexMonitoringRestResource {
final JsonObject responseObject = new JsonObject();
// Engine Service data
- responseObject.addProperty("engine_id", engineServiceFacade.getKey().getID());
+ responseObject.addProperty("engine_id", engineServiceFacade.getKey().getId());
responseObject.addProperty("model_id",
- engineServiceFacade.getApexModelKey() != null ? engineServiceFacade.getApexModelKey().getID()
+ engineServiceFacade.getApexModelKey() != null ? engineServiceFacade.getApexModelKey().getId()
: "Not Set");
responseObject.addProperty("server", hostName);
responseObject.addProperty("port", Integer.toString(port));
@@ -121,23 +121,23 @@ public class ApexMonitoringRestResource {
final JsonObject engineStatusObject = new JsonObject();
final AxEngineModel axEngineModel = engineServiceFacade.getEngineStatus(engineKey);
engineStatusObject.addProperty("timestamp", axEngineModel.getTimeStampString());
- engineStatusObject.addProperty("id", engineKey.getID());
+ engineStatusObject.addProperty("id", engineKey.getId());
engineStatusObject.addProperty("status", axEngineModel.getState().toString());
engineStatusObject.addProperty("last_message", axEngineModel.getStats().getTimeStampString());
engineStatusObject.addProperty("up_time", axEngineModel.getStats().getUpTime() / 1000L);
engineStatusObject.addProperty("policy_executions", axEngineModel.getStats().getEventCount());
engineStatusObject.addProperty("last_policy_duration",
gson.toJson(
- getValuesFromCache(host, engineKey.getID() + "_last_policy_duration",
+ getValuesFromCache(host, engineKey.getId() + "_last_policy_duration",
axEngineModel.getTimestamp(), axEngineModel.getStats().getLastExecutionTime()),
List.class));
engineStatusObject.addProperty("average_policy_duration",
- gson.toJson(getValuesFromCache(host, engineKey.getID() + "_average_policy_duration",
+ gson.toJson(getValuesFromCache(host, engineKey.getId() + "_average_policy_duration",
axEngineModel.getTimestamp(),
(long) axEngineModel.getStats().getAverageExecutionTime()), List.class));
engineStatusList.add(engineStatusObject);
} catch (final ApexException e) {
- LOGGER.warn("Error getting status of engine with ID " + engineKey.getID() + "<br>", e);
+ LOGGER.warn("Error getting status of engine with ID " + engineKey.getId() + "<br>", e);
}
}
responseObject.add("status", engineStatusList);
@@ -149,12 +149,12 @@ public class ApexMonitoringRestResource {
final String engineInfo = engineServiceFacade.getEngineInfo(engineKey);
if (engineInfo != null && !engineInfo.trim().isEmpty()) {
final JsonObject engineContextObject = new JsonObject();
- engineContextObject.addProperty("id", engineKey.getID());
+ engineContextObject.addProperty("id", engineKey.getId());
engineContextObject.addProperty("engine_info", engineInfo);
engineContextList.add(engineContextObject);
}
} catch (final ApexException e) {
- LOGGER.warn("Error getting runtime information of engine with ID " + engineKey.getID() + "<br>", e);
+ LOGGER.warn("Error getting runtime information of engine with ID " + engineKey.getId() + "<br>", e);
}
}
responseObject.add("context", engineContextList);
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
index 5bc40c8db..c8eb5ad66 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
@@ -154,7 +154,7 @@ public final class ParameterCheck {
*/
public static ParameterCheck.StartStop getStartStop(final Map<String, String[]> parameterMap,
final AxArtifactKey engineKey) {
- final String startStopPar = AXARTIFACTKEY_PAR + '#' + engineKey.getID();
+ final String startStopPar = AXARTIFACTKEY_PAR + '#' + engineKey.getId();
if (!parameterMap.containsKey(startStopPar)) {
LOGGER.warn("parameter \"" + startStopPar + "\" not found");
return null;