From 0007063cc856483e36dd49718dea5dda80ed6809 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Wed, 3 Apr 2019 21:36:57 -0400 Subject: Improve step data access. Change-Id: I3917905b1e38cebcb26e4422784a5553e2dbac9f Issue-ID: CCSDK-1127 Signed-off-by: Muthuramalingam, Brinda Santh --- .../service/handler/ResourceDictionaryHandler.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'ms/controllerblueprints/modules/service/src') diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/ResourceDictionaryHandler.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/ResourceDictionaryHandler.kt index df8cffdba..e339bcd68 100644 --- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/ResourceDictionaryHandler.kt +++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/ResourceDictionaryHandler.kt @@ -21,7 +21,7 @@ import com.google.common.base.Preconditions import org.apache.commons.collections.CollectionUtils import org.apache.commons.lang3.StringUtils import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException -import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmptyOrThrow +import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping import org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary @@ -137,12 +137,11 @@ class ResourceDictionaryHandler(private val resourceDictionaryRepository: Resour } private fun validateResourceDictionary(resourceDictionary: ResourceDictionary): Boolean { - checkNotEmptyOrThrow(resourceDictionary.name, "DataDictionary Definition name is missing.") + checkNotEmpty(resourceDictionary.name){ "DataDictionary Definition name is missing."} checkNotNull(resourceDictionary.definition) { "DataDictionary Definition Information is missing." } - checkNotEmptyOrThrow(resourceDictionary.description, "DataDictionary Definition Information is missing.") - checkNotEmptyOrThrow(resourceDictionary.tags, "DataDictionary Definition tags is missing.") - checkNotEmptyOrThrow(resourceDictionary.updatedBy, "DataDictionary Definition updatedBy is missing.") + checkNotEmpty(resourceDictionary.description){ "DataDictionary Definition Information is missing."} + checkNotEmpty(resourceDictionary.tags){ "DataDictionary Definition tags is missing."} + checkNotEmpty(resourceDictionary.updatedBy){ "DataDictionary Definition updatedBy is missing."} return true - } } \ No newline at end of file -- cgit 1.2.3-korg