Class HTMLResponse


  • public class HTMLResponse
    extends java.lang.Object
    A response object that is passed back to morpheus-ui to render html.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String html  
      java.lang.Integer status  
    • Constructor Summary

      Constructors 
      Constructor Description
      HTMLResponse()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static HTMLResponse error​(java.lang.String html)
      Helper with html response and 200 success.
      static HTMLResponse error​(java.lang.String html, java.lang.Integer status)
      Helper with html and error response.
      static HTMLResponse success()
      Helper with empty response and 200 success.
      static HTMLResponse success​(java.lang.String html)
      Helper with html response and 200 success.
      • Methods inherited from class java.lang.Object

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

      • html

        public java.lang.String html
      • status

        public java.lang.Integer status
    • Constructor Detail

      • HTMLResponse

        public HTMLResponse()
    • Method Detail

      • success

        public static HTMLResponse success()
        Helper with empty response and 200 success.
        Returns:
        HTMLResponse success
      • success

        public static HTMLResponse success​(java.lang.String html)
        Helper with html response and 200 success.
        Parameters:
        html - to render
        Returns:
        HTMLResponse success
      • error

        public static HTMLResponse error​(java.lang.String html)
        Helper with html response and 200 success.
        Parameters:
        html - to render
        Returns:
        HTMLResponse
      • error

        public static HTMLResponse error​(java.lang.String html,
                                         java.lang.Integer status)
        Helper with html and error response.
        Parameters:
        html - html to render
        status - error status code
        Returns:
        HTMLResponse