public abstract class AbstractParam<V> extends Object
An abstract class for JAX-RS parameter handlers, providing a single String constructor class for annotated QueryParams and PathParams.
Errors during parameter parsing result in a WebApplicationException with a 400 Bad Request status code.
http://codahale.com/what-makes-jersey-interesting-parameter-classes/| Constructor and Description |
|---|
AbstractParam(String param) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getErrorMessage(String param,
Throwable e) |
String |
getOriginalParam()
Get the original constructor parameter.
|
V |
getValue()
Get the parsed value of the param.
|
protected javax.ws.rs.core.Response |
onError(String param,
Throwable e)
Generates an HTTP 400 (Bad Request)
|
protected abstract V |
parse(String param) |
String |
toString() |
public AbstractParam(String param) throws javax.ws.rs.WebApplicationException
javax.ws.rs.WebApplicationExceptionpublic V getValue()
public String getOriginalParam()
protected javax.ws.rs.core.Response onError(String param, Throwable e)
param - the original parametere - the original errorCopyright © 2013 DuraSpace. All Rights Reserved.