@Documented @Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Inherited @PropertyStoreApply(value=HtmlDocConfigApply.class) public @interface HtmlDocConfig
HtmlSerializer
, HtmlParser
, and HtmlDocSerializer
.
Used primarily for specifying bean configuration properties on REST classes and methods.
Modifier and Type | Optional Element and Description |
---|---|
String[] |
aside
Configuration property: Aside section contents.
|
String[] |
footer
Configuration property: Footer section contents.
|
String[] |
head
Configuration property: Additional head section content.
|
String[] |
header
Configuration property: Header section contents.
|
String[] |
nav
Configuration property: Nav section contents.
|
String[] |
navlinks
Configuration property: Page navigation links.
|
String |
noResultsMessage
Configuration property: No-results message.
|
String |
nowrap
Configuration property: Prevent word wrap on page.
|
int |
rank
Optional rank for this config.
|
String[] |
script
Configuration property: Javascript code.
|
String[] |
style
Configuration property: CSS style code.
|
String[] |
stylesheet
Configuration property: Stylesheet import URLs.
|
Class<? extends HtmlDocTemplate> |
template
Configuration property: HTML document template.
|
Class<? extends HtmlWidget>[] |
widgets
Configuration property: HTML Widgets.
|
public abstract int rank
Can be used to override default ordering and application of config annotations.
public abstract String[] aside
Allows you to specify the contents of the aside section on the HTML page. The aside section floats on the right of the page for providing content supporting the serialized content of the page.
public abstract String[] footer
Allows you to specify the contents of the footer section on the HTML page.
public abstract String[] head
Adds the specified HTML content to the head section of the page.
public abstract String[] header
Allows you to override the contents of the header section on the HTML page. The header section normally contains the title and description at the top of the page.
public abstract String[] nav
Allows you to override the contents of the nav section on the HTML page. The nav section normally contains the page links at the top of the page.
navlinks()
is also specified, this content is placed AFTER the navigation links.
public abstract String[] navlinks
Adds a list of hyperlinks immediately under the title and description but above the content of the page.
This can be used to provide convenient hyperlinks when viewing the REST interface from a browser.
The value is an array of strings with two possible values:
Relative URLs are considered relative to the servlet path.
For example, if the servlet path is UriResolver
such as
public abstract String noResultsMessage
Allows you to specify the string message used when trying to serialize an empty array or empty list.
public abstract String nowrap
Adds
public abstract String[] script
Adds the specified Javascript code to the HTML page.
htmldoc=
public abstract String[] style
Adds the specified CSS instructions to the HTML page.
public abstract String[] stylesheet
Adds a link to the specified stylesheet URL.
Note that this stylesheet is controlled by the
annotation.
public abstract Class<? extends HtmlDocTemplate> template
Specifies the template to use for serializing the page.
By default, the BasicHtmlDocTemplate
class is used to construct the contents of the HTML page, but
can be overridden with your own custom implementation class.
htmldoc=
public abstract Class<? extends HtmlWidget>[] widgets
Defines widgets that can be used in conjunction with string variables of the form
Widgets resolve the following variables:
HtmlWidget.getHtml(VarResolverSession)
.
The following examples shows how to associate a widget with a REST method and then have it rendered in the links and aside section of the page:
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.