org.springframework.extensions.webscripts
Class WebScriptException

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

public class WebScriptException
extends PlatformRuntimeException
implements StatusTemplateFactory

Web Script Exceptions.

Author:
David Caruana
See Also:
Serialized Form

Constructor Summary
WebScriptException(int status, String msgId)
           
WebScriptException(int status, String msgId, Object... args)
           
WebScriptException(int status, String msgId, Throwable cause)
           
WebScriptException(int status, String msgId, Throwable cause, Object... args)
           
WebScriptException(String msgId)
           
WebScriptException(String msgId, Object... args)
           
WebScriptException(String msgId, Throwable cause)
           
WebScriptException(String msgId, Throwable cause, Object... args)
           
 
Method Summary
 int getStatus()
          Get status code
 Map<String,Object> getStatusModel()
          Get status model
 StatusTemplate getStatusTemplate()
          Get status template
 void setStatusTemplate(StatusTemplate statusTemplate, Map<String,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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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(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 Detail

setStatusTemplate

public void setStatusTemplate(StatusTemplate statusTemplate,
                              Map<String,Object> statusModel)
Deprecated. 

Attach an advanced description of the status code associated to this exception

Parameters:
template - status template
model - 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


Copyright © 2009 SpringSource, Inc. All Rights Reserved.