Package org.jboss.logging.annotations
Annotation Type ResolutionDoc
Allows a link to be created for messages on a report which contain a possible resolution to the issue reported . If
the method does not include an id no link will be created for the report unless a
path()
is defined.
The rules for building the URL are as follows:
url
: If left empty and the type is annotated with aBaseUrl
the value for the@BaseUrl
will be used. If defined this will override the value of theBaseUrl
. If neither are defined the rules for thepath()
will be followed.path
: If defined this will be the path appended to theurl()
or the value of theBaseUrl
. Note that neitherurl()
norBaseUrl
are required. If the value is left undefined the id (project code plus the message id) will be used for the path.suffix
: The suffix to append to thepath()
. This is mostly useful if the path is left undefined and a suffix should be appended to the messages id. If left undefined and thepath()
is not defined, the suffix will be determined based on the report type.
If placed on a type links will be created for all methods on the type.
Do note that the processor does not validate the resolution document exists. It simply attempts to create links to the resolution document.
Expressions in the form of ${property.key:default-value}
can be used for the values with the exception of the
skip
attribute. If the property key is prefixed with sys.
a
system property will be used. If the key is prefixed with env.
an
environment variable will be used. In all other cases the
org.jboss.logging.tools.expressionProperties
processor argument is used to specify the path the properties
file which contains the values for the expressions.
- Since:
- 1.2
- Author:
- James R. Perkins
-
Optional Element Summary
-
Element Details
-
url
String urlThe URL, fully qualified or relative, to use for the resolution document. If defined this will override the value of theBaseUrl
if the annotation is used.- Returns:
- the URL or an empty string
- Default:
""
-
path
String pathThe path to the resolution document. If left undefined this will default to the message id.- Returns:
- the path to the resolution document
- Default:
""
-
suffix
String suffixThe suffix to append to the path. If left undefined this will default to the extension for the report type. For example if the report type isxml
the default suffix would be.xml
.- Returns:
- the suffix for the resolution document
- Default:
""
-
skip
boolean skipAllows the creation of a link to be skipped.- Returns:
true
if creating the link should be skipped
- Default:
false
-