@OpenApiAll
public class ValidationHelper
extends java.lang.Object
ValidationRunData
or for specific
Element
. It is also able to open validation window and display validation
results in it.Constructor and Description |
---|
ValidationHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
openValidationWindow(ValidationRunData validationRunData,
java.lang.String windowID,
java.util.Collection<RuleViolationResult> results)
Opens validation window and displays
RuleViolationResult in it. |
static java.util.Collection<RuleViolationResult> |
validate(ValidationRunData validationRunData,
java.lang.String validationTaskName,
ProgressStatus progressStatus)
Runs validation for given
ValidationRunData |
static java.util.List<RuleViolationResult> |
validateElement(Element elementForValidation,
java.util.List<Constraint> rules,
boolean excludeReadOnly)
Validates given element with given list of validation rules.
|
public static java.util.Collection<RuleViolationResult> validate(@Nonnull ValidationRunData validationRunData, @CheckForNull java.lang.String validationTaskName, @CheckForNull ProgressStatus progressStatus)
ValidationRunData
validationRunData
- instance of ValidationRunData
validationTaskName
- which is visible when running validation. If Passed null, it will show default value "Validating".progressStatus
- for validation, or null if to run validation with owe progresspublic static java.util.List<RuleViolationResult> validateElement(@Nonnull Element elementForValidation, @Nonnull java.util.List<Constraint> rules, boolean excludeReadOnly)
elementForValidation
- element which should be validated.rules
- list of validation rules.excludeReadOnly
- exclude read only elements?public static void openValidationWindow(@Nonnull ValidationRunData validationRunData, @Nonnull java.lang.String windowID, @Nonnull java.util.Collection<RuleViolationResult> results)
RuleViolationResult
in it.validationRunData
- instance of ValidationRunData
windowID
- id which will be set to validation window.results
- collection of RuleViolationResult