Class ValidationViolation
- java.lang.Object
-
- org.apache.jackrabbit.vault.validation.spi.ValidationMessage
-
- org.apache.jackrabbit.vault.validation.ValidationViolation
-
public final class ValidationViolation extends ValidationMessage
A ValidationViolation is aValidationMessage
enriched with additional meta information like validator id
-
-
Constructor Summary
Constructors Constructor Description ValidationViolation(@NotNull ValidationMessageSeverity severity, @NotNull String message)
ValidationViolation(@NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t)
ValidationViolation(String validatorId, @NotNull ValidationMessageSeverity severity, @NotNull String message)
ValidationViolation(String validatorId, @NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
@Nullable Path
getAbsoluteFilePath()
Returns the file path bound to this message.@Nullable String
getValidatorId()
Returns the validator id bound to this message.int
hashCode()
String
toString()
static ValidationViolation
wrapMessage(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column)
static Collection<ValidationViolation>
wrapMessages(String validatorId, Collection<? extends ValidationMessage> messages, Path filePath, Path basePath, String nodePath, int line, int column)
-
Methods inherited from class org.apache.jackrabbit.vault.validation.spi.ValidationMessage
getBasePath, getColumn, getFilePath, getLine, getMessage, getNodePath, getSeverity, getThrowable
-
-
-
-
Constructor Detail
-
ValidationViolation
public ValidationViolation(String validatorId, @NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message)
-
ValidationViolation
public ValidationViolation(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message)
-
ValidationViolation
public ValidationViolation(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t)
-
-
Method Detail
-
wrapMessages
public static final Collection<ValidationViolation> wrapMessages(String validatorId, Collection<? extends ValidationMessage> messages, Path filePath, Path basePath, String nodePath, int line, int column)
-
wrapMessage
public static final ValidationViolation wrapMessage(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column)
-
getAbsoluteFilePath
@Nullable public @Nullable Path getAbsoluteFilePath()
Returns the file path bound to this message.- Returns:
- the absolute file path or
null
if the message does not belong to a file
-
getValidatorId
@Nullable public @Nullable String getValidatorId()
Returns the validator id bound to this message.- Returns:
- the validator id or
null
if the message does not belong to a specificValidatorFactory
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classValidationMessage
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classValidationMessage
-
toString
public String toString()
- Overrides:
toString
in classValidationMessage
-
-