de.twenty11.skysail.common.responses
Class FailureResponse<T>

java.lang.Object
  extended by de.twenty11.skysail.common.responses.Response<T>
      extended by de.twenty11.skysail.common.responses.FailureResponse<T>
Type Parameters:
T -

public class FailureResponse<T>
extends Response<T>

Message to be send to the client in case of an error.

Author:
carsten

Field Summary
 
Fields inherited from class de.twenty11.skysail.common.responses.Response
validationViolations
 
Constructor Summary
FailureResponse()
          standard constructor.
FailureResponse(Exception e)
          make sure to handle the exception properly (logging etc) before calling this method - this will only create a response to the caller with the errors message, and no more details.
FailureResponse(String message)
          Constructor taking a message.
FailureResponse(T constraintViolations)
           
 
Method Summary
 
Methods inherited from class de.twenty11.skysail.common.responses.Response
getData, getMessage, getNavigation, getSuccess, getValidationViolations, setData, setMessage, setNavigation, setSuccess, setValidationViolations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailureResponse

public FailureResponse()
standard constructor. Needed for reflection.


FailureResponse

public FailureResponse(String message)
Constructor taking a message.

Parameters:
message - the provided message

FailureResponse

public FailureResponse(Exception e)
make sure to handle the exception properly (logging etc) before calling this method - this will only create a response to the caller with the errors message, and no more details.

Parameters:
e - the passed exception TODO for 0.2.0 let method accept string instead of exception

FailureResponse

public FailureResponse(T constraintViolations)


Copyright © 2011-2012. All Rights Reserved.