Package org.apache.synapse.api
Class ApiUtils
- java.lang.Object
-
- org.apache.synapse.api.ApiUtils
-
public class ApiUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ApiUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<RESTDispatcher>getDispatchers()static StringgetFullRequestPath(MessageContext synCtx)static StringgetSubRequestPath(MessageContext synCtx)static booleanmatchApiPath(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.static voidpopulateQueryParamsToMessageContext(MessageContext synCtx)Populate Message context properties for the query parameters extracted from the urlstatic StringtrimSlashes(String url)static StringtrimTrailingSlashes(String url)
-
-
-
Method Detail
-
getFullRequestPath
public static String getFullRequestPath(MessageContext synCtx)
-
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
-
getSubRequestPath
public static String getSubRequestPath(MessageContext synCtx)
-
getDispatchers
public static List<RESTDispatcher> getDispatchers()
-
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 pathcontext- API context- Returns:
- true if the invoking api context matches with the path and false if the two values don't match
-
-