Class ApiUtils


  • public class ApiUtils
    extends Object
    • Constructor Detail

      • ApiUtils

        public ApiUtils()
    • Method Detail

      • trimSlashes

        public static String trimSlashes​(String url)
      • trimTrailingSlashes

        public static String trimTrailingSlashes​(String url)
      • populateQueryParamsToMessageContext

        public static void populateQueryParamsToMessageContext​(MessageContext synCtx)
        Populate Message context properties for the query parameters extracted from the url
        Parameters:
        synCtx - MessageContext of the request
      • matchApiPath

        public static boolean matchApiPath​(String path,
                                           String context)
        Identify the API by matching the context of the invoking api with the path of each api in the api list.
        Parameters:
        path - request path
        context - API context
        Returns:
        true if the invoking api context matches with the path and false if the two values don't match