Package com.nomagic.magicdraw.validation
Class ValidationRunData
- java.lang.Object
-
- com.nomagic.magicdraw.validation.ValidationRunData
-
@OpenApiAll public class ValidationRunData extends java.lang.Object
Parameters information for validation operation.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
addElementsRecursively
Should validation engine add scope elements recursively, or should it validate only provided scopeprivate java.util.Collection<Constraint>
constraints
Constraints to run (when run without suite)private java.lang.String
customSuccessMessage
Custom message to show after successful validation.private boolean
enableSettingsDialog
Disable "Run validation with a new settings" button in the validation results windowprivate boolean
excludeAdditionalContent
private boolean
excludeReadOnly
private java.util.Collection<Constraint>
ignoredConstraints
private java.lang.String
name
Test collection name (when run without suite)private Project
project
Project where this rule should be run (when run without suite)private Scope
scope
private EnumerationLiteral
severity
Constraint collection severity setting (when run without suite)private java.util.Collection<Package>
suites
Suites from which to take constraints.private boolean
trackActiveDiagrams
private boolean
wholeProject
IgnoremElements
setting
-
Constructor Summary
Constructors Modifier Constructor Description private
ValidationRunData(boolean wholeProject, java.util.Collection<Package> suites, java.util.Collection<? extends Element> elements, EnumerationLiteral severity, boolean excludeReadOnly)
ValidationRunData(boolean wholeProject, java.util.Collection<Package> suites, java.util.Collection<Element> elements, EnumerationLiteral severity)
Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true.ValidationRunData(Package suite, boolean wholeProject, java.util.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, java.util.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, java.util.Collection<? extends Element> elements, EnumerationLiteral severity)
ValidationRunData(Package suite, java.util.Collection<? extends Element> elements, EnumerationLiteral severity, boolean excludeReadOnly)
ValidationRunData(java.util.Collection<Constraint> constraints, java.lang.String name, boolean wholeProject, java.util.Collection<? extends Element> elements, EnumerationLiteral severity)
Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true.ValidationRunData(java.util.Collection<Constraint> constraints, java.lang.String name, boolean wholeProject, java.util.Collection<? extends Element> elements, EnumerationLiteral severity, boolean excludeReadOnly)
Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true.ValidationRunData(java.util.Collection<Constraint> constraints, java.lang.String name, EnumerationLiteral severity)
Validation data for specific constraints on the whole project scopeValidationRunData(java.util.Collection<Constraint> constraints, java.lang.String name, EnumerationLiteral severity, boolean excludeReadOnly)
Validation data for specific constraints on the whole project scopeValidationRunData(java.util.Collection<Constraint> constraints, java.lang.String name, java.util.Collection<? extends Element> elements, EnumerationLiteral severity)
Validation data for specific constraints.ValidationRunData(java.util.Collection<Constraint> constraints, java.lang.String name, java.util.Collection<? extends Element> elements, EnumerationLiteral severity, boolean excludeReadOnly)
Validation data for specific constraints.ValidationRunData(java.util.Collection<Package> suites, Scope scope, EnumerationLiteral severity)
Constructs validation run data.ValidationRunData(java.util.Collection<Package> suites, EnumerationLiteral severity)
Validation data for specific constraints on the whole project scopeValidationRunData(java.util.Collection<Package> suites, java.util.Collection<? extends Element> elements, EnumerationLiteral severity)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Collection<Constraint>
getConstraints()
Validation constraintsjava.lang.String
getCustomSuccessMessage()
java.util.Collection<Element>
getElements()
The selected elements to run validation on.java.util.Collection<Constraint>
getIgnoredConstraints()
java.lang.String
getName()
Gets name of the suite.Project
getProject()
Get project where the validation data is located.Scope
getScope()
Gets validation scope.EnumerationLiteral
getSeverity()
Minimum validation severity level.Package
getSuite()
Deprecated.usegetSuites()
java.util.Collection<Package>
getSuites()
Gets suits to be used in validation.boolean
isAddElementsRecursively()
Should validation engine add scope elements recursively, or should it validate only provided scope.boolean
isEnableSettingsDialog()
boolean
isExcludeAdditionalContent()
boolean
isExcludeReadOnly()
boolean
isTrackActiveDiagrams()
boolean
isWholeProject()
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(java.lang.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(java.util.Collection<Constraint> ignoredConstraints)
Collection of constraints to ignorevoid
setTrackActiveDiagrams(boolean trackActiveDiagrams)
-
-
-
Field Detail
-
suites
private final java.util.Collection<Package> suites
Suites from which to take constraints.
-
constraints
private java.util.Collection<Constraint> constraints
Constraints to run (when run without suite)
-
ignoredConstraints
private java.util.Collection<Constraint> ignoredConstraints
-
scope
private Scope scope
-
project
private final Project project
Project where this rule should be run (when run without suite)
-
severity
@CheckForNull private final EnumerationLiteral severity
Constraint collection severity setting (when run without suite)
-
wholeProject
private boolean wholeProject
IgnoremElements
setting
-
name
private java.lang.String name
Test collection name (when run without suite)
-
customSuccessMessage
private java.lang.String customSuccessMessage
Custom message to show after successful validation. If null - shows the default validator message.
-
enableSettingsDialog
private boolean enableSettingsDialog
Disable "Run validation with a new settings" button in the validation results window
-
addElementsRecursively
private boolean addElementsRecursively
Should validation engine add scope elements recursively, or should it validate only provided scope
-
trackActiveDiagrams
private boolean trackActiveDiagrams
-
excludeReadOnly
private boolean excludeReadOnly
-
excludeAdditionalContent
private boolean excludeAdditionalContent
-
-
Constructor Detail
-
ValidationRunData
public ValidationRunData(java.util.Collection<Package> suites, java.util.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
public ValidationRunData(java.util.Collection<Package> suites, @CheckForNull EnumerationLiteral severity)
Validation data for specific constraints on the whole project scope- Parameters:
suites
- suites to execute.severity
- minimum severity level
-
ValidationRunData
public ValidationRunData(Package suite, @CheckForNull EnumerationLiteral severity)
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, java.util.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, java.util.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 java.util.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 java.util.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, java.util.Collection<Package> suites, @CheckForNull java.util.Collection<Element> elements, @CheckForNull EnumerationLiteral severity)
Deprecated.confusing constructor that allows both providing scope elements and setting wholeProject to true. Use another constructor
-
ValidationRunData
private ValidationRunData(boolean wholeProject, java.util.Collection<Package> suites, @CheckForNull java.util.Collection<? extends Element> elements, @CheckForNull EnumerationLiteral severity, boolean excludeReadOnly)
-
ValidationRunData
public ValidationRunData(java.util.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(java.util.Collection<Constraint> constraints, java.lang.String name, java.util.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(java.util.Collection<Constraint> constraints, java.lang.String name, java.util.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(java.util.Collection<Constraint> constraints, java.lang.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(java.util.Collection<Constraint> constraints, java.lang.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(java.util.Collection<Constraint> constraints, java.lang.String name, boolean wholeProject, @CheckForNull java.util.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(java.util.Collection<Constraint> constraints, java.lang.String name, boolean wholeProject, @CheckForNull java.util.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 Detail
-
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
public void setCustomSuccessMessage(java.lang.String customSuccessMessage)
Set custom validation result message. If null - default is shown.- Parameters:
customSuccessMessage
- Message text
-
getCustomSuccessMessage
public java.lang.String getCustomSuccessMessage()
-
setExcludeReadOnly
public void setExcludeReadOnly(boolean excludeReadOnly)
-
isExcludeReadOnly
public boolean isExcludeReadOnly()
-
setExcludeAdditionalContent
public void setExcludeAdditionalContent(boolean excludeAdditionalContent)
-
isExcludeAdditionalContent
public boolean isExcludeAdditionalContent()
-
getName
public java.lang.String 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 @CheckForNull public Package getSuite()
Deprecated.usegetSuites()
The suite of constraints to run on some target elements.- Returns:
- suite
-
getSuites
public java.util.Collection<Package> getSuites()
Gets suits to be used in validation.- Returns:
- suits to be used in validation.
-
getElements
public java.util.Collection<Element> getElements()
The selected elements to run validation on.- Returns:
- scope
-
getSeverity
@CheckForNull public EnumerationLiteral getSeverity()
Minimum validation severity level.- Returns:
- severity
-
getConstraints
public java.util.Collection<Constraint> 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
public 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
public Scope getScope()
Gets validation scope.- Returns:
- validation scope.
-
setIgnoredConstraints
public void setIgnoredConstraints(java.util.Collection<Constraint> ignoredConstraints)
Collection of constraints to ignore- Parameters:
ignoredConstraints
- constraints to ignore
-
getIgnoredConstraints
public java.util.Collection<Constraint> getIgnoredConstraints()
- Returns:
- ignored constraints
-
isTrackActiveDiagrams
public boolean isTrackActiveDiagrams()
-
setTrackActiveDiagrams
public void setTrackActiveDiagrams(boolean trackActiveDiagrams)
-
-