Package io.dropwizard.jersey.params
Class BooleanParam
- java.lang.Object
-
- io.dropwizard.jersey.params.AbstractParam<Boolean>
-
- io.dropwizard.jersey.params.BooleanParam
-
@Deprecated public class BooleanParam extends AbstractParam<Boolean>
Deprecated.As of release 2.0.0, will be removed in 3.0.0. Please useOptionalinstead.A parameter encapsulating boolean values. If the query parameter value is"true", regardless of case, the returned value isBoolean.TRUE. If the query parameter value is"false", regardless of case, the returned value isBoolean.FALSE. All other values will return a400 Bad Requestresponse.
-
-
Constructor Summary
Constructors Constructor Description BooleanParam(String input)Deprecated.BooleanParam(String input, String parameterName)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected StringerrorMessage(Exception e)Deprecated.Given a string representation which was unable to be parsed and the exception thrown, produce an entity to be sent to the client.protected Booleanparse(String input)Deprecated.Given a string representation, parse it and return an instance of the parameter type.-
Methods inherited from class io.dropwizard.jersey.params.AbstractParam
equals, error, get, getErrorStatus, hashCode, mediaType, toString
-
-
-
-
Method Detail
-
errorMessage
protected String errorMessage(Exception e)
Deprecated.Description copied from class:AbstractParamGiven a string representation which was unable to be parsed and the exception thrown, produce an entity to be sent to the client.- Overrides:
errorMessagein classAbstractParam<Boolean>- Parameters:
e- the exception thrown while parsinginput- Returns:
- the error message to be sent the client
-
parse
protected Boolean parse(@Nullable String input) throws Exception
Deprecated.Description copied from class:AbstractParamGiven a string representation, parse it and return an instance of the parameter type.- Specified by:
parsein classAbstractParam<Boolean>- Parameters:
input- the raw input- Returns:
input, parsed as an instance ofT- Throws:
Exception- if there is an error parsing the input
-
-