summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-action-manager
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2017-12-20 14:30:43 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-21 11:12:33 +0000
commit8e9c0653dd6c6862123c9609ae34e1206d86456e (patch)
tree5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-be/backend/openecomp-sdc-action-manager
parent785ebcc95de3e064e843bec04ba7a209d854fc7c (diff)
Add collaboration feature
Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-action-manager')
-rw-r--r--openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java92
-rw-r--r--openecomp-be/backend/openecomp-sdc-action-manager/src/test/java/org/openecomp/sdc/action/ActionTest.java51
2 files changed, 48 insertions, 95 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 f9b6bfe8a9..492bfef019 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
@@ -20,14 +20,61 @@
package org.openecomp.sdc.action.impl;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
+import org.openecomp.core.util.UniqueValueUtil;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.action.ActionConstants;
+import org.openecomp.sdc.action.ActionManager;
+import org.openecomp.sdc.action.dao.ActionArtifactDao;
+import org.openecomp.sdc.action.dao.ActionArtifactDaoFactory;
+import org.openecomp.sdc.action.dao.ActionDao;
+import org.openecomp.sdc.action.dao.ActionDaoFactory;
+import org.openecomp.sdc.action.dao.types.ActionArtifactEntity;
+import org.openecomp.sdc.action.dao.types.ActionEntity;
+import org.openecomp.sdc.action.errors.ActionErrorConstants;
+import org.openecomp.sdc.action.errors.ActionException;
+import org.openecomp.sdc.action.logging.StatusCode;
+import org.openecomp.sdc.action.types.Action;
+import org.openecomp.sdc.action.types.ActionArtifact;
+import org.openecomp.sdc.action.types.ActionArtifactProtection;
+import org.openecomp.sdc.action.types.ActionStatus;
+import org.openecomp.sdc.action.types.ActionSubOperation;
+import org.openecomp.sdc.action.types.OpenEcompComponent;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
+import org.openecomp.sdc.versioning.VersioningManager;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
+import org.openecomp.sdc.versioning.dao.types.UserCandidateVersion;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
+import org.openecomp.sdc.versioning.errors.EntityNotExistErrorBuilder;
+import org.openecomp.sdc.versioning.errors.VersioningErrorCodes;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+import org.openecomp.sdc.versioning.types.VersionableEntityAction;
+import org.slf4j.MDC;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
import static org.openecomp.sdc.action.ActionConstants.ACTION_VERSIONABLE_TYPE;
import static org.openecomp.sdc.action.ActionConstants.ARTIFACT_METADATA_ATTR_NAME;
import static org.openecomp.sdc.action.ActionConstants.ARTIFACT_METADATA_ATTR_UUID;
import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_CATEGORY;
-import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_OPEN_ECOMP_COMPONENT;
import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_MODEL;
import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_NAME;
import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_NONE;
+import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_OPEN_ECOMP_COMPONENT;
import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_VENDOR;
import static org.openecomp.sdc.action.ActionConstants.SERVICE_INSTANCE_ID;
import static org.openecomp.sdc.action.ActionConstants.STATUS;
@@ -68,49 +115,6 @@ import static org.openecomp.sdc.action.util.ActionUtil.actionLogPreProcessor;
import static org.openecomp.sdc.action.util.ActionUtil.getCurrentTimeStampUtc;
import static org.openecomp.sdc.versioning.dao.types.Version.VERSION_STRING_VIOLATION_MSG;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.openecomp.sdc.action.types.*;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.core.util.UniqueValueUtil;
-import org.openecomp.core.utilities.CommonMethods;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.action.ActionConstants;
-import org.openecomp.sdc.action.ActionManager;
-import org.openecomp.sdc.action.dao.ActionArtifactDao;
-import org.openecomp.sdc.action.dao.ActionArtifactDaoFactory;
-import org.openecomp.sdc.action.dao.ActionDao;
-import org.openecomp.sdc.action.dao.ActionDaoFactory;
-import org.openecomp.sdc.action.dao.types.ActionArtifactEntity;
-import org.openecomp.sdc.action.dao.types.ActionEntity;
-import org.openecomp.sdc.action.errors.ActionErrorConstants;
-import org.openecomp.sdc.action.errors.ActionException;
-import org.openecomp.sdc.action.logging.StatusCode;
-import org.openecomp.sdc.action.types.OpenEcompComponent;
-import org.openecomp.sdc.common.errors.CoreException;
-import org.openecomp.sdc.versioning.VersioningManager;
-import org.openecomp.sdc.versioning.VersioningManagerFactory;
-import org.openecomp.sdc.versioning.dao.VersionInfoDao;
-import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
-import org.openecomp.sdc.versioning.dao.types.UserCandidateVersion;
-import org.openecomp.sdc.versioning.dao.types.Version;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-import org.openecomp.sdc.versioning.errors.EntityNotExistErrorBuilder;
-import org.openecomp.sdc.versioning.errors.VersioningErrorCodes;
-import org.openecomp.sdc.versioning.types.VersionInfo;
-import org.openecomp.sdc.versioning.types.VersionableEntityAction;
-import org.slf4j.MDC;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
/**
* Manager Implementation for {@link ActionManager Action Library Operations} <br> Handles Business
* layer validations and acts as an interface between the REST and DAO layers.
diff --git a/openecomp-be/backend/openecomp-sdc-action-manager/src/test/java/org/openecomp/sdc/action/ActionTest.java b/openecomp-be/backend/openecomp-sdc-action-manager/src/test/java/org/openecomp/sdc/action/ActionTest.java
index a8f7b692ab..582a4c7235 100644
--- a/openecomp-be/backend/openecomp-sdc-action-manager/src/test/java/org/openecomp/sdc/action/ActionTest.java
+++ b/openecomp-be/backend/openecomp-sdc-action-manager/src/test/java/org/openecomp/sdc/action/ActionTest.java
@@ -20,57 +20,6 @@
package org.openecomp.sdc.action;
-import static org.openecomp.sdc.action.ActionConstants.FILTER_TYPE_NAME;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_ALREADY_EXISTS;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_ALREADY_EXISTS_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_ENTITY_NOT_EXIST;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_ENTITY_NOT_EXIST_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_UPDATE_NAME_INVALID;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_UPDATE_READ_ONLY_MSG;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_DELETE_ON_LOCKED_ENTITY_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_NOT_EXIST;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_NOT_EXIST_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_UNIQUE_VALUE_ERROR;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_UNIQUE_VALUE_MSG;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_NOT_LOCKED_CODE;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_NOT_LOCKED_MSG;
-import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_ON_UNLOCKED_ENTITY;
-
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.action.dao.ActionDao;
-import org.openecomp.sdc.action.dao.ActionDaoFactory;
-import org.openecomp.sdc.action.dao.types.ActionEntity;
-import org.openecomp.sdc.action.errors.ActionErrorConstants;
-import org.openecomp.sdc.action.errors.ActionException;
-import org.openecomp.sdc.action.impl.ActionManagerImpl;
-import org.openecomp.sdc.action.types.Action;
-import org.openecomp.sdc.action.types.ActionArtifact;
-import org.openecomp.sdc.action.types.ActionArtifactProtection;
-import org.openecomp.sdc.action.types.ActionStatus;
-import org.openecomp.sdc.action.types.OpenEcompComponent;
-import org.openecomp.sdc.versioning.dao.types.Version;
-import org.testng.Assert;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-
@SuppressWarnings("Duplicates")
public class ActionTest {