aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2023-05-12 12:37:02 +0100
committerMichael Morris <michael.morris@est.tech>2023-05-17 10:03:18 +0000
commit38eaf2ddd678a837e2bfed25d5b4b45d72fce338 (patch)
treef29e12b7cb8d35ced709eed5dda1a476b90f3239 /catalog-be/src/main/java/org/openecomp
parent087d44cbb9d388c3a6c720ee9a6349bcaf6a1f04 (diff)
Disabling archive functionality for normatives
Issue-ID: SDC-4497 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: If7ce7205543682697a2b787aebfd4c8a3da25db7
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java
index 19afff0668..3806eed0dc 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java
@@ -77,7 +77,11 @@ public class ArchiveBusinessLogic {
User user = accessValidations.userIsAdminOrDesigner(userId, containerComponentType + "_ARCHIVE");
Either<List<String>, ActionStatus> result = this.archiveOperation.archiveComponent(componentId);
if (result.isRight()) {
- throw new ByActionStatusComponentException(result.right().value(), componentId);
+ ActionStatus status = result.right().value();
+ if (ActionStatus.CANNOT_ARCHIVE_SYSTEM_DEPLOYED_RESOURCES.equals(status)) {
+ throw new ByActionStatusComponentException(status, containerComponentType, componentId);
+ }
+ throw new ByActionStatusComponentException(status, componentId);
}
this.auditAction(ArchiveOperation.Action.ARCHIVE, result.left().value(), user, containerComponentType);
// Send Archive Notification To Facade