Class PhotonHTMLHelper

java.lang.Object
com.helger.photon.app.html.PhotonHTMLHelper

@NotThreadSafe public final class PhotonHTMLHelper extends Object
A utility class for consistent HTML creation.
Author:
Philip Helger
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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 use
    static 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 be null-
      Returns:
      Never null.
    • getCSSNode

      @Nonnull public static com.helger.html.hc.IHCNode getCSSNode(@Nonnull com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, @Nonnull com.helger.html.resource.css.ICSSPathProvider aCSS, boolean bRegular)
    • getJSNode

      @Nonnull public static com.helger.html.hc.IHCNode getJSNode(@Nonnull com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, @Nonnull com.helger.html.resource.js.IJSPathProvider aJS, boolean bRegular)
    • 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. Never null.
      aHead - The HTML head object. Never null.
      bMergeCSS - true to aggregate CSS entries.
      bMergeJS - true to aggregate JS entries.
      aWSRBMgr - The resource bundle provider. May not be null.