summaryrefslogtreecommitdiffstats
path: root/core/core-deployment
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-01-23 16:50:47 +0000
committerliamfallon <liam.fallon@est.tech>2020-01-23 16:50:51 +0000
commitf8000a9d35928f136216be504828ef9074dfb42a (patch)
tree5e81379c3eef8af54ff557cd641ab94faa426713 /core/core-deployment
parent755eb9df282d80273043a2e902e2a51bf6eaab24 (diff)
Remove apex-pdp TextFileUtils class
This class was moved to policy-common some time ago. Removing it in apex-pdp. Issue-ID: POLICY-1913 Change-Id: I982fbd799334b34f1526e19f339236b52205b91e Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'core/core-deployment')
-rw-r--r--core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java
index 88d65afac..5bbe1812d 100644
--- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java
+++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ import org.onap.policy.apex.core.protocols.engdep.messages.StopEngine;
import org.onap.policy.apex.core.protocols.engdep.messages.StopPeriodicEvents;
import org.onap.policy.apex.core.protocols.engdep.messages.UpdateModel;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.utilities.TextFileUtils;
+import org.onap.policy.common.utils.resources.TextFileUtils;
/**
* Dummy deployment client.
@@ -95,6 +95,7 @@ public class DummyDeploymentClient extends DeploymentClient implements Runnable
*
* @param message the message to send to the Apex server
*/
+ @Override
public void sendMessage(final Message message) {
if (message instanceof GetEngineServiceInfo) {
handleEngineServiceInfo(message);
@@ -117,7 +118,7 @@ public class DummyDeploymentClient extends DeploymentClient implements Runnable
/**
* Handle the EngineServiceInfo message.
- *
+ *
* @param message the EngineServiceInfo message
*/
private void handleEngineServiceInfo(final Message message) {
@@ -153,17 +154,16 @@ public class DummyDeploymentClient extends DeploymentClient implements Runnable
}
if ("ReturnBadResponse".equals(message.getTarget().getName())) {
- Response badResponse = new Response(ENGINE_KEY, successFlag,new StartEngine(message.getTarget()));
+ Response badResponse = new Response(ENGINE_KEY, successFlag, new StartEngine(message.getTarget()));
receiveQueue.add(badResponse);
return !successFlag;
}
-
+
Response response = new Response(ENGINE_KEY, successFlag, message);
if (successFlag) {
try {
- response.setMessageData(TextFileUtils
- .getTextFileAsString("src/test/resources/models/SmallModel.json"));
+ response.setMessageData(TextFileUtils.getTextFileAsString("src/test/resources/models/SmallModel.json"));
} catch (IOException e) {
e.printStackTrace();
}
@@ -177,7 +177,7 @@ public class DummyDeploymentClient extends DeploymentClient implements Runnable
/**
* Handle and return a message.
- *
+ *
* @param message the message
*/
private boolean handleAndReturnMessage(final Message message, final boolean successFlag) {
@@ -196,6 +196,7 @@ public class DummyDeploymentClient extends DeploymentClient implements Runnable
/**
* Stop the deployment client.
*/
+ @Override
public void stopClient() {
if (thisThread != null) {
thisThread.interrupt();
@@ -208,6 +209,7 @@ public class DummyDeploymentClient extends DeploymentClient implements Runnable
*
* @return true, if the client thread is started
*/
+ @Override
public boolean isStarted() {
return started;
}
@@ -217,6 +219,7 @@ public class DummyDeploymentClient extends DeploymentClient implements Runnable
*
* @return the receive queue
*/
+ @Override
public BlockingQueue<Message> getReceiveQueue() {
return receiveQueue;
}