public interface ValidationManager
Modifier and Type | Method and Description |
---|---|
Result[] |
evaluate(Repository.UnitOfWork uow,
KomodoObject kObject,
boolean full)
Evaluate the supplied object using all applicable rules for the object.
|
Result[] |
evaluate(Repository.UnitOfWork uow,
KomodoObject kObject,
String... ruleId)
Evaluate the supplied object using the specified rules (if the rule is applicable for the object).
|
Rule[] |
getAllRules(Repository.UnitOfWork uow)
Gets all of the current rules
|
Rule |
getRule(Repository.UnitOfWork uow,
String ruleId)
Get the rule with the specified RuleId
|
Rule[] |
getRules(Repository.UnitOfWork uow,
KomodoObject kObj)
Gets the Rules that are valid for the supplied KomodoObject
|
void |
importRules(Repository.UnitOfWork uow,
File rulesXmlFile,
boolean overwriteExisting) |
boolean |
isApplicable(Repository.UnitOfWork uow,
String ruleId,
KomodoObject kObj)
Determine if the specified RuleId is applicable for the supplied KomodoObject
|
void |
setRuleEnabled(Repository.UnitOfWork uow,
boolean isEnabled,
String... ruleId)
Set the Rule enablement
|
void |
setRuleSeverity(Repository.UnitOfWork uow,
Outcome.Level severity,
String... ruleId)
Set the Rule severity
|
List<String> |
validateRules(File rulesXmlFile) |
List<String> validateRules(File rulesXmlFile) throws KException
rulesXmlFile
- the file whose rule definitions are being validated (cannot be null
)null
but can be empty)KException
- if an error occursvoid importRules(Repository.UnitOfWork uow, File rulesXmlFile, boolean overwriteExisting) throws KException
uow
- the transactionrulesXmlFile
- the file whose rule definitions are being imported (cannot be null
)overwriteExisting
- 'true' will replace all existing rules.KException
- if an error occursRule[] getAllRules(Repository.UnitOfWork uow) throws KException
uow
- the transactionnull
but can be empty)KException
- if an error occursRule[] getRules(Repository.UnitOfWork uow, KomodoObject kObj) throws KException
uow
- the transactionkObj
- the KomodoObjectnull
but can be empty)KException
- if an error occursRule getRule(Repository.UnitOfWork uow, String ruleId) throws KException
uow
- the transactionruleId
- the Rule IDnull
if not foundKException
- if an error occursboolean isApplicable(Repository.UnitOfWork uow, String ruleId, KomodoObject kObj) throws KException
uow
- the transactionruleId
- the Rule IDkObj
- the Komodo Objecttrue
if the rule is applicable, false
if not.KException
- if an error occursvoid setRuleEnabled(Repository.UnitOfWork uow, boolean isEnabled, String... ruleId) throws KException
uow
- the transactionisEnabled
- true
to enable Rule, false
to disable.ruleId
- the Rule IDsKException
- if an error occursvoid setRuleSeverity(Repository.UnitOfWork uow, Outcome.Level severity, String... ruleId) throws KException
uow
- the transactionseverity
- the rule severityruleId
- the Rule IDsKException
- if an error occursResult[] evaluate(Repository.UnitOfWork uow, KomodoObject kObject, boolean full) throws KException
uow
- the transactionkObject
- the object to validatefull
- true
will validate the node and all of its ancestors. false
only validates the supplied node.null
but can be empty)KException
- if an error occursResult[] evaluate(Repository.UnitOfWork uow, KomodoObject kObject, String... ruleId) throws KException
uow
- the transactionkObject
- the kObjruleId
- the rule IDsnull
but can be empty)KException
- if an error occursCopyright © 2013–2019. All rights reserved.