From 92c6d038046e5089f44c8c84764ff6ff11bbff47 Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Mon, 27 Aug 2018 19:53:34 -0400 Subject: Controller Blueprints Microservice Remove hard coded resource sources definitions such as Input, DB, MDSAL and Default and their dependencies. Change-Id: I6e00df176415560aa5bbbbf066e5a046878f3c58 Issue-ID: CCSDK-488 Signed-off-by: Brinda Santh --- .../service/ApplicationRegistrationService.java | 8 ++----- .../validator/ResourceDictionaryValidator.java | 26 +--------------------- 2 files changed, 3 insertions(+), 31 deletions(-) (limited to 'ms/controllerblueprints/modules/service') diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java index 074f18d05..6d0ec8899 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java @@ -1,5 +1,6 @@ /* * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +17,6 @@ package org.onap.ccsdk.apps.controllerblueprints.service; -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDictionaryConstants; -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.data.*; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; @@ -31,9 +30,6 @@ public class ApplicationRegistrationService { } public void registerDictionarySources(){ - SourceDeserializer.registerSource(ResourceDictionaryConstants.SOURCE_DB, SourceDb.class); - SourceDeserializer.registerSource(ResourceDictionaryConstants.SOURCE_INPUT, SourceInput.class); - SourceDeserializer.registerSource(ResourceDictionaryConstants.SOURCE_MDSAL, SourceMdsal.class); - SourceDeserializer.registerSource(ResourceDictionaryConstants.SOURCE_DEFAULT,SourceDefault.class); + } } diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java index eb2448e70..ff0b4ac5c 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java @@ -1,5 +1,6 @@ /* * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +19,6 @@ package org.onap.ccsdk.apps.controllerblueprints.service.validator; import com.google.common.base.Preconditions; import org.apache.commons.lang3.StringUtils; -import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException; -import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils; -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.data.DictionaryDefinition; import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary; /** @@ -34,28 +32,6 @@ public class ResourceDictionaryValidator { private ResourceDictionaryValidator() {} - /** - * This is a validateResourceDictionaryDefinition - * - * @param definitionContent - * @return boolean - * @throws BluePrintException - */ - public static boolean validateResourceDictionaryDefinition(String definitionContent) - throws BluePrintException { - boolean valid = true; - if (StringUtils.isNotBlank(definitionContent)) { - DictionaryDefinition dictionaryDefinition = - JacksonUtils.readValue(definitionContent, DictionaryDefinition.class); - if (dictionaryDefinition == null) { - throw new BluePrintException( - "Resource dictionary definition is not valid content " + definitionContent); - } - - } - return valid; - } - /** * This is a validateResourceDictionary method * -- cgit 1.2.3-korg