public class RouteUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FUNCTION_IN |
static String |
FUNCTION_OUT |
static String |
IN |
static String |
OUT |
| Constructor and Description |
|---|
RouteUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addFunction(String function,
String type,
String apiID) |
static void |
AddGlobalFunction(String function,
String type) |
static String[] |
getBasePath(String apiId)
get basePath of an API
|
static String |
getResourceAsYaml(String resourceId)
get Resource Endpoint Configuration as a yaml String
|
static boolean |
hasApiInRoutesConfig(String apiId) |
static boolean |
hasResourceInRoutesConfig(String resourceId) |
static List<String[]> |
listApis()
List all the available APIs
|
static RouteEndpointConfig |
parseEndpointConfig(String endpointConfigJson,
APIEndpointSecurityDTO endpointSecurity)
To parse the Endpoint Configuration received from API Manager to RouteEndpointConfig Object
|
static void |
saveGlobalEpAndBasepath(List<ExtendedAPI> apiList,
boolean isForceFully)
save endpoint configuration and basePath of API
|
static void |
saveGlobalEpAndBasepath(String apiDefPath,
String basePath,
String endpointConfigJson)
save endpoint configuration and basePath of API for developer first approach
|
static void |
saveResourceRoute(String resourceId,
String endpointConfigJson)
save the endpoint configuration for a given resource
|
static void |
setRoutesConfigPath(String routesConfigPath) |
static void |
updateAPIRoute(String apiId,
String endpointConfigJson) |
static void |
updateResourceRoute(String id,
String endpointConfigJson) |
public static final String IN
public static final String OUT
public static final String FUNCTION_IN
public static final String FUNCTION_OUT
public static void saveGlobalEpAndBasepath(String apiDefPath, String basePath, String endpointConfigJson)
apiDefPath - Path to API DefinitionbasePath - BasePathendpointConfigJson - Endpoint configuration Json as a Stringpublic static void saveGlobalEpAndBasepath(List<ExtendedAPI> apiList, boolean isForceFully)
apiList - List of APIspublic static String[] getBasePath(String apiId)
apiId - API Idpublic static RouteEndpointConfig parseEndpointConfig(String endpointConfigJson, APIEndpointSecurityDTO endpointSecurity)
endpointConfigJson - Endpoint Configuration Json received from Publisher APIendpointSecurity - Endpoint Security details received from Publisher APIpublic static List<String[]> listApis()
public static void saveResourceRoute(String resourceId, String endpointConfigJson)
resourceId - resource IdendpointConfigJson - Endpoint Configuration Jsonpublic static boolean hasResourceInRoutesConfig(String resourceId)
public static String getResourceAsYaml(String resourceId)
resourceId - Resource Idpublic static boolean hasApiInRoutesConfig(String apiId)
public static void setRoutesConfigPath(String routesConfigPath)
Copyright © 2019 WSO2. All rights reserved.