diff options
Diffstat (limited to 'openecomp-be')
2 files changed, 64 insertions, 15 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 dc101ae955..a317d41a50 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 @@ -16,10 +16,64 @@ package org.openecomp.sdc.action.impl; +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_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; +import static org.openecomp.sdc.action.ActionConstants.TARGET_ENTITY_API; +import static org.openecomp.sdc.action.ActionConstants.TARGET_ENTITY_DB; +import static org.openecomp.sdc.action.ActionConstants.UNIQUE_ID; +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_DELETE_READ_ONLY; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_DELETE_READ_ONLY_MSG; +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; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_UPDATE_READ_ONLY_MSG; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_CHECKIN_ON_UNLOCKED_ENTITY; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_CHECKOUT_ON_LOCKED_ENTITY; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_CHECKOUT_ON_LOCKED_ENTITY_OTHER_USER; +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_INTERNAL_SERVER_ERR_CODE; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUESTED_VERSION_INVALID; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_SUBMIT_LOCKED_ENTITY_NOT_ALLOWED; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UNDO_CHECKOUT_ON_UNLOCKED_ENTITY; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_INVALID_VERSION; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_CODE; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_CODE_NAME; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_FOR_NAME; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_ON_UNLOCKED_ENTITY; +import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_PARAM_INVALID; +import static org.openecomp.sdc.action.util.ActionUtil.actionLogPostProcessor; +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 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 org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.openecomp.core.dao.UniqueValueDao; -import org.openecomp.core.dao.UniqueValueDao; import org.openecomp.core.dao.UniqueValueDaoFactory; import org.openecomp.core.util.UniqueValueUtil; import org.openecomp.core.utilities.CommonMethods; @@ -35,7 +89,12 @@ 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.*; +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; @@ -52,13 +111,6 @@ import org.openecomp.sdc.versioning.types.VersionInfo; import org.openecomp.sdc.versioning.types.VersionableEntityAction; import org.slf4j.MDC; -import java.util.*; - -import static org.openecomp.sdc.action.ActionConstants.*; -import static org.openecomp.sdc.action.errors.ActionErrorConstants.*; -import static org.openecomp.sdc.action.util.ActionUtil.*; -import static org.openecomp.sdc.versioning.dao.types.Version.VERSION_STRING_VIOLATION_MSG; - /** * Manager Implementation for {@link ActionManager Action Library Operations} * <br> diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/deserializers/RequirementDefinitionDeserializer.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/deserializers/RequirementDefinitionDeserializer.java index 7d3f610ec7..4a2fcaf9fa 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/deserializers/RequirementDefinitionDeserializer.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/deserializers/RequirementDefinitionDeserializer.java @@ -19,20 +19,17 @@ */ package org.openecomp.core.utilities.deserializers; +import java.lang.reflect.Type; +import java.util.Objects; +import java.util.Optional; import org.onap.sdc.tosca.datatypes.model.RequirementDefinition; - import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; import com.google.gson.JsonPrimitive; -import java.lang.reflect.Type; -import java.util.Objects; -import java.util.Optional; - public class RequirementDefinitionDeserializer implements JsonDeserializer<RequirementDefinition> { private static final String CAPABILITY = "capability"; |