public class ConstraintValidationRule extends ValidationRule implements com.nomagic.magicdraw.validation.ElementValidationRuleImpl, com.nomagic.magicdraw.validation.SmartListenerConfigurationProvider
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<com.nomagic.magicdraw.annotation.Annotation> |
annotations |
protected com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint |
constraint |
protected com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element |
constraintElement |
protected java.util.Map<com.nomagic.magicdraw.uml.BaseElement,java.util.Set<ValidationRuleViolation>> |
constraintElementToViolationMap |
protected java.util.Map<Constraint,java.util.Set<com.nomagic.magicdraw.uml.BaseElement>> |
constraintToElementMap |
BasicConstraint.Type |
constraintType |
protected com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element |
context |
protected java.util.Set<com.nomagic.magicdraw.uml.BaseElement> |
elementsWithConstraints |
protected java.util.Map<com.nomagic.magicdraw.uml.BaseElement,java.util.Set<Constraint>> |
elementToConstraintMap |
boolean |
loggingResults |
Constructor and Description |
---|
ConstraintValidationRule() |
Modifier and Type | Method and Description |
---|---|
ValidationRuleViolation |
addViolation(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
java.lang.String comment) |
ValidationRuleViolation |
addViolation(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
java.lang.String comment,
boolean reported) |
ValidationRuleViolation |
addViolation(ValidationRuleViolation v) |
void |
dispose() |
java.util.Collection<Constraint> |
getAffectedConstraints(java.util.Collection<com.nomagic.magicdraw.uml.BaseElement> elements) |
static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element |
getConstraintObject(Constraint constraint) |
java.util.Map<java.lang.Class<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>,java.util.Collection<com.nomagic.uml2.ext.jmi.smartlistener.SmartListenerConfig>> |
getListenerConfigurations() |
java.util.Set<ValidationRuleViolation> |
getViolations(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element constraintElement) |
void |
init(com.nomagic.magicdraw.core.Project paramProject,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint paramConstraint) |
protected void |
initConstraintMaps(com.nomagic.magicdraw.core.Project paramProject,
java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> paramCollection) |
static boolean |
isDocGenConstraint(Constraint constraint) |
static boolean |
isUml(Constraint constraint) |
static void |
logResults(java.lang.Boolean satisfied,
Constraint constraint) |
java.util.Set<com.nomagic.magicdraw.annotation.Annotation> |
run(com.nomagic.magicdraw.core.Project paramProject,
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint paramConstraint,
java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> paramCollection) |
addViolations, getDescription, getName, getSeverity, getViolations
protected com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element constraintElement
protected com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element context
protected com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint constraint
protected java.util.Set<com.nomagic.magicdraw.uml.BaseElement> elementsWithConstraints
protected java.util.Map<com.nomagic.magicdraw.uml.BaseElement,java.util.Set<Constraint>> elementToConstraintMap
protected java.util.Map<Constraint,java.util.Set<com.nomagic.magicdraw.uml.BaseElement>> constraintToElementMap
protected java.util.Map<com.nomagic.magicdraw.uml.BaseElement,java.util.Set<ValidationRuleViolation>> constraintElementToViolationMap
protected java.util.Set<com.nomagic.magicdraw.annotation.Annotation> annotations
public BasicConstraint.Type constraintType
public boolean loggingResults
public ValidationRuleViolation addViolation(ValidationRuleViolation v)
addViolation
in class ValidationRule
public ValidationRuleViolation addViolation(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, java.lang.String comment)
addViolation
in class ValidationRule
public ValidationRuleViolation addViolation(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, java.lang.String comment, boolean reported)
addViolation
in class ValidationRule
public java.util.Set<ValidationRuleViolation> getViolations(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element constraintElement)
public void init(com.nomagic.magicdraw.core.Project paramProject, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint paramConstraint)
init
in interface com.nomagic.magicdraw.validation.ElementValidationRuleImpl
protected void initConstraintMaps(com.nomagic.magicdraw.core.Project paramProject, java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> paramCollection)
public java.util.Collection<Constraint> getAffectedConstraints(java.util.Collection<com.nomagic.magicdraw.uml.BaseElement> elements)
public static com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element getConstraintObject(Constraint constraint)
public static boolean isUml(Constraint constraint)
public static boolean isDocGenConstraint(Constraint constraint)
public java.util.Set<com.nomagic.magicdraw.annotation.Annotation> run(com.nomagic.magicdraw.core.Project paramProject, com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint paramConstraint, java.util.Collection<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> paramCollection)
run
in interface com.nomagic.magicdraw.validation.ElementValidationRuleImpl
public static void logResults(java.lang.Boolean satisfied, Constraint constraint)
public void dispose()
dispose
in interface com.nomagic.magicdraw.validation.ElementValidationRuleImpl
public java.util.Map<java.lang.Class<? extends com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element>,java.util.Collection<com.nomagic.uml2.ext.jmi.smartlistener.SmartListenerConfig>> getListenerConfigurations()
getListenerConfigurations
in interface com.nomagic.magicdraw.validation.SmartListenerConfigurationProvider