Module com.semanticcms.tagreference
Package com.semanticcms.tagreference
Class TagReferenceInitializer
java.lang.Object
com.semanticcms.tagreference.TagReferenceInitializer
- All Implemented Interfaces:
ServletContainerInitializer
Initializes a tag reference during application start-up.
The following URL patterns are registered:
- /path/taglib.tld The taglib file itself available for download (handled by default servlet)
- /path/taglib.tld/ The documentation for the taglib overall
- /path/taglib.tld/tags The list of tags only
- /path/taglib.tld/tag-tagName The detailed per-tag documentation
- /path/taglib.tld/functions The list of functions only
- /path/taglib.tld/function-functionName The detailed per-function documentation
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
TagReferenceInitializer
(String title, String shortTitle, String tldBook, String tldPath, boolean requireLinks, String javadocLinkJavaSE, String javadocLinkJavaEE, String... additionalApiLinks) Parses the TLD file.protected
TagReferenceInitializer
(String title, String shortTitle, String tldBook, String tldPath, boolean requireLinks, String javadocLinkJavaSE, String javadocLinkJavaEE, Map<String, String> additionalApiLinks) Parses the TLD file.protected
TagReferenceInitializer
(String title, String shortTitle, String tldBook, String tldPath, String javadocLinkJavaSE, String javadocLinkJavaEE, Map<String, String> additionalApiLinks) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onStartup
(Set<Class<?>> set, ServletContext servletContext) The *.tld file is parsed entirely on start-up to maximize runtime performance.
-
Field Details
-
SUMMARY_CLASS
The css class that marks an element as being a summary.- See Also:
-
NOFOLLOW_PREFIX
- See Also:
-
-
Constructor Details
-
TagReferenceInitializer
protected TagReferenceInitializer(String title, String shortTitle, String tldBook, String tldPath, boolean requireLinks, String javadocLinkJavaSE, String javadocLinkJavaEE, Map<String, String> additionalApiLinks) Parses the TLD file.- Parameters:
javadocLinkJavaSE
- The Java SE API URL. This matches values used in Maven build property${javadoc.link.javase}
.javadocLinkJavaEE
- The Java EE API URL. This matches values used in Maven build property${javadoc.link.javaee}
.additionalApiLinks
- Additional API links. When there are duplicate packages, the first match wins. The API links may be prefixed withNOFOLLOW_PREFIX
to haverel="nofollow"
in the generated links.
-
TagReferenceInitializer
protected TagReferenceInitializer(String title, String shortTitle, String tldBook, String tldPath, boolean requireLinks, String javadocLinkJavaSE, String javadocLinkJavaEE, String... additionalApiLinks) Parses the TLD file.- Parameters:
javadocLinkJavaSE
- The Java SE API URL. This matches values used in Maven build property${javadoc.link.javase}
.javadocLinkJavaEE
- The Java EE API URL. This matches values used in Maven build property${javadoc.link.javaee}
.additionalApiLinks
- Additional API links, must be in even pairs (package, apiLinks), ... When there are duplicate packages, the first match wins.)
-
TagReferenceInitializer
@Deprecated(forRemoval=true) protected TagReferenceInitializer(String title, String shortTitle, String tldBook, String tldPath, String javadocLinkJavaSE, String javadocLinkJavaEE, Map<String, String> additionalApiLinks) Deprecated, for removal: This API element is subject to removal in a future version.Please providerequireLinks
to eitherTagReferenceInitializer(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, java.util.Map)
orTagReferenceInitializer(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, java.lang.String...)
Parses the TLD file.Calls
TagReferenceInitializer(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, java.util.Map)
, withrequireLinks = false
for backward compatibility.
-
-
Method Details
-
onStartup
The *.tld file is parsed entirely on start-up to maximize runtime performance.- Specified by:
onStartup
in interfaceServletContainerInitializer
- Throws:
ServletException
-
requireLinks
to eitherTagReferenceInitializer(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, java.util.Map)
orTagReferenceInitializer(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, java.lang.String...)