public class APIImportConfigAdapter extends Object
| Constructor and Description |
|---|
APIImportConfigAdapter(API apiConfig,
String apiConfigFile)
Constructor just for testing.
|
APIImportConfigAdapter(String apiConfigFile,
String stage,
String pathToAPIDefinition,
boolean usingOrgAdmin)
Constructs the APIImportConfig
|
| Modifier and Type | Method and Description |
|---|---|
API |
getApiConfig() |
InputStream |
getAPIDefinitionAsStream()
To make testing easier we allow reading test-files from classpath as well
|
API |
getDesiredAPI()
Returns the IAPIDefintion that returns the desired state of the API.
|
String |
getPathToAPIDefinition() |
static boolean |
isHttpsUri(String uri) |
static boolean |
isHttpUri(String pathToAPIDefinition) |
void |
setPathToAPIDefinition(String pathToAPIDefinition) |
public APIImportConfigAdapter(API apiConfig, String apiConfigFile) throws AppException
apiConfig - the desired API to test withapiConfigFile - this is the given config fileAppExceptionpublic APIImportConfigAdapter(String apiConfigFile, String stage, String pathToAPIDefinition, boolean usingOrgAdmin) throws AppException
apiConfigFile - the API-Config given by the userstage - an optional stage used to load overrides and stage specific environment propertiespathToAPIDefinition - an optional path to the API-Definition (Swagger / WSDL), can be in the config-file as well.usingOrgAdmin - access to API-Manager should be limited to the Org-Admin accountAppException - if the config-file can't be parsed for some reasonpublic API getApiConfig()
public API getDesiredAPI() throws AppException
AppException - if the state can't be created.public InputStream getAPIDefinitionAsStream() throws AppException
AppException - when the import Swagger-File can't be read.public static boolean isHttpUri(String pathToAPIDefinition)
public static boolean isHttpsUri(String uri)
public String getPathToAPIDefinition()
public void setPathToAPIDefinition(String pathToAPIDefinition)
Copyright © 2020. All rights reserved.