summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/resource-dict
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints/modules/resource-dict')
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java13
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt5
2 files changed, 9 insertions, 9 deletions
diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java b/ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java
index c980a0c0..c9b37c26 100644
--- a/ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java
+++ b/ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java
@@ -29,15 +29,16 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
+
/**
- *
* ResourceAssignmentValidator.java Purpose:
+ *
* @author Brinda Santh
*/
public class ResourceAssignmentValidator {
private static final Logger log = LoggerFactory.getLogger(ResourceAssignmentValidator.class);
private List<ResourceAssignment> assignments;
- private Map<String, ResourceAssignment> resourceAssignmentMap = new HashMap();
+ private Map<String, ResourceAssignment> resourceAssignmentMap = new HashMap<>();
private StrBuilder validationMessage = new StrBuilder();
public ResourceAssignmentValidator(List<ResourceAssignment> assignments) {
@@ -72,7 +73,7 @@ public class ResourceAssignmentValidator {
* This is a validateResourceAssignment to validate the Topology Template
*
* @return boolean
- * @throws BluePrintException
+ * @throws BluePrintException BluePrintException
*/
public boolean validateResourceAssignment() throws BluePrintException {
if (assignments != null && !assignments.isEmpty()) {
@@ -142,16 +143,14 @@ public class ResourceAssignmentValidator {
neighbors.forEach((v, vs) -> {
if (v == null) {
s.append("\n * -> [");
- List<ResourceAssignment> links = vs;
- for (ResourceAssignment resourceAssignment : links) {
+ for (ResourceAssignment resourceAssignment : vs) {
s.append("(" + resourceAssignment.getDictionaryName() + ":" + resourceAssignment.getName()
+ "),");
}
s.append("]");
} else {
s.append("\n (" + v.getDictionaryName() + ":" + v.getName() + ") -> [");
- List<ResourceAssignment> links = vs;
- for (ResourceAssignment resourceAssignment : links) {
+ for (ResourceAssignment resourceAssignment : vs) {
s.append("(" + resourceAssignment.getDictionaryName() + ":" + resourceAssignment.getName()
+ "),");
}
diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt
index 6809831f..6a78ac85 100644
--- a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt
+++ b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt
@@ -16,15 +16,16 @@
package org.onap.ccsdk.apps.controllerblueprints.resource.dict.service
+import org.apache.commons.collections.CollectionUtils
+import org.apache.commons.lang3.StringUtils
import org.apache.commons.lang3.text.StrBuilder
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.apps.controllerblueprints.core.utils.TopologicalSortingUtils
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.validator.ResourceAssignmentValidator
import org.slf4j.LoggerFactory
-import org.apache.commons.collections.CollectionUtils
-import org.apache.commons.lang3.StringUtils
import java.io.Serializable
+
/**
* ResourceAssignmentValidationService.
*