Class ValidationMessage
- java.lang.Object
-
- org.apache.jackrabbit.vault.validation.spi.ValidationMessage
-
- Direct Known Subclasses:
ValidationViolation
public class ValidationMessage extends Object
Class encapsulating the actual message together with aValidationMessageSeverity
.
-
-
Constructor Summary
Constructors Constructor Description ValidationMessage(@NotNull ValidationMessageSeverity severity, @NotNull String message)
ValidationMessage(@NotNull ValidationMessageSeverity severity, @NotNull String message, int line, int column, Throwable throwable)
ValidationMessage(@NotNull ValidationMessageSeverity severity, @NotNull String message, @NotNull String nodePath, @NotNull Path filePath, @NotNull Path basePath, Throwable throwable)
ValidationMessage(@NotNull ValidationMessageSeverity severity, @NotNull String message, @NotNull NodeContext nodeContext)
ValidationMessage(@NotNull ValidationMessageSeverity severity, @NotNull String message, @NotNull NodeContext nodeContext, Throwable throwable)
ValidationMessage(@NotNull ValidationMessageSeverity severity, @NotNull String message, String nodePath, Path filePath, Path basePath, int line, int column, Throwable throwable)
ValidationMessage(@NotNull ValidationMessageSeverity severity, @NotNull String message, Throwable throwable)
ValidationMessage(@NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, int line, int column, Throwable throwable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
@Nullable Path
getBasePath()
int
getColumn()
Returns the column number.@Nullable Path
getFilePath()
int
getLine()
Returns the line number.@NotNull String
getMessage()
Returns the message text.@Nullable String
getNodePath()
Returns the node path bound to this message.@NotNull ValidationMessageSeverity
getSeverity()
Returns the severity of this message.@Nullable Throwable
getThrowable()
Returns the underlying throwable.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
ValidationMessage
public ValidationMessage(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message)
-
ValidationMessage
public ValidationMessage(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message, Throwable throwable)
-
ValidationMessage
public ValidationMessage(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message, int line, int column, Throwable throwable)
-
ValidationMessage
public ValidationMessage(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message, @NotNull @NotNull String nodePath, @NotNull @NotNull Path filePath, @NotNull @NotNull Path basePath, Throwable throwable)
-
ValidationMessage
public ValidationMessage(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message, @NotNull @NotNull NodeContext nodeContext)
-
ValidationMessage
public ValidationMessage(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message, @NotNull @NotNull NodeContext nodeContext, Throwable throwable)
-
ValidationMessage
public ValidationMessage(@NotNull @NotNull ValidationMessageSeverity severity, @NotNull @NotNull String message, Path filePath, Path basePath, int line, int column, Throwable throwable)
-
-
Method Detail
-
getSeverity
@NotNull public @NotNull ValidationMessageSeverity getSeverity()
Returns the severity of this message.- Returns:
- the severity of this message
-
getMessage
@NotNull public @NotNull String getMessage()
Returns the message text.- Returns:
- the message text
-
getLine
public int getLine()
Returns the line number.- Returns:
- the line number of this violation (1-based) or 0 if not bound to any specific line number
-
getColumn
public int getColumn()
Returns the column number.- Returns:
- the column number of this violation (1-based) or 0 if not bound to any specific column number
-
getThrowable
@Nullable public @Nullable Throwable getThrowable()
Returns the underlying throwable.- Returns:
- the throwable bound to this message or
null
if the message has no underlying throwable
-
getFilePath
@Nullable public @Nullable Path getFilePath()
-
getBasePath
@Nullable public @Nullable Path getBasePath()
-
getNodePath
@Nullable public @Nullable String getNodePath()
Returns the node path bound to this message.- Returns:
- the node path or
null
if the message does not belong to a specific node
-
-