summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org
diff options
context:
space:
mode:
authorsheetalm <sheetal.mudholkar@amdocs.com>2018-02-19 11:05:17 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-02-19 16:13:04 +0000
commit38b4e81eab76202bcafdec7e0b6374679090ce7e (patch)
treedb6afd3705c212e043cd106e4e44e4934f92d0ea /openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org
parentd299e8af2e9dfa79e53f7cf9e79977bab3474919 (diff)
Onboarding foundation changes - UniqueValueUtil
Refactored UniqueValueUtil Change-Id: I7523ad501de9a49c5fbbb59f33c07a40c55eda2f Issue-ID: SDC-1047 Signed-off-by: sheetalm <sheetal.mudholkar@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org')
-rw-r--r--openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java b/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java
index 1189a9c00a..696c63e498 100644
--- a/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java
@@ -74,6 +74,7 @@ import java.util.Map;
import java.util.UUID;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
+import org.openecomp.core.dao.UniqueValueDaoFactory;
import org.openecomp.core.util.UniqueValueUtil;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.core.utilities.json.JsonUtil;
@@ -282,9 +283,11 @@ public class ActionManagerImpl implements ActionManager {
*/
@Override
public Action createAction(Action action, String user) throws ActionException {
+ UniqueValueUtil uniqueValueUtil =
+ new UniqueValueUtil(UniqueValueDaoFactory.getInstance().createInterface());
try {
actionLogPreProcessor(ActionSubOperation.VALIDATE_ACTION_UNIQUE_NAME, TARGET_ENTITY_API);
- UniqueValueUtil
+ uniqueValueUtil
.validateUniqueValue(ActionConstants.UniqueValues.ACTION_NAME, action.getName());
actionLogPostProcessor(StatusCode.COMPLETE);
} catch (CoreException exception) {
@@ -314,7 +317,7 @@ public class ActionManagerImpl implements ActionManager {
action = actionDao.createAction(action);
actionLogPreProcessor(ActionSubOperation.CREATE_ACTION_UNIQUE_VALUE, TARGET_ENTITY_API);
- UniqueValueUtil.createUniqueValue(ActionConstants.UniqueValues.ACTION_NAME, action.getName());
+ uniqueValueUtil.createUniqueValue(ActionConstants.UniqueValues.ACTION_NAME, action.getName());
actionLogPostProcessor(StatusCode.COMPLETE);
log.metrics("");
@@ -456,7 +459,9 @@ public class ActionManagerImpl implements ActionManager {
if (version.equals(new Version(0, 0))) {
actionLogPreProcessor(ActionSubOperation.DELETE_UNIQUEVALUE, TARGET_ENTITY_API);
- UniqueValueUtil
+ UniqueValueUtil uniqueValueUtil =
+ new UniqueValueUtil(UniqueValueDaoFactory.getInstance().createInterface());
+ uniqueValueUtil
.deleteUniqueValue(ActionConstants.UniqueValues.ACTION_NAME, action.getName());
actionLogPostProcessor(StatusCode.COMPLETE);
log.metrics("");