summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/main
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2018-08-27 19:53:34 -0400
committerBrinda Santh <brindasanth@in.ibm.com>2018-08-27 19:53:34 -0400
commit92c6d038046e5089f44c8c84764ff6ff11bbff47 (patch)
tree7017be8ac10657e69a6585aeb1fc93e3d4b021b2 /ms/controllerblueprints/modules/service/src/main
parent71778e1656729e8e153d844275b2de96d30febca (diff)
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 <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/main')
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java8
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java26
2 files changed, 3 insertions, 31 deletions
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;
/**
@@ -35,28 +33,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
*
* @param resourceDictionary