aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/main
diff options
context:
space:
mode:
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/DataBaseInitService.java14
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt5
2 files changed, 10 insertions, 9 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java
index 88680929..c6d80cfb 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java
@@ -60,16 +60,19 @@ import java.util.List;
public class DataBaseInitService {
private static EELFLogger log = EELFManager.getInstance().getLogger(DataBaseInitService.class);
- @Value("${blueprints.load.path}")
- private String modelLoadPath;
private ModelTypeService modelTypeService;
private ResourceDictionaryService resourceDictionaryService;
private ConfigModelService configModelService;
+ @Value("${load.dataTypePath}")
private String dataTypePath;
+ @Value("${load.nodeTypePath}")
private String nodeTypePath;
+ @Value("${load.artifactTypePath}")
private String artifactTypePath;
+ @Value("${load.resourceDictionaryPath}")
private String resourceDictionaryPath;
+ @Value("${load.blueprintsPath}")
private String bluePrintsPath;
@Autowired
@@ -94,13 +97,6 @@ public class DataBaseInitService {
@PostConstruct
@SuppressWarnings("unused")
private void initDatabase() {
- log.info("loading Blueprints from DIR : {}", modelLoadPath);
- dataTypePath = modelLoadPath + "/model_type/data_type";
- nodeTypePath = modelLoadPath + "/model_type/node_type";
- artifactTypePath = modelLoadPath + "/model_type/artifact_type";
- resourceDictionaryPath = modelLoadPath + "/resource_dictionary";
- bluePrintsPath = modelLoadPath + "/blueprints";
-
log.info("loading dataTypePath from DIR : {}", dataTypePath);
log.info("loading nodeTypePath from DIR : {}", nodeTypePath);
log.info("loading artifactTypePath from DIR : {}", artifactTypePath);
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt
index 92172a2e..064b5c38 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt
@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
import reactor.core.scheduler.Schedulers
+
/**
* ResourceDictionaryReactRepository.
*
@@ -30,6 +31,10 @@ import reactor.core.scheduler.Schedulers
@Service
open class ResourceDictionaryReactRepository(private val resourceDictionaryRepository: ResourceDictionaryRepository) {
+ fun save(resourceDictionary: ResourceDictionary): Mono<ResourceDictionary> {
+ return Mono.justOrEmpty(resourceDictionaryRepository.save(resourceDictionary))
+ }
+
fun findByName(name: String): Mono<ResourceDictionary> {
return Mono.justOrEmpty(resourceDictionaryRepository.findByName(name))
}