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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateHTMLResponse(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.servlet.response.UnifiedResponse aUnifiedResponse, IHTMLProvider aHTMLProvider) static com.helger.html.hc.IHCNodegetCSSNode(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.html.resource.css.ICSSPathProvider aCSS, boolean bRegular) static com.helger.html.hc.IHCNodegetJSNode(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.html.resource.js.IJSPathProvider aJS, boolean bRegular) static com.helger.commons.mime.IMimeTypegetMimeType(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope) Get the HTML MIME type to usestatic voidmergeExternalCSSAndJSNodes(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-trueto aggregate CSS entries.bMergeJS-trueto aggregate JS entries.aWSRBMgr- The resource bundle provider. May not benull.
-