Class ValidationRunData

java.lang.Object
com.nomagic.magicdraw.validation.ValidationRunData

@OpenApiAll public class ValidationRunData extends Object
Parameters information for validation operation.
  • 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 unless setAddElementsRecursively(boolean) is called with false parameter
      severity - minimum severity level
    • ValidationRunData

      public ValidationRunData(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, 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, 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 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 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(Collection<Constraint> constraints, String name, 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(Collection<Constraint> constraints, 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(Collection<Constraint> constraints, 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(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

      public void setCustomSuccessMessage(String customSuccessMessage)
      Set custom validation result message. If null - default is shown.
      Parameters:
      customSuccessMessage - Message text
    • getCustomSuccessMessage

      public String getCustomSuccessMessage()
    • setExcludeReadOnly

      public void setExcludeReadOnly(boolean excludeReadOnly)
    • isExcludeReadOnly

      public boolean isExcludeReadOnly()
    • setExcludeAdditionalContent

      public void setExcludeAdditionalContent(boolean excludeAdditionalContent)
    • isExcludeAdditionalContent

      public boolean isExcludeAdditionalContent()
    • getName

      public 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 Collection<Package> getSuites()
      Gets suits to be used in validation.
      Returns:
      suits to be used in validation.
    • getElements

      public 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 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(Collection<Constraint> ignoredConstraints)
      Collection of constraints to ignore
      Parameters:
      ignoredConstraints - constraints to ignore
    • getIgnoredConstraints

      public Collection<Constraint> getIgnoredConstraints()
      Returns:
      ignored constraints
    • isTrackActiveDiagrams

      public boolean isTrackActiveDiagrams()
    • setTrackActiveDiagrams

      public void setTrackActiveDiagrams(boolean trackActiveDiagrams)