java.lang.Object
com.aoapps.web.resources.renderer.Renderer
Renders the HTML output for web resource management.
This provides a basic implementation without optimization. However, it provides a hook for optimizers to affect what it rendered.
This is placed in a distinct project from RegistryEE
because it
adds several dependencies that are not required by projects that simply
register themselves. This choice is consistent with our "micro project"
principle.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Initializes theRenderer
during application start-up. -
Method Summary
Modifier and TypeMethodDescriptionstatic Renderer
get
(ServletContext servletContext) Gets theweb resource renderer
for the given servlet context.void
renderScripts
(HttpServletRequest request, HttpServletResponse response, AnyScriptSupportingContent<?, ?> content, boolean registeredActivations, Map<Group.Name, Boolean> activations, Script.Position position, Registry... registries) Combines all the scripts fromHttpServletRequest
andHttpSession
into a single set, then renders the set of script tags.void
renderScripts
(HttpServletRequest request, HttpServletResponse response, AnyScriptSupportingContent<?, ?> content, boolean registeredActivations, Map<Group.Name, Boolean> activations, Script.Position position, Iterable<Registry> registries) Combines all the scripts fromHttpServletRequest
andHttpSession
into a single set, then renders the set of script tags.void
renderStyles
(HttpServletRequest request, HttpServletResponse response, AnyUnion_Metadata_Phrasing<?, ?> content, boolean registeredActivations, Map<Group.Name, Boolean> activations, Registry... registries) Combines all the styles fromHttpServletRequest
andHttpSession
into a single set, then renders the set of link tags.void
renderStyles
(HttpServletRequest request, HttpServletResponse response, AnyUnion_Metadata_Phrasing<?, ?> content, boolean registeredActivations, Map<Group.Name, Boolean> activations, Iterable<Registry> registries) Combines all the styles fromHttpServletRequest
andHttpSession
into a single set, then renders the set of link tags.
-
Method Details
-
get
Gets theweb resource renderer
for the given servlet context. -
renderStyles
public void renderStyles(HttpServletRequest request, HttpServletResponse response, AnyUnion_Metadata_Phrasing<?, ?> content, boolean registeredActivations, Map<Group.Name, throws IOExceptionBoolean> activations, Iterable<Registry> registries) Combines all the styles fromHttpServletRequest
andHttpSession
into a single set, then renders the set of link tags.- Parameters:
registeredActivations
- Should the registered activations be applied?activations
- Additional activations applied after those configured in the registries.registries
- Iterated up to twice: first to determine group activations, then to union the styles from all activated groups.- Throws:
IOException
-
renderStyles
public void renderStyles(HttpServletRequest request, HttpServletResponse response, AnyUnion_Metadata_Phrasing<?, ?> content, boolean registeredActivations, Map<Group.Name, throws IOExceptionBoolean> activations, Registry... registries) Combines all the styles fromHttpServletRequest
andHttpSession
into a single set, then renders the set of link tags.- Parameters:
registeredActivations
- Should the registered activations be applied?activations
- Additional activations applied after those configured in the registries.registries
- Iterated up to twice: first to determine group activations, then to union the styles from all activated groups.- Throws:
IOException
- See Also:
-
renderScripts
public void renderScripts(HttpServletRequest request, HttpServletResponse response, AnyScriptSupportingContent<?, ?> content, boolean registeredActivations, Map<Group.Name, throws IOExceptionBoolean> activations, Script.Position position, Iterable<Registry> registries) Combines all the scripts fromHttpServletRequest
andHttpSession
into a single set, then renders the set of script tags.- Parameters:
registeredActivations
- Should the registered activations be applied?activations
- Additional activations applied after those configured in the registries.registries
- Iterated up to twice: first to determine group activations, then to union the scripts from all activated groups.- Throws:
IOException
-
renderScripts
public void renderScripts(HttpServletRequest request, HttpServletResponse response, AnyScriptSupportingContent<?, ?> content, boolean registeredActivations, Map<Group.Name, throws IOExceptionBoolean> activations, Script.Position position, Registry... registries) Combines all the scripts fromHttpServletRequest
andHttpSession
into a single set, then renders the set of script tags.- Parameters:
registeredActivations
- Should the registered activations be applied?activations
- Additional activations applied after those configured in the registries.registries
- Iterated up to twice: first to determine group activations, then to union the scripts from all activated groups.- Throws:
IOException
- See Also:
-