Modifier and Type | Class and Description |
---|---|
static class |
ProblemRule.Type
ProblemRule types
|
Rule.MessageKey, Rule.PropertyRestriction, Rule.RuleType, Rule.ValidationType
Constructor and Description |
---|
ProblemRule(String ruleId,
ProblemRule.Type type)
Constructor
|
public ProblemRule(String ruleId, ProblemRule.Type type)
ruleId
- the Rule id.type
- the problem rule type.public Result evaluate(Repository.UnitOfWork transaction, KomodoObject kobject) throws KException
evaluate
in interface Rule
KException
Rule.evaluate(org.komodo.spi.repository.Repository.UnitOfWork, org.komodo.spi.repository.KomodoObject)
public String getDescription(Repository.UnitOfWork transaction)
getDescription
in interface Rule
Rule.getDescription(org.komodo.spi.repository.Repository.UnitOfWork)
public String getJcrName(Repository.UnitOfWork transaction)
getJcrName
in interface Rule
Rule.getJcrName(org.komodo.spi.repository.Repository.UnitOfWork)
public String getMessage(Repository.UnitOfWork transaction, String key)
getMessage
in interface Rule
Rule.getMessage(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public String getName(Repository.UnitOfWork transaction)
getName
in interface Rule
Rule.getName(org.komodo.spi.repository.Repository.UnitOfWork)
public String getNodeType(Repository.UnitOfWork transaction)
getNodeType
in interface Rule
Rule.getNodeType(org.komodo.spi.repository.Repository.UnitOfWork)
public Map<String,String> getPropRestrictions(Repository.UnitOfWork transaction, Rule.PropertyRestriction restrictionType)
public Rule.RuleType getRuleType(Repository.UnitOfWork transaction)
getRuleType
in interface Rule
Rule.getRuleType(org.komodo.spi.repository.Repository.UnitOfWork)
public Outcome.Level getSeverity(Repository.UnitOfWork transaction)
getSeverity
in interface Rule
Rule.getSeverity(org.komodo.spi.repository.Repository.UnitOfWork)
public Rule.ValidationType getValidationType(Repository.UnitOfWork transaction)
getValidationType
in interface Rule
Rule.getValidationType(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isRequired(Repository.UnitOfWork transaction)
isRequired
in interface Rule
Rule.isRequired(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isApplicable(Repository.UnitOfWork transaction, KomodoObject kObject)
isApplicable
in interface Rule
Rule.isApplicable(org.komodo.spi.repository.Repository.UnitOfWork, org.komodo.spi.repository.KomodoObject)
public void setRequired(Repository.UnitOfWork transaction, boolean newRequired)
setRequired
in interface Rule
Rule.setRequired(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public boolean isEnabled(Repository.UnitOfWork transaction)
isEnabled
in interface Rule
Rule.isEnabled(org.komodo.spi.repository.Repository.UnitOfWork)
public void setEnabled(Repository.UnitOfWork transaction, boolean newEnabled)
setEnabled
in interface Rule
Rule.setEnabled(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public void setSeverity(Repository.UnitOfWork transaction, Outcome.Level newLevel)
setSeverity
in interface Rule
Rule.setSeverity(org.komodo.spi.repository.Repository.UnitOfWork, org.komodo.spi.outcome.Outcome.Level)
Copyright © 2013–2019. All rights reserved.