Class WebScriptException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.extensions.surf.exception.PlatformRuntimeException
org.springframework.extensions.webscripts.WebScriptException
All Implemented Interfaces:
Serializable, StatusTemplateFactory

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

    • WebScriptException

      public WebScriptException(String msgId)
    • WebScriptException

      public WebScriptException(int status, String msgId)
    • WebScriptException

      public WebScriptException(String msgId, Throwable cause)
    • WebScriptException

      public WebScriptException(int status, String msgId, Throwable cause)
    • WebScriptException

      public WebScriptException(String msgId, Object... args)
    • WebScriptException

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

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

      public WebScriptException(int status, String msgId, Throwable cause, Object... args)
  • Method Details

    • setStatusTemplate

      public void setStatusTemplate(StatusTemplate statusTemplate, Map<String,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
    • getStatusTemplate

      public StatusTemplate getStatusTemplate()
      Get status template
      Specified by:
      getStatusTemplate in interface StatusTemplateFactory
      Returns:
      template
    • getStatusModel

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