public class QueryHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONSTRAINT_PARAMETER |
static Map<Class<?>,String> |
RETURN_TYPES
Map return types per-collection-class, as there's no logical pattern
REVISIT: can we safely just drop the return type specifier?
(doesn't seem to have any effect in the powershell case)
|
Modifier and Type | Method and Description |
---|---|
static String |
getConstraint(javax.ws.rs.core.MultivaluedMap<String,String> queries,
String constraint) |
static String |
getConstraint(javax.ws.rs.core.UriInfo uriInfo,
Class<?> clz)
Extract constraint from query parameters.
|
static String |
getConstraint(javax.ws.rs.core.UriInfo uriInfo,
Class<?> clz,
boolean typePrefix)
Extract constraint from query parameters.
|
static String |
getConstraint(javax.ws.rs.core.UriInfo uriInfo,
String defaultQuery,
Class<?> clz)
Extract constraint from query parameters.
|
static String |
getConstraint(javax.ws.rs.core.UriInfo uriInfo,
String defaultQuery,
Class<?> clz,
boolean typePrefix)
Extract constraint from query parameters.
|
static HashMap<String,String> |
getMatrixConstraints(javax.ws.rs.core.UriInfo uriInfo,
String... constraints) |
static HashMap<String,String> |
getQueryConstraints(javax.ws.rs.core.UriInfo uriInfo,
String... constraints) |
static boolean |
hasConstraint(javax.ws.rs.core.MultivaluedMap<String,String> queries,
String constraint) |
static boolean |
hasConstraint(javax.ws.rs.core.UriInfo uriInfo,
String constraint) |
static boolean |
hasMatrixParam(javax.ws.rs.core.UriInfo uriInfo,
String param) |
public static final String CONSTRAINT_PARAMETER
public static String getConstraint(javax.ws.rs.core.UriInfo uriInfo, Class<?> clz)
uriInfo
- contains query parameters if setclz
- the individual return type expected from the querypublic static String getConstraint(javax.ws.rs.core.UriInfo uriInfo, Class<?> clz, boolean typePrefix)
uriInfo
- contains query parameters if setclz
- the individual return type expected from the querytypePrefix
- true if return type prefix is to be includedpublic static String getConstraint(javax.ws.rs.core.UriInfo uriInfo, String defaultQuery, Class<?> clz)
uriInfo
- contains query parameters if setdefaultQuery
- raw query to use if not present in URI parametersclz
- the individual return type expected from the querypublic static String getConstraint(javax.ws.rs.core.UriInfo uriInfo, String defaultQuery, Class<?> clz, boolean typePrefix)
uriInfo
- contains query parameters if setdefaultQuery
- raw query to use if not present in URI parametersclz
- the individual return type expected from the querytypePrefix
- true if return type prefix is to be includedpublic static String getConstraint(javax.ws.rs.core.MultivaluedMap<String,String> queries, String constraint)
public static boolean hasConstraint(javax.ws.rs.core.MultivaluedMap<String,String> queries, String constraint)
public static boolean hasConstraint(javax.ws.rs.core.UriInfo uriInfo, String constraint)
public static boolean hasMatrixParam(javax.ws.rs.core.UriInfo uriInfo, String param)
public static HashMap<String,String> getQueryConstraints(javax.ws.rs.core.UriInfo uriInfo, String... constraints)
Copyright © 2012. All Rights Reserved.