public final class RulesDB extends Object
| Constructor and Description |
|---|
RulesDB(io.cdap.cdap.api.dataset.table.Table rulebook,
io.cdap.cdap.api.dataset.table.Table rules,
io.cdap.cdap.api.messaging.MessagePublisher publisher) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRuleToRulebook(String rulebookId,
String ruleId) |
void |
cloneRulebook(String rulebookId) |
void |
createRule(RuleRequest rule) |
void |
createRulebook(Rulebook rulebook) |
void |
createRulebook(RulebookRequest rb) |
void |
deleteRule(String id) |
void |
deleteRulebook(String rulebookId) |
String |
generateRulebook(String rulebookId) |
com.google.gson.JsonArray |
getRulebookRules(String rulebookId) |
void |
removeRuleFromRulebook(String rulebookId,
String ruleId) |
Map<String,Object> |
retrieveRule(String id) |
String |
retrieveUsingRuleTemplate(String id) |
List<Map<String,Object>> |
rulebooks() |
List<Map<String,Object>> |
rules()
Lists the rules and rulebooks present in the system.
|
void |
updateRule(String id,
RuleRequest rule) |
void |
updateRulebook(String id,
RulebookRequest rb) |
public RulesDB(io.cdap.cdap.api.dataset.table.Table rulebook,
io.cdap.cdap.api.dataset.table.Table rules,
io.cdap.cdap.api.messaging.MessagePublisher publisher)
public void createRule(RuleRequest rule) throws RuleAlreadyExistsException
RuleAlreadyExistsExceptionpublic void updateRule(String id, RuleRequest rule) throws RuleNotFoundException
RuleNotFoundExceptionpublic Map<String,Object> retrieveRule(String id) throws RuleNotFoundException
RuleNotFoundExceptionpublic void deleteRule(String id) throws RuleNotFoundException
RuleNotFoundExceptionpublic String retrieveUsingRuleTemplate(String id) throws RuleNotFoundException
RuleNotFoundExceptionpublic void createRulebook(RulebookRequest rb) throws RulebookAlreadyExistsException, RuleNotFoundException
public void createRulebook(Rulebook rulebook) throws RulebookAlreadyExistsException
RulebookAlreadyExistsExceptionpublic void updateRulebook(String id, RulebookRequest rb) throws RulebookAlreadyExistsException, RuleNotFoundException
public void addRuleToRulebook(String rulebookId, String ruleId) throws RuleAlreadyExistsException, RulebookNotFoundException, RuleNotFoundException
public void removeRuleFromRulebook(String rulebookId, String ruleId) throws RuleAlreadyExistsException, RulebookNotFoundException, RuleNotFoundException
public void cloneRulebook(String rulebookId) throws RuleAlreadyExistsException, RulebookNotFoundException, RuleNotFoundException
public void deleteRulebook(String rulebookId) throws RulebookNotFoundException
RulebookNotFoundExceptionpublic com.google.gson.JsonArray getRulebookRules(String rulebookId) throws RulebookNotFoundException, RuleNotFoundException
public String generateRulebook(String rulebookId) throws RulebookNotFoundException, RuleNotFoundException
public List<Map<String,Object>> rules()
Copyright © 2020 CDAP Licensed under the Apache License, Version 2.0.