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/ApexDeploymentRestResource.java10
-rw-r--r--client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ParameterCheck.java2
-rw-r--r--client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/RestInterfaceTest.java4
-rw-r--r--client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ParameterCheck.java2
-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
6 files changed, 18 insertions, 18 deletions
diff --git a/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestResource.java b/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestResource.java
index 13192aa2a..18aae5001 100644
--- a/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestResource.java
+++ b/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ApexDeploymentRestResource.java
@@ -88,9 +88,9 @@ public class ApexDeploymentRestResource {
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));
@@ -132,16 +132,16 @@ public class ApexDeploymentRestResource {
engineServiceFacade.deployModel(fileDetail.getFileName(), uploadedInputStream, ignoreConflicts,
forceUpdate);
} catch (final Exception e) {
- LOGGER.warn("Error updating model on engine service " + engineServiceFacade.getKey().getID(), e);
+ LOGGER.warn("Error updating model on engine service " + engineServiceFacade.getKey().getId(), e);
final String errorMessage =
- "Error updating model on engine service " + engineServiceFacade.getKey().getID();
+ "Error updating model on engine service " + engineServiceFacade.getKey().getId();
LOGGER.warn(errorMessage + "<br>", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(errorMessage + "\n" + e.getMessage())
.build();
}
return Response.ok("Model " + fileDetail.getFileName() + " deployed on engine service "
- + engineServiceFacade.getKey().getID()).build();
+ + engineServiceFacade.getKey().getId()).build();
}
}
diff --git a/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ParameterCheck.java b/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ParameterCheck.java
index 50117e52b..b68ffebcf 100644
--- a/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/rest/ParameterCheck.java
+++ b/client/client-deployment/src/main/java/org/onap/policy/apex/client/deployment/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;
diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/RestInterfaceTest.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/RestInterfaceTest.java
index 4893775ea..012167b51 100644
--- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/RestInterfaceTest.java
+++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/RestInterfaceTest.java
@@ -108,7 +108,7 @@ public class RestInterfaceTest {
localmodel = new ApexModelReader<>(AxPolicyModel.class, false)
.read(ResourceUtils.getResourceAsStream(TESTMODELFILE));
localmodelString =
- new ApexModelStringWriter<AxPolicyModel>(false).writeJSONString(localmodel, AxPolicyModel.class);
+ new ApexModelStringWriter<AxPolicyModel>(false).writeJsonString(localmodel, AxPolicyModel.class);
// initialize a session ID
createNewSession();
@@ -195,7 +195,7 @@ public class RestInterfaceTest {
// Write that local copy of the AxPolicy object to a Json String, ten parse it again
final ApexModelStringWriter<AxPolicy> apexModelWriter = new ApexModelStringWriter<>(false);
- final String localPolicyString = apexModelWriter.writeJSONString(localpolicy, AxPolicy.class);
+ final String localPolicyString = apexModelWriter.writeJsonString(localpolicy, AxPolicy.class);
apexPolicyReader = new ApexModelReader<>(AxPolicy.class, false);
final AxPolicy localpolicyReparsed = apexPolicyReader.read(localPolicyString);
// AxPolicy localpolicy_reparsed = RestUtils.getConceptFromJSON(returnedPolicyAsString, AxPolicy.class);
diff --git a/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ParameterCheck.java b/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ParameterCheck.java
index 8e7cbea71..d7b7229c4 100644
--- a/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ParameterCheck.java
+++ b/client/client-full/src/main/java/org/onap/policy/apex/client/full/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;
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;