public final class Violation extends java.lang.Object implements java.lang.Comparable<Violation>, java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Violation.Utf8Control
Custom ResourceBundle.Control implementation which allows explicitly read
the properties files as UTF-8.
|
| Constructor and Description |
|---|
Violation(int lineNo,
int columnNo,
int columnCharIndex,
int tokenType,
java.lang.String bundle,
java.lang.String key,
java.lang.Object[] args,
SeverityLevel severityLevel,
java.lang.String moduleId,
java.lang.Class<?> sourceClass,
java.lang.String customMessage)
Creates a new
Violation instance. |
Violation(int lineNo,
int columnNo,
int tokenType,
java.lang.String bundle,
java.lang.String key,
java.lang.Object[] args,
SeverityLevel severityLevel,
java.lang.String moduleId,
java.lang.Class<?> sourceClass,
java.lang.String customMessage)
Creates a new
Violation instance. |
Violation(int lineNo,
int columnNo,
java.lang.String bundle,
java.lang.String key,
java.lang.Object[] args,
SeverityLevel severityLevel,
java.lang.String moduleId,
java.lang.Class<?> sourceClass,
java.lang.String customMessage)
Creates a new
Violation instance. |
Violation(int lineNo,
int columnNo,
java.lang.String bundle,
java.lang.String key,
java.lang.Object[] args,
java.lang.String moduleId,
java.lang.Class<?> sourceClass,
java.lang.String customMessage)
Creates a new
Violation instance. |
Violation(int lineNo,
java.lang.String bundle,
java.lang.String key,
java.lang.Object[] args,
SeverityLevel severityLevel,
java.lang.String moduleId,
java.lang.Class<?> sourceClass,
java.lang.String customMessage)
Creates a new
Violation instance. |
Violation(int lineNo,
java.lang.String bundle,
java.lang.String key,
java.lang.Object[] args,
java.lang.String moduleId,
java.lang.Class<?> sourceClass,
java.lang.String customMessage)
Creates a new
Violation instance. |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCache()
Clears the cache.
|
int |
compareTo(Violation other) |
boolean |
equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one.
|
int |
getColumnCharIndex()
Gets the column char index.
|
int |
getColumnNo()
Gets the column number.
|
java.lang.String |
getKey()
Returns the violation key to locate the translation, can also be used
in IDE plugins to map audit event violations to corrective actions.
|
int |
getLineNo()
Gets the line number.
|
java.lang.String |
getModuleId()
Returns id of module.
|
SeverityLevel |
getSeverityLevel()
Gets the severity level.
|
java.lang.String |
getSourceName()
Gets the name of the source for this Violation.
|
int |
getTokenType()
Gets the token type.
|
java.lang.String |
getViolation()
Gets the translated violation.
|
int |
hashCode() |
static void |
setLocale(java.util.Locale locale)
Sets a locale to use for localization.
|
public Violation(int lineNo, int columnNo, int columnCharIndex, int tokenType, java.lang.String bundle, java.lang.String key, java.lang.Object[] args, SeverityLevel severityLevel, java.lang.String moduleId, java.lang.Class<?> sourceClass, java.lang.String customMessage)
Violation instance.lineNo - line number associated with the violationcolumnNo - column number associated with the violationcolumnCharIndex - column char index associated with the violationtokenType - token type of the event associated with violation. See TokenTypesbundle - resource bundle namekey - the key to locate the translationargs - arguments for the translationseverityLevel - severity level for the violationmoduleId - the id of the module the violation is associated withsourceClass - the Class that is the source of the violationcustomMessage - optional custom violation overriding the defaultpublic Violation(int lineNo, int columnNo, int tokenType, java.lang.String bundle, java.lang.String key, java.lang.Object[] args, SeverityLevel severityLevel, java.lang.String moduleId, java.lang.Class<?> sourceClass, java.lang.String customMessage)
Violation instance.lineNo - line number associated with the violationcolumnNo - column number associated with the violationtokenType - token type of the event associated with violation. See TokenTypesbundle - resource bundle namekey - the key to locate the translationargs - arguments for the translationseverityLevel - severity level for the violationmoduleId - the id of the module the violation is associated withsourceClass - the Class that is the source of the violationcustomMessage - optional custom violation overriding the defaultpublic Violation(int lineNo, int columnNo, java.lang.String bundle, java.lang.String key, java.lang.Object[] args, SeverityLevel severityLevel, java.lang.String moduleId, java.lang.Class<?> sourceClass, java.lang.String customMessage)
Violation instance.lineNo - line number associated with the violationcolumnNo - column number associated with the violationbundle - resource bundle namekey - the key to locate the translationargs - arguments for the translationseverityLevel - severity level for the violationmoduleId - the id of the module the violation is associated withsourceClass - the Class that is the source of the violationcustomMessage - optional custom violation overriding the defaultpublic Violation(int lineNo, int columnNo, java.lang.String bundle, java.lang.String key, java.lang.Object[] args, java.lang.String moduleId, java.lang.Class<?> sourceClass, java.lang.String customMessage)
Violation instance.lineNo - line number associated with the violationcolumnNo - column number associated with the violationbundle - resource bundle namekey - the key to locate the translationargs - arguments for the translationmoduleId - the id of the module the violation is associated withsourceClass - the Class that is the source of the violationcustomMessage - optional custom violation overriding the defaultpublic Violation(int lineNo, java.lang.String bundle, java.lang.String key, java.lang.Object[] args, SeverityLevel severityLevel, java.lang.String moduleId, java.lang.Class<?> sourceClass, java.lang.String customMessage)
Violation instance.lineNo - line number associated with the violationbundle - resource bundle namekey - the key to locate the translationargs - arguments for the translationseverityLevel - severity level for the violationmoduleId - the id of the module the violation is associated withsourceClass - the source class for the violationcustomMessage - optional custom violation overriding the defaultpublic Violation(int lineNo, java.lang.String bundle, java.lang.String key, java.lang.Object[] args, java.lang.String moduleId, java.lang.Class<?> sourceClass, java.lang.String customMessage)
Violation instance. The column number
defaults to 0.lineNo - line number associated with the violationbundle - name of a resource bundle that contains audit event violationskey - the key to locate the translationargs - arguments for the translationmoduleId - the id of the module the violation is associated withsourceClass - the name of the source for the violationcustomMessage - optional custom violation overriding the defaultpublic int getLineNo()
public int getColumnNo()
public int getColumnCharIndex()
public int getTokenType()
public SeverityLevel getSeverityLevel()
public java.lang.String getModuleId()
public java.lang.String getKey()
public java.lang.String getSourceName()
public static void setLocale(java.util.Locale locale)
locale - the locale to use for localizationpublic static void clearCache()
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(Violation other)
compareTo in interface java.lang.Comparable<Violation>public java.lang.String getViolation()
Copyright © 2001-2021. All Rights Reserved.