Package com.nomagic.magicdraw.validation
Class ValidationRunData
java.lang.Object
com.nomagic.magicdraw.validation.ValidationRunData
Parameters information for validation operation.
-
Constructor Summary
ConstructorDescriptionValidationRunData
(boolean wholeProject, Collection<Package> suites, Collection<Element> elements, EnumerationLiteral severity) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true.ValidationRunData
(Package suite, boolean wholeProject, Collection<? extends Element> elements, EnumerationLiteral severity) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true.ValidationRunData
(Package suite, boolean wholeProject, Collection<? extends Element> elements, EnumerationLiteral severity, boolean excludeReadOnly) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true.ValidationRunData
(Package suite, EnumerationLiteral severity) Validation data for specific constraints on the whole project scopeValidationRunData
(Package suite, EnumerationLiteral severity, boolean excludeReadOnly) Validation data for specific constraints on the whole project scopeValidationRunData
(Package suite, Collection<? extends Element> elements, EnumerationLiteral severity) ValidationRunData
(Package suite, Collection<? extends Element> elements, EnumerationLiteral severity, boolean excludeReadOnly) ValidationRunData
(Collection<Constraint> constraints, String name, boolean wholeProject, Collection<? extends Element> elements, EnumerationLiteral severity) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true.ValidationRunData
(Collection<Constraint> constraints, String name, boolean wholeProject, Collection<? extends Element> elements, EnumerationLiteral severity, boolean excludeReadOnly) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true.ValidationRunData
(Collection<Constraint> constraints, String name, EnumerationLiteral severity) Validation data for specific constraints on the whole project scopeValidationRunData
(Collection<Constraint> constraints, String name, EnumerationLiteral severity, boolean excludeReadOnly) Validation data for specific constraints on the whole project scopeValidationRunData
(Collection<Constraint> constraints, String name, Collection<? extends Element> elements, EnumerationLiteral severity) Validation data for specific constraints.ValidationRunData
(Collection<Constraint> constraints, String name, Collection<? extends Element> elements, EnumerationLiteral severity, boolean excludeReadOnly) Validation data for specific constraints.ValidationRunData
(Collection<Package> suites, Scope scope, EnumerationLiteral severity) Constructs validation run data.ValidationRunData
(Collection<Package> suites, EnumerationLiteral severity) Validation data for specific constraints on the whole project scopeValidationRunData
(Collection<Package> suites, Collection<? extends Element> elements, EnumerationLiteral severity) -
Method Summary
Modifier and TypeMethodDescriptionValidation constraintsThe selected elements to run validation on.getName()
Gets name of the suite.Get project where the validation data is located.getScope()
Gets validation scope.Minimum validation severity level.getSuite()
Deprecated.usegetSuites()
Gets suits to be used in validation.boolean
Should validation engine add scope elements recursively, or should it validate only provided scope.boolean
boolean
boolean
boolean
boolean
Validation is run on whole projectvoid
setAddElementsRecursively
(boolean addElementsRecursively) Should validation engine add scope elements recursively, or should it validate only provided scope.void
setCustomSuccessMessage
(String customSuccessMessage) Set custom validation result message.void
setEnableSettingsDialog
(boolean enableSettingsDialog) Disable "Run validation with a new settings" button in the validation results window.void
setExcludeAdditionalContent
(boolean excludeAdditionalContent) void
setExcludeReadOnly
(boolean excludeReadOnly) void
setIgnoredConstraints
(Collection<Constraint> ignoredConstraints) Collection of constraints to ignorevoid
setTrackActiveDiagrams
(boolean trackActiveDiagrams)
-
Constructor Details
-
ValidationRunData
public ValidationRunData(Collection<Package> suites, Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity) - Parameters:
suites
- suites to execute.elements
- elements to validate. Their children recursively will also be validated unlesssetAddElementsRecursively(boolean)
is called with false parameterseverity
- minimum severity level
-
ValidationRunData
Validation data for specific constraints on the whole project scope- Parameters:
suites
- suites to execute.severity
- minimum severity level
-
ValidationRunData
Validation data for specific constraints on the whole project scope- Parameters:
suite
- suite to execute.severity
- minimum severity level
-
ValidationRunData
public ValidationRunData(Package suite, @CheckForNull EnumerationLiteral severity, boolean excludeReadOnly) Validation data for specific constraints on the whole project scope- Parameters:
suite
- suite to execute.severity
- minimum severity levelexcludeReadOnly
- exclude readonly elements from execution
-
ValidationRunData
public ValidationRunData(Package suite, Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity) - Parameters:
suite
- suite to execute.elements
- elements to validate. Their children recursively will also be validated unlesssetAddElementsRecursively(boolean)
is called with false parameterseverity
- minimum severity level
-
ValidationRunData
public ValidationRunData(Package suite, Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity, boolean excludeReadOnly) - Parameters:
suite
- suite to execute.elements
- elements to validate. Their children recursively will also be validated unlesssetAddElementsRecursively(boolean)
is called with false parameterseverity
- minimum severity levelexcludeReadOnly
- exclude readonly elements from execution
-
ValidationRunData
@Deprecated public ValidationRunData(Package suite, boolean wholeProject, @CheckForNull Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true. Use another constructor -
ValidationRunData
@Deprecated public ValidationRunData(Package suite, boolean wholeProject, @CheckForNull Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity, boolean excludeReadOnly) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true. Use another constructor -
ValidationRunData
@Deprecated public ValidationRunData(boolean wholeProject, Collection<Package> suites, @CheckForNull Collection<Element> elements, @CheckForNull EnumerationLiteral severity) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true. Use another constructor -
ValidationRunData
public ValidationRunData(Collection<Package> suites, Scope scope, @CheckForNull EnumerationLiteral severity) Constructs validation run data.- Parameters:
suites
- suites from which to take constraints.scope
- scope to validate.severity
- minimum severity level.
-
ValidationRunData
public ValidationRunData(Collection<Constraint> constraints, String name, Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity) Validation data for specific constraints.- Parameters:
constraints
- constraints to runname
- name for rule collection (like suite name)elements
- elements to validate. Their children recursively will also be validated unlesssetAddElementsRecursively(boolean)
is called with false parameterseverity
- minimum severity level
-
ValidationRunData
public ValidationRunData(Collection<Constraint> constraints, String name, Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity, boolean excludeReadOnly) Validation data for specific constraints.- Parameters:
constraints
- constraints to runname
- name for rule collection (like suite name)elements
- elements to validateseverity
- minimum severity levelexcludeReadOnly
- exclude readonly elements from execution
-
ValidationRunData
public ValidationRunData(Collection<Constraint> constraints, String name, @CheckForNull EnumerationLiteral severity) Validation data for specific constraints on the whole project scope- Parameters:
constraints
- constraints to runname
- name for rule collection (like suite name)severity
- minimum severity level
-
ValidationRunData
public ValidationRunData(Collection<Constraint> constraints, String name, @CheckForNull EnumerationLiteral severity, boolean excludeReadOnly) Validation data for specific constraints on the whole project scope- Parameters:
constraints
- constraints to runname
- name for rule collection (like suite name)severity
- minimum severity levelexcludeReadOnly
- exclude readonly elements from execution
-
ValidationRunData
@Deprecated public ValidationRunData(Collection<Constraint> constraints, String name, boolean wholeProject, @CheckForNull Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true. Use another constructor -
ValidationRunData
@Deprecated public ValidationRunData(Collection<Constraint> constraints, String name, boolean wholeProject, @CheckForNull Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity, boolean excludeReadOnly) Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true. Use another constructor
-
-
Method Details
-
setEnableSettingsDialog
public void setEnableSettingsDialog(boolean enableSettingsDialog) Disable "Run validation with a new settings" button in the validation results window. Default value - true;- Parameters:
enableSettingsDialog
- value
-
isEnableSettingsDialog
public boolean isEnableSettingsDialog() -
setCustomSuccessMessage
Set custom validation result message. If null - default is shown.- Parameters:
customSuccessMessage
- Message text
-
getCustomSuccessMessage
-
setExcludeReadOnly
public void setExcludeReadOnly(boolean excludeReadOnly) -
isExcludeReadOnly
public boolean isExcludeReadOnly() -
setExcludeAdditionalContent
public void setExcludeAdditionalContent(boolean excludeAdditionalContent) -
isExcludeAdditionalContent
public boolean isExcludeAdditionalContent() -
getName
Gets name of the suite. If suite was not assigned, then name value returned be defined by the constructor.- Returns:
- name of the suite (constraint collection)
-
getSuite
Deprecated.usegetSuites()
The suite of constraints to run on some target elements.- Returns:
- suite
-
getSuites
Gets suits to be used in validation.- Returns:
- suits to be used in validation.
-
getElements
The selected elements to run validation on.- Returns:
- scope
-
getSeverity
Minimum validation severity level.- Returns:
- severity
-
getConstraints
Validation constraints- Returns:
- constraints. either from suite, either internal.
-
isWholeProject
public boolean isWholeProject()Validation is run on whole project- Returns:
- will run on whole project
-
getProject
Get project where the validation data is located. Returnsnull
if no suite or constraints specified.- Returns:
- validation suite/rule parent project
-
isAddElementsRecursively
public boolean isAddElementsRecursively()Should validation engine add scope elements recursively, or should it validate only provided scope. Default istrue
- Returns:
- true if elements should be added recursively
-
setAddElementsRecursively
public void setAddElementsRecursively(boolean addElementsRecursively) Should validation engine add scope elements recursively, or should it validate only provided scope. Default istrue
- Parameters:
addElementsRecursively
- true if elements should be added recursively
-
getScope
Gets validation scope.- Returns:
- validation scope.
-
setIgnoredConstraints
Collection of constraints to ignore- Parameters:
ignoredConstraints
- constraints to ignore
-
getIgnoredConstraints
- Returns:
- ignored constraints
-
isTrackActiveDiagrams
public boolean isTrackActiveDiagrams() -
setTrackActiveDiagrams
public void setTrackActiveDiagrams(boolean trackActiveDiagrams)
-