Class WebScriptException

  • All Implemented Interfaces:
    java.io.Serializable, StatusTemplateFactory

    public class WebScriptException
    extends org.springframework.extensions.surf.exception.PlatformRuntimeException
    implements StatusTemplateFactory
    Web Script Exceptions.
    Author:
    David Caruana
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      WebScriptException​(int status, java.lang.String msgId)  
      WebScriptException​(int status, java.lang.String msgId, java.lang.Object... args)  
      WebScriptException​(int status, java.lang.String msgId, java.lang.Throwable cause)  
      WebScriptException​(int status, java.lang.String msgId, java.lang.Throwable cause, java.lang.Object... args)  
      WebScriptException​(java.lang.String msgId)  
      WebScriptException​(java.lang.String msgId, java.lang.Object... args)  
      WebScriptException​(java.lang.String msgId, java.lang.Throwable cause)  
      WebScriptException​(java.lang.String msgId, java.lang.Throwable cause, java.lang.Object... args)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int getStatus()
      Get status code
      java.util.Map<java.lang.String,​java.lang.Object> getStatusModel()
      Get status model
      StatusTemplate getStatusTemplate()
      Get status template
      void setStatusTemplate​(StatusTemplate statusTemplate, java.util.Map<java.lang.String,​java.lang.Object> statusModel)
      Deprecated. 
      void setStatusTemplateFactory​(StatusTemplateFactory statusTemplateFactory)
      Associates a factory for the lazy retrieval of an advanced description of the status code associated with this exception
      • Methods inherited from class org.springframework.extensions.surf.exception.PlatformRuntimeException

        create, create, makeRuntimeException
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WebScriptException

        public WebScriptException​(java.lang.String msgId)
      • WebScriptException

        public WebScriptException​(int status,
                                  java.lang.String msgId)
      • WebScriptException

        public WebScriptException​(java.lang.String msgId,
                                  java.lang.Throwable cause)
      • WebScriptException

        public WebScriptException​(int status,
                                  java.lang.String msgId,
                                  java.lang.Throwable cause)
      • WebScriptException

        public WebScriptException​(java.lang.String msgId,
                                  java.lang.Object... args)
      • WebScriptException

        public WebScriptException​(int status,
                                  java.lang.String msgId,
                                  java.lang.Object... args)
      • WebScriptException

        public WebScriptException​(java.lang.String msgId,
                                  java.lang.Throwable cause,
                                  java.lang.Object... args)
      • WebScriptException

        public WebScriptException​(int status,
                                  java.lang.String msgId,
                                  java.lang.Throwable cause,
                                  java.lang.Object... args)
    • Method Detail

      • setStatusTemplate

        public void setStatusTemplate​(StatusTemplate statusTemplate,
                                      java.util.Map<java.lang.String,​java.lang.Object> statusModel)
        Deprecated.
        Attach an advanced description of the status code associated to this exception
        Parameters:
        statusTemplate - status template
        statusModel - template model
      • setStatusTemplateFactory

        public void setStatusTemplateFactory​(StatusTemplateFactory statusTemplateFactory)
        Associates a factory for the lazy retrieval of an advanced description of the status code associated with this exception
        Parameters:
        statusTemplateFactory - the factory to set
      • getStatus

        public int getStatus()
        Get status code
        Returns:
        status code
      • getStatusModel

        public java.util.Map<java.lang.String,​java.lang.Object> getStatusModel()
        Get status model
        Specified by:
        getStatusModel in interface StatusTemplateFactory
        Returns:
        model