public abstract class AbstractRule
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractRule.AbstractRuleWithSubobjectsAndSkips<T extends UmlObject>
Common superclass where a rule applies to multiple UML object types (e.g., package and
association) and their sub-objects (e.g., association ends) .
|
static class |
AbstractRule.UmlObjectsMissingDoc<T extends UmlObject> |
static class |
AbstractRule.UmlObjectsWithBadCharacterInName<T extends UmlObject> |
static class |
AbstractRule.UmlObjectsWithBadDocEnd<T extends UmlObject> |
static class |
AbstractRule.UmlObjectsWithBadDocStart<T extends UmlObject> |
static class |
AbstractRule.UmlObjectsWithUnallowedStereotype<T extends UmlObject> |
static class |
AbstractRule.UmlObjectsWithUnallowedTagNames<T extends UmlObject> |
static class |
Rule.Category
Category of the rule; usefull to classify problems.
|
static class |
Rule.Severity
How severe the violation of this rule is; useful to prioritise problems.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractRule(org.apache.log4j.Logger extLogger,
org.apache.log4j.Level level,
Rule.Severity severity,
Rule.Category category,
java.lang.String hypothesis,
java.lang.String howToFix)
Constructor.
|
protected |
AbstractRule(org.apache.log4j.Logger extLogger,
java.lang.String hypothesis,
java.lang.String howToFix)
Constructor; default level is ERROR.
|
Modifier and Type | Method and Description |
---|---|
protected ModelIssue |
createIssue(UmlObject subject) |
protected ModelIssue |
createIssue(UmlObject subject,
java.lang.String evidence) |
protected ModelIssue |
createIssue(UmlObject subject,
java.lang.String evidence,
java.lang.String subjectDescription,
java.lang.String groupTag) |
java.util.EnumSet<Nature> |
getApplicability()
Returns all the natures of model elements for which the rule is applicable.
|
Rule.Category |
getCategory()
Returns rule category.
|
java.lang.String |
getHowToFix()
Returns the suggestion on how to fix the problem.
|
java.lang.String |
getHypothesis()
Returns what this rule is enforcing (and what was violated).
|
org.apache.log4j.Level |
getLogLevel()
Returns log level to use (likely: related with
getSeverity() ). |
Rule.Severity |
getSeverity()
Returns severity if this rule is violated.
|
void |
logDiagnosis(boolean verbose,
ModelIssues issues)
Logs the diagnosis.
|
protected AbstractRule(org.apache.log4j.Logger extLogger, java.lang.String hypothesis, java.lang.String howToFix)
extLogger
- logger to use; if null, abstract class logger is used.hypothesis
- non-null, non-empty string to use as a title of logging entries.howToFix
- non-null, non-empty string to use as a title of logging entries.protected AbstractRule(org.apache.log4j.Logger extLogger, org.apache.log4j.Level level, Rule.Severity severity, Rule.Category category, java.lang.String hypothesis, java.lang.String howToFix)
extLogger
- logger to use; if null, abstract class logger is used.level
- logging level; if null, default level is ERROR.severity
- severity; if null, default severity is high.category
- category; if null, default category is modellingRule.hypothesis
- non-null, non-empty string to use as a title of logging entries.howToFix
- non-null, non-empty string to use as a title of logging entries.public Rule.Category getCategory()
public Rule.Severity getSeverity()
public java.lang.String getHypothesis()
public java.lang.String getHowToFix()
public final void logDiagnosis(boolean verbose, ModelIssues issues)
verbose
- whether to log on console also validation steps with no errors.issues
- "collecting" parameter, to be filled within the method.public final org.apache.log4j.Level getLogLevel()
getSeverity()
).protected final ModelIssue createIssue(UmlObject subject)
protected final ModelIssue createIssue(UmlObject subject, java.lang.String evidence)
protected final ModelIssue createIssue(UmlObject subject, java.lang.String evidence, java.lang.String subjectDescription, java.lang.String groupTag)
public java.util.EnumSet<Nature> getApplicability()
Copyright 2009-2016 Tatjana (Tanja) Kostic