Class RestHelper

java.lang.Object
com.tangosol.coherence.rest.util.RestHelper

public abstract class RestHelper extends Object
A collection of utility methods used by Coherence REST.
Author:
ic 2011.12.17
  • Constructor Details

    • RestHelper

      public RestHelper()
  • Method Details

    • getQueryParameters

      public static Map<String,Object> getQueryParameters(jakarta.ws.rs.core.UriInfo uriInfo)
      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 submitted
      cQueryMax - max result set size configured for direct query or -1 if not configured
      cResourceMax - 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

      public static void log(Exception ex)
      Log server side message for handled exceptions that return a http response of BAD REQUEST, status 400.
      Parameters:
      ex - server side exception handled while processing a rest http request