summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2020-05-18 12:59:57 +0300
committerEinat Vinouze <einat.vinouze@intl.att.com>2020-05-19 08:53:30 +0300
commit19016e3c0951ff994956e93b1c24e412a7ed542e (patch)
tree9459b6a941617cf9c7c90261d3305391f26dab50 /vid-app-common/src/main/java
parentaaec5296d2fa63828c320e4a3fb1e5ed0e168de2 (diff)
Introduce FeatureManager to ResourceCommand
Issue-ID: VID-821 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com> Change-Id: Id6c663d4612d69a48b4a9425db082fb6c33e08b1 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt6
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt8
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupMemberCommand.kt6
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceCommand.kt6
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/NetworkCommand.kt8
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt6
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt6
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleCommand.kt6
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/VnfCommand.kt2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupCommand.kt6
10 files changed, 40 insertions, 20 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt
index 9bef3c11b..df39f7387 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt
@@ -36,6 +36,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.http.HttpMethod
import org.springframework.stereotype.Component
+import org.togglz.core.manager.FeatureManager
import java.time.ZonedDateTime
import java.time.temporal.ChronoUnit
import java.util.*
@@ -63,9 +64,10 @@ class ALaCarteServiceCommand @Autowired constructor(
msoResultHandlerService: MsoResultHandlerService,
jobAdapter: JobAdapter,
restMso: RestMsoImplementation,
- auditService: AuditService
+ auditService: AuditService,
+ featureManager: FeatureManager
) : RootServiceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter, asyncInstantiationBL, auditService, msoRequestBuilder), JobCommand {
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, asyncInstantiationBL, auditService, msoRequestBuilder, featureManager), JobCommand {
companion object {
private val LOGGER = EELFLoggerDelegate.getLogger(ALaCarteServiceCommand::class.java)
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt
index 886251a0c..60d051943 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt
@@ -34,6 +34,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.http.HttpMethod
import org.springframework.stereotype.Component
+import org.togglz.core.manager.FeatureManager
import java.util.*
@Component
@@ -46,9 +47,10 @@ class InstanceGroupCommand @Autowired constructor(
inProgressStatusService:InProgressStatusService,
watchChildrenJobsBL: WatchChildrenJobsBL,
jobsBrokerService: JobsBrokerService,
- jobAdapter: JobAdapter
- ) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+ jobAdapter: JobAdapter,
+ featureManager: FeatureManager
+) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, featureManager), JobCommand {
companion object {
private val LOGGER = EELFLoggerDelegate.getLogger(InstanceGroupCommand::class.java)
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupMemberCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupMemberCommand.kt
index d8e9297a3..b70c4495b 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupMemberCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupMemberCommand.kt
@@ -13,6 +13,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.http.HttpMethod
import org.springframework.stereotype.Component
+import org.togglz.core.manager.FeatureManager
import java.util.*
@Component
@@ -25,9 +26,10 @@ class InstanceGroupMemberCommand @Autowired constructor(
inProgressStatusService:InProgressStatusService,
watchChildrenJobsBL: WatchChildrenJobsBL,
jobsBrokerService: JobsBrokerService,
- jobAdapter: JobAdapter
+ jobAdapter: JobAdapter,
+ featureManager: FeatureManager
) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, featureManager), JobCommand {
companion object {
private val LOGGER = EELFLoggerDelegate.getLogger(InstanceGroupMemberCommand::class.java)
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceCommand.kt
index 8ce73d713..c3744b5cd 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceCommand.kt
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.http.HttpMethod
import org.springframework.stereotype.Component
+import org.togglz.core.manager.FeatureManager
import java.util.*
@Component
@@ -34,9 +35,10 @@ class MacroServiceCommand @Autowired constructor(
msoResultHandlerService: MsoResultHandlerService,
jobAdapter: JobAdapter,
restMso: RestMsoImplementation,
- auditService: AuditService
+ auditService: AuditService,
+ featureManager: FeatureManager
) : RootServiceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter, asyncInstantiationBL, auditService, msoRequestBuilder), JobCommand {
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, asyncInstantiationBL, auditService, msoRequestBuilder, featureManager), JobCommand {
companion object {
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkCommand.kt
index 6c9af14ea..3cf2b2845 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkCommand.kt
@@ -13,6 +13,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.http.HttpMethod
import org.springframework.stereotype.Component
+import org.togglz.core.manager.FeatureManager
import java.util.*
@@ -26,9 +27,10 @@ class NetworkCommand @Autowired constructor(
inProgressStatusService:InProgressStatusService,
watchChildrenJobsBL: WatchChildrenJobsBL,
jobsBrokerService: JobsBrokerService,
- jobAdapter: JobAdapter
- ) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+ jobAdapter: JobAdapter,
+ featureManager: FeatureManager
+) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, featureManager), JobCommand {
override fun createChildren(): Job.JobStatus {
return Job.JobStatus.COMPLETED_WITH_NO_ACTION
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
index 2b5ec0127..9b4f8b985 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
@@ -33,11 +33,14 @@ import org.onap.vid.job.impl.JobSharedData
import org.onap.vid.model.Action
import org.onap.vid.model.RequestReferencesContainer
import org.onap.vid.model.serviceInstantiation.BaseResource
+import org.onap.vid.model.serviceInstantiation.BaseResource.PauseInstantiation.afterCompletion
import org.onap.vid.mso.RestMsoImplementation
import org.onap.vid.mso.model.ModelInfo
+import org.onap.vid.properties.Features
import org.onap.vid.utils.JACKSON_OBJECT_MAPPER
import org.onap.vid.utils.getEnumFromMapOfStrings
import org.springframework.http.HttpMethod
+import org.togglz.core.manager.FeatureManager
import java.util.*
@@ -76,7 +79,8 @@ abstract class ResourceCommand(
protected val msoResultHandlerService: MsoResultHandlerService,
protected val watchChildrenJobsBL: WatchChildrenJobsBL,
private val jobsBrokerService: JobsBrokerService,
- private val jobAdapter: JobAdapter
+ private val jobAdapter: JobAdapter,
+ private val featureManager: FeatureManager
) : CommandBase(), JobCommand {
companion object {
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt
index c4680b2bd..d13ecd7a0 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt
@@ -13,6 +13,7 @@ import org.onap.vid.services.AsyncInstantiationBusinessLogic
import org.onap.vid.services.AuditService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpMethod
+import org.togglz.core.manager.FeatureManager
import java.util.*
abstract class RootServiceCommand @Autowired constructor(
@@ -24,9 +25,10 @@ abstract class RootServiceCommand @Autowired constructor(
jobAdapter: JobAdapter,
private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
private val auditService: AuditService,
- private val msoRequestBuilder: MsoRequestBuilder
+ private val msoRequestBuilder: MsoRequestBuilder,
+ featureManager: FeatureManager
) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, featureManager), JobCommand {
lateinit var optimisticUniqueServiceInstanceName: String
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleCommand.kt
index 29d7001e2..a92f610da 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleCommand.kt
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.http.HttpMethod
import org.springframework.stereotype.Component
+import org.togglz.core.manager.FeatureManager
import java.util.*
typealias ToscaVfm = org.onap.vid.model.VfModule
@@ -30,9 +31,10 @@ class VfmoduleCommand @Autowired constructor(
inProgressStatusService:InProgressStatusService,
watchChildrenJobsBL: WatchChildrenJobsBL,
jobsBrokerService: JobsBrokerService,
- jobAdapter: JobAdapter
+ jobAdapter: JobAdapter,
+ featureManager: FeatureManager
) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, featureManager), JobCommand {
companion object {
private val LOGGER = EELFLoggerDelegate.getLogger(VfmoduleCommand::class.java)
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VnfCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/VnfCommand.kt
index 1eb9799a0..e2bc6dcef 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/VnfCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/VnfCommand.kt
@@ -39,7 +39,7 @@ class VnfCommand @Autowired constructor(
jobAdapter: JobAdapter,
private val featureManager: FeatureManager
) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, featureManager), JobCommand {
private var needToCreateBaseModule:Boolean by Delegates.notNull<Boolean>()
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupCommand.kt
index 9794933ce..906ff2674 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupCommand.kt
@@ -13,6 +13,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.http.HttpMethod
import org.springframework.stereotype.Component
+import org.togglz.core.manager.FeatureManager
import java.util.*
@Component
@@ -25,9 +26,10 @@ class VolumeGroupCommand @Autowired constructor(
inProgressStatusService:InProgressStatusService,
watchChildrenJobsBL: WatchChildrenJobsBL,
jobsBrokerService: JobsBrokerService,
- jobAdapter: JobAdapter
+ jobAdapter: JobAdapter,
+ featureManager: FeatureManager
) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
- watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+ watchChildrenJobsBL, jobsBrokerService, jobAdapter, featureManager), JobCommand {
companion object {
private val LOGGER = EELFLoggerDelegate.getLogger(VolumeGroupCommand::class.java)