diff options
author | 2018-03-27 19:44:23 +0530 | |
---|---|---|
committer | 2018-03-27 19:44:43 +0530 | |
commit | 8297bd0760ff3c46ef36d5a6408a757cf36097fe (patch) | |
tree | 8436740e2c4039c4e5e93bcdf66792844a89ecbe /UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/MongoDbConfigFileService.java | |
parent | a0cd2159e2dbfde7613ea7dda8db1eacced4ca69 (diff) |
Added UniversalVesAdapter TestCases in the Mapper
Adding UniversalVesAdapter TestCases in Mapper
Change-Id: I68023d84ada0104ecf46a74e129e104a398543ea
Issue-ID: DCAEGEN2-335
Signed-off-by: Pooja03 <PM00501616@techmahindra.com>
Diffstat (limited to 'UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/MongoDbConfigFileService.java')
-rw-r--r-- | UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/MongoDbConfigFileService.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/MongoDbConfigFileService.java b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/MongoDbConfigFileService.java index bab304a..77769f5 100644 --- a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/MongoDbConfigFileService.java +++ b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/MongoDbConfigFileService.java @@ -37,8 +37,14 @@ public class MongoDbConfigFileService implements ConfigFileService { public String readConfigFile(String configFileName){ //HERE CONFIG FILE DATA WOULD COME FROM MONGO DB ConfigFileData configFileData = new ConfigFileData(); - configFileData.setXmlFileName(""); - configFileData.setXmlContent("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.1.xsd\" xmlns:json=\"http://www.milyn.org/xsd/smooks/json-1.1.xsd\" xmlns:jb=\"http://www.milyn.org/xsd/smooks/javabean-1.2.xsd\"> <json:reader rootName=\"simple\" keyWhitspaceReplacement=\"-\"> </json:reader> <!-- <jb:bean class=\"com.example.demo.Simple\" beanId=\"simple\" createOnElement=\"simple\"> <jb:value property=\"orderId\" data=\"#/orderId\" /> <jb:value property=\"username\" data=\"#/username\" /> <jb:wiring property=\"customer\" beanIdRef=\"customer\"/> <jb:wiring property=\"orderItems\" beanIdRef=\"orderItems\"/> </jb:bean> --> <jb:bean class=\"org.onap.dcaegen2.ves.domain.VesEvent\" beanId=\"vesEvent\" createOnElement=\"simple\"> <jb:wiring property=\"event\" beanIdRef=\"event\"/> </jb:bean> <jb:bean class=\"org.onap.dcaegen2.ves.domain.Event\" beanId=\"event\" createOnElement=\"simple\"> <jb:wiring property=\"commonEventHeader\" beanIdRef=\"commonEventHeader\"/> <jb:wiring property=\"faultFields\" beanIdRef=\"faultFields\"/> <jb:wiring property=\"measurementsForVfScalingFields\" beanIdRef=\"measurementsForVfScalingFields\"/> </jb:bean> <jb:bean class=\"org.onap.dcaegen2.ves.domain.MeasurementsForVfScalingFields\" beanId=\"measurementsForVfScalingFields\" createOnElement=\"simple\"> <jb:wiring property=\"additionalMeasurements\" beanIdRef=\"additionalMeasurements\"/> </jb:bean> <jb:bean class=\"org.onap.dcaegen2.ves.domain.CommonEventHeader\" beanId=\"commonEventHeader\" createOnElement=\"simple\"> <jb:value property=\"eventId\" data=\"#/community\" /> <jb:value property=\"eventName\" data=\"#/protocol-version\" /> <jb:value property=\"domain\" data=\"#/trap-category\" /> <jb:value property=\"sequence\" data=\"#/time-received\" decoder=\"Long\"/> <jb:value property=\"lastEpochMicrosec\" data=\"#/community-len\" decoder=\"Double\" /> <jb:value property=\"startEpochMicrosec\" data=\"#/notify-OID-len\" /> </jb:bean> <jb:bean class=\"org.onap.dcaegen2.ves.domain.FaultFields\" beanId=\"faultFields\" createOnElement=\"simple\"> <jb:value property=\"alarmCondition\" data=\"#/cambria.partition\" /> <jb:value property=\"eventSeverity\" data=\"#/notify-OID\" /> <jb:value property=\"eventSourceType\" data=\"#/agent-name\" /> <jb:value property=\"specificProblem\" data=\"#/agent-address\" /> <jb:value property=\"faultFieldsVersion\" data=\"#/epoch_serno\" decoder=\"Double\" /> </jb:bean> <jb:bean class=\"java.util.ArrayList\" beanId=\"additionalMeasurements\" createOnElement=\"simple\"> <jb:wiring beanIdRef=\"additionalMeasurement\"/> </jb:bean> <jb:bean class=\"org.onap.dcaegen2.ves.domain.AdditionalMeasurement\" beanId=\"additionalMeasurement\" createOnElement=\"varbinds/element\"> <jb:value property=\"name\" data=\"#/varbind_value\" /> </jb:bean> </smooks-resource-list>"); + configFileData.setXmlFileName(configFileName); + configFileData.setXmlContent("<?xml version=\"1.0\" encoding=\"UTF-8\"?> " + + "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.1.xsd\" " + + "xmlns:json=\"http://www.milyn.org/xsd/smooks/json-1.1.xsd\" " + + " xmlns:jb=\"http://www.milyn.org/xsd/smooks/javabean-1.2.xsd\"> " + + " <json:reader rootName=\"simple\" keyWhitspaceReplacement=\"-\"> " + + " </json:reader> " + + "</smooks-resource-list>"); return configFileData.getXmlContent(); } |