Class ValidationRunData


  • @OpenApiAll
    public class ValidationRunData
    extends java.lang.Object
    Parameters information for validation operation.
    • 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
        Ignore mElements 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 unless setAddElementsRecursively(boolean) is called with false parameter
        severity - 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 level
        excludeReadOnly - 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 unless setAddElementsRecursively(boolean) is called with false parameter
        severity - 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 unless setAddElementsRecursively(boolean) is called with false parameter
        severity - minimum severity level
        excludeReadOnly - 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 run
        name - name for rule collection (like suite name)
        elements - elements to validate. Their children recursively will also be validated unless setAddElementsRecursively(boolean) is called with false parameter
        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,
                                 boolean excludeReadOnly)
        Validation data for specific constraints.
        Parameters:
        constraints - constraints to run
        name - name for rule collection (like suite name)
        elements - elements to validate
        severity - minimum severity level
        excludeReadOnly - 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 run
        name - 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 run
        name - name for rule collection (like suite name)
        severity - minimum severity level
        excludeReadOnly - 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.
        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. Returns null 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 is true
        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 is true
        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)