Package org.cristalise.restapi
Class WebAppExceptionBuilder
java.lang.Object
org.cristalise.restapi.WebAppExceptionBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionWebAppExceptionBuilder(String msg, Exception ex, javax.ws.rs.core.Response.Status code, javax.ws.rs.core.NewCookie cookie) Creates a WebApplicationException Builder from a simple text message, exception and status -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.WebApplicationExceptionbuild()Creates a WebApplicationException response from a simple text message, exception and statusCreates a WebApplicationException BuilderCreates a WebApplicationException BuildernewCookie(javax.ws.rs.core.NewCookie newCookie) Creates a WebApplicationException Builderstatus(javax.ws.rs.core.Response.Status status) Creates a WebApplicationException Builder
-
Constructor Details
-
WebAppExceptionBuilder
public WebAppExceptionBuilder() -
WebAppExceptionBuilder
public WebAppExceptionBuilder(String msg, Exception ex, javax.ws.rs.core.Response.Status code, javax.ws.rs.core.NewCookie cookie) Creates a WebApplicationException Builder from a simple text message, exception and status- Parameters:
msg- text messageex- exceptioncode- HTTP status of the responsecookie- cookie will be added to the response
-
-
Method Details
-
exception
Creates a WebApplicationException Builder- Parameters:
ex-- Returns:
-
message
Creates a WebApplicationException Builder- Parameters:
message-- Returns:
-
status
Creates a WebApplicationException Builder- Parameters:
status-- Returns:
-
newCookie
Creates a WebApplicationException Builder- Parameters:
newCookie-- Returns:
-
build
public javax.ws.rs.WebApplicationException build()Creates a WebApplicationException response from a simple text message, exception and status- Returns:
- WebApplicationException Response
-