Class SystemPageRenderer

java.lang.Object
com.aquima.web.ui.SystemPageRenderer

public class SystemPageRenderer extends Object
Renderer which renders static pages like error messages and writes them on an output stream.
Author:
A. Pragt, T. Middeldorp
  • Constructor Details Link icon

    • SystemPageRenderer Link icon

      public SystemPageRenderer(com.aquima.interactions.foundation.io.IResourceManager resourceManager, String webResourcePath)
  • Method Details Link icon

    • renderLogin Link icon

      public void renderLogin(Writer target, boolean loginError) throws Exception
      Renders a login page on the specified stream writer.
      Parameters:
      target - The writer to render the page on.
      loginError - Flag for login error message
      Throws:
      Exception - If an exception occurred during rendering of the page.
    • renderLogout Link icon

      public void renderLogout(Writer target) throws Exception
      Renders a logout page on the specified stream writer.
      Parameters:
      target - The writer to render the page on.
      Throws:
      Exception - If an exception occurred during rendering of the page.
    • renderException Link icon

      public int renderException(Writer target, Exception ex, boolean renderJson, boolean showStacktrace) throws Exception
      Renders a caught exception as HTML or JSON, using the specified stream writer.
      Parameters:
      target - The stream writer to write the rendered exception to.
      ex - The exception to render.
      renderJson - Determines whether or not to render in JSON, if false an HTML page will be rendered.
      showStacktrace - Determines whether to show stacktrace when rendering exception
      Returns:
      HTTP status code
      Throws:
      Exception - When an exception occurs during rendering.