summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/config-snapshots
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2020-09-22 12:16:46 -0400
committerSingal, Kapil (ks220y) <ks220y@att.com>2020-09-22 13:49:05 -0400
commit1072867dfac0df993cbd3e44bcc11a5cac7465fd (patch)
tree4a821659cf3b50cf946cbb535d528be8508e9fff /ms/blueprintsprocessor/functions/config-snapshots
parentd97021cd756d63402545fdc2e14ac7611c3da118 (diff)
Enabling Code Formatter
Code Formatter was turned off due to java 11 migation Issue-ID: CCSDK-2852 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I3d02ed3cc7a93d7551fe25356512cfe8db1517d8
Diffstat (limited to 'ms/blueprintsprocessor/functions/config-snapshots')
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt5
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt1
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt6
3 files changed, 7 insertions, 5 deletions
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt
index 311e95bc2..af3753e1a 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt
@@ -56,6 +56,7 @@ open class ComponentConfigSnapshotsExecutor(private val cfgSnapshotService: Reso
AbstractComponentFunction() {
companion object {
+
private val log = LoggerFactory.getLogger(ComponentConfigSnapshotsExecutor::class.java)
// input fields names accepted by this executor
@@ -128,7 +129,7 @@ open class ComponentConfigSnapshotsExecutor(private val cfgSnapshotService: Reso
setNodeOutputProperties(OUTPUT_STATUS_SUCCESS, cfgSnapshotValue)
} catch (er: NoSuchElementException) {
val message = "No Resource config snapshot identified by resourceId={$resourceId}, " +
- "resourceType={$resourceType} does not exists"
+ "resourceType={$resourceType} does not exists"
setNodeOutputErrors(OUTPUT_STATUS_ERROR, message)
}
}
@@ -217,7 +218,7 @@ open class ComponentConfigSnapshotsExecutor(private val cfgSnapshotService: Reso
val output = StringBuilder()
output.append(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
- "<diff>"
+ "<diff>"
)
val diffIterator = differences.getDifferences().iterator()
while (diffIterator.hasNext()) {
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt
index 73c9e22f3..31d84e60d 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt
@@ -75,6 +75,7 @@ class ResourceConfigSnapshot : Serializable {
var createdDate = Date()
companion object {
+
private const val serialVersionUID = 1L
}
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
index 2383f2c64..06146c200 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
@@ -97,7 +97,7 @@ open class ResourceConfigSnapshotService(private val resourceConfigSnapshotRepos
?.let {
log.info(
"Overwriting configuration snapshot entry for resourceId=($resId), " +
- "resourceType=($resType), status=($status)"
+ "resourceType=($resType), status=($status)"
)
resourceConfigSnapshotRepository.deleteByResourceIdAndResourceTypeAndStatus(resId, resType, status)
}
@@ -107,8 +107,8 @@ open class ResourceConfigSnapshotService(private val resourceConfigSnapshotRepos
storedSnapshot = resourceConfigSnapshotRepository.saveAndFlush(resourceConfigSnapshotEntry)
log.info(
"Stored configuration snapshot for resourceId=($resId), " +
- "resourceType=($resType), status=($status), " +
- "dated=(${storedSnapshot.createdDate})"
+ "resourceType=($resType), status=($status), " +
+ "dated=(${storedSnapshot.createdDate})"
)
} catch (ex: DataIntegrityViolationException) {
throw BluePrintException("Failed to store configuration snapshot entry.", ex)