From 9eb3c7a2fa4f6cace52d49a84123f370babaf57f Mon Sep 17 00:00:00 2001 From: xg353y Date: Mon, 18 Feb 2019 13:09:04 +0100 Subject: 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 --- src/main/java/org/onap/clamp/clds/service/CldsService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/org') 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); -- cgit 1.2.3-korg