Class ErrorResponse<T>
- java.lang.Object
-
- com.identityworksllc.iiq.common.plugin.ErrorResponse<T>
-
- Type Parameters:
T
- The type of the wrapped object
public class ErrorResponse<T> extends Object
A meta-object that can be returned by aBaseCommonPluginResource.handle(BaseCommonPluginResource.PluginAction)
implementation to specify both a return object and a status in the return value.This should prevent implementers from needing to return a
Response
in most cases.
-
-
Constructor Summary
Constructors Constructor Description ErrorResponse(int responseCode, T wrappedObject)
Constructs a new error response wrapper object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getResponseCode()
Gets the response code for this error responseT
getWrappedObject()
Gets the wrapped object for this error response
-
-
-
Constructor Detail
-
ErrorResponse
public ErrorResponse(int responseCode, T wrappedObject)
Constructs a new error response wrapper object- Parameters:
responseCode
- The response code to return to the REST clientwrappedObject
- The object to return to the REST client
-
-
Method Detail
-
getResponseCode
public int getResponseCode()
Gets the response code for this error response- Returns:
- The response code
-
getWrappedObject
public T getWrappedObject()
Gets the wrapped object for this error response- Returns:
- The wrapped object
-
-