* See the License for the specific language governing permissions and\r
* limitations under the License.\r
*/\r
-\r
package org.onap.holmes.common.dcae.utils;\r
\r
import java.util.Arrays;\r
+import java.util.HashMap;\r
import java.util.List;\r
import java.util.Map.Entry;\r
import java.util.Set;\r
\r
public class DcaeConfigurationParser {\r
\r
+ private static final String RULE_CONTENT_SPLIT = "\\$\\$\\$";\r
+\r
private static final List<String> OBJECT_ATTRS = Arrays\r
.asList(new String[]{"streams_subscribes", "streams_publishes", "services_calls", "services_provides"});\r
\r
Set<Entry<String, Object>> entries = jsonObject.entrySet();\r
for (Entry<String, Object> entry : entries) {\r
if (entry.getKey().startsWith("holmes.default.rule")) {\r
- ret.addDefaultRule(new Rule(entry.getKey(), (String) entry.getValue()));\r
+ String value = (String) entry.getValue();\r
+ String[] contents = value.split(RULE_CONTENT_SPLIT);\r
+ ret.addDefaultRule(new Rule(entry.getKey(), contents[0], contents[1], 1));\r
}\r
}\r
}\r