Package com.tangosol.coherence.rest.util
Class RestHelper
java.lang.Object
com.tangosol.coherence.rest.util.RestHelper
A collection of utility methods used by Coherence REST.
- Author:
- ic 2011.12.17
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetQueryParameters
(jakarta.ws.rs.core.UriInfo uriInfo) Return a map containing query parameters from UriInfo instance.static void
Log server side message for handled exceptions that return a http response ofBAD REQUEST
, status 400.static int
resolveMaxResults
(int cParamMax, int cQueryMax, int cResourceMax) Resolve the size of a result set Coherence REST resource will return.
-
Constructor Details
-
RestHelper
public RestHelper()
-
-
Method Details
-
getQueryParameters
Return a map containing query parameters from UriInfo instance.- Parameters:
uriInfo
- UriInfo for invoked resource method- Returns:
- Map containing all query parameters from provided UriInfo
-
resolveMaxResults
public static int resolveMaxResults(int cParamMax, int cQueryMax, int cResourceMax) Resolve the size of a result set Coherence REST resource will return.- Parameters:
cParamMax
- max result set size extracted from URL or -1 if not submittedcQueryMax
- max result set size configured for direct query or -1 if not configuredcResourceMax
- max result set size configured for this resource or -1 if not configured- Returns:
- max size of result set that this resource is allowed to return, or -1 if not configured nor provided by user
-
log
Log server side message for handled exceptions that return a http response ofBAD REQUEST
, status 400.- Parameters:
ex
- server side exception handled while processing a rest http request
-