aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap
diff options
context:
space:
mode:
authorxg353y <xg353y@intl.att.com>2019-02-18 13:09:04 +0100
committerxg353y <xg353y@intl.att.com>2019-02-19 14:04:48 +0100
commit9eb3c7a2fa4f6cace52d49a84123f370babaf57f (patch)
tree8be0fabf1c654273fddf2e1337c26a93ba47eebf /src/main/java/org/onap
parent700f44182b05ef329e00ad6107dd688ce092573d (diff)
Allow only 1 Operational Policy
Rework the operational policy UI, only allow to create 1 operational policy and fix some bugs. Issue-ID: CLAMP-294 Change-Id: Iec09451d9437b299028bf63304f90c893ecc1d3e Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'src/main/java/org/onap')
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index 42e9cf713..e3a379b36 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -394,11 +394,14 @@ public class CldsService extends SecureServiceBase {
errorMessage = e.getMessage();
}
- if (!errorMessage.isEmpty()) {
+ if (null == errorMessage || (null != errorMessage && !errorMessage.isEmpty())) {
CldsEvent.insEvent(cldsDao, model.getControlName(), getUserId(), actionCd, CldsEvent.ACTION_STATE_ERROR,
null);
// Need a refresh as new events have been inserted
model = CldsModel.retrieve(cldsDao, modelName, false);
+ if (null == errorMessage) {
+ errorMessage = "No response from Policy";
+ }
model.setErrorMessageForUi(errorMessage);
util.exiting(HttpStatus.INTERNAL_SERVER_ERROR.toString(), "putModelAndProcessAction failed", Level.INFO,
ONAPLogConstants.ResponseStatus.ERROR);