@Documented @Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Inherited @PropertyStoreApply(value=HtmlConfigApply.class) public @interface HtmlConfig
HtmlSerializer
, HtmlParser
, and HtmlDocSerializer
.
Used primarily for specifying bean configuration properties on REST classes and methods.
Modifier and Type | Optional Element and Description |
---|---|
String |
addBeanTypes
Configuration property: Add
|
String |
addKeyValueTableHeaders
Configuration property: Add key/value headers on bean/map tables.
|
Html[] |
applyHtml
Dynamically applies
@Html annotations to specified classes/methods/fields. |
HtmlLink[] |
applyHtmlLink
Dynamically applies
@HtmlLink annotations to specified classes. |
String |
detectLabelParameters
Configuration property: Look for link labels in URIs.
|
String |
detectLinksInStrings
Configuration property: Look for URLs in
Strings . |
String |
labelParameter
Configuration property: Link label parameter name.
|
int |
rank
Optional rank for this config.
|
String |
uriAnchorText
Configuration property: Anchor text source.
|
public abstract int rank
Can be used to override default ordering and application of config annotations.
public abstract HtmlLink[] applyHtmlLink
@HtmlLink
annotations to specified classes.
Provides an alternate approach for applying annotations using @HtmlLink.on
to specify the names
to apply the annotation to.
public abstract String addBeanTypes
If
When present, this value overrides the Serializer.SERIALIZER_addBeanTypes
setting and is
provided to customize the behavior of specific serializers in a SerializerGroup
.
public abstract String addKeyValueTableHeaders
When enabled,
The following shows the difference between the two generated outputs:
|
|
public abstract String detectLinksInStrings
Strings
.
If a string looks like a URL (i.e. starts with HtmlSerializer.HTML_uriAnchorText
.
The following shows the difference between the two generated outputs:
|
|
public abstract String labelParameter
The parameter name to look for when resolving link labels via HtmlSerializer.HTML_detectLabelParameters
.
public abstract String detectLabelParameters
If the URL has a label parameter (e.g.
The parameter name can be changed via the HtmlSerializer.HTML_labelParameter
property.
The following shows the difference between the two generated outputs.
Note that they're both hyperlinks, but the anchor text differs:
|
|
public abstract String uriAnchorText
When creating anchor tags (e.g.
) in HTML, this setting defines what to set the inner text to.
Annotation.toString()
on the object.
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.