Package com.helger.photon.app.html
Class PhotonHTMLHelper
java.lang.Object
com.helger.photon.app.html.PhotonHTMLHelper
A utility class for consistent HTML creation.
- Author:
- Philip Helger
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createHTMLResponse
(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.servlet.response.UnifiedResponse aUnifiedResponse, IHTMLProvider aHTMLProvider) static com.helger.html.hc.IHCNode
getCSSNode
(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.html.resource.css.ICSSPathProvider aCSS, boolean bRegular) static com.helger.html.hc.IHCNode
getJSNode
(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.html.resource.js.IJSPathProvider aJS, boolean bRegular) static com.helger.commons.mime.IMimeType
getMimeType
(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope) Get the HTML MIME type to usestatic void
mergeExternalCSSAndJSNodes
(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.html.hc.html.metadata.HCHead aHead, boolean bMergeCSS, boolean bMergeJS, IWebSiteResourceBundleProvider aWSRBMgr) Merge external CSS and JS contents to a single resource for improved browser performance.
-
Field Details
-
META_GENERATOR_VALUE
- See Also:
-
-
Method Details
-
getMimeType
@Nonnull public static com.helger.commons.mime.IMimeType getMimeType(@Nullable com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope) Get the HTML MIME type to use- Parameters:
aRequestScope
- The request scope. May benull
-- Returns:
- Never
null
.
-
getCSSNode
-
getJSNode
-
createHTMLResponse
public static void createHTMLResponse(@Nonnull com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, @Nonnull com.helger.servlet.response.UnifiedResponse aUnifiedResponse, @Nonnull IHTMLProvider aHTMLProvider) -
mergeExternalCSSAndJSNodes
public static void mergeExternalCSSAndJSNodes(@Nonnull com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, @Nonnull com.helger.html.hc.html.metadata.HCHead aHead, boolean bMergeCSS, boolean bMergeJS, @Nonnull IWebSiteResourceBundleProvider aWSRBMgr) Merge external CSS and JS contents to a single resource for improved browser performance. All source nodes are taken from the head and all target nodes are written to the head.- Parameters:
aRequestScope
- Current request scope. Nevernull
.aHead
- The HTML head object. Nevernull
.bMergeCSS
-true
to aggregate CSS entries.bMergeJS
-true
to aggregate JS entries.aWSRBMgr
- The resource bundle provider. May not benull
.
-