public class APIManagerAdapter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
APIManagerAdapter.CacheType |
static class |
APIManagerAdapter.CUSTOM_PROP_TYPE |
| Modifier and Type | Field and Description |
|---|---|
APIManagerAPIAccessAdapter |
accessAdapter |
APIManagerAPIAdapter |
apiAdapter |
static String |
apiManagerVersion |
APIMgrAppsAdapter |
appAdapter |
static String |
APPLICATION_DEFAULT_QUOTA |
APIManagerConfigAdapter |
configAdapter |
static String |
CREDENTIAL_TYPE_API_KEY |
static String |
CREDENTIAL_TYPE_EXT_CLIENTID |
static String |
CREDENTIAL_TYPE_OAUTH |
static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
APIManagerAPIMethodAdapter |
methodAdapter |
APIManagerOAuthClientProfilesAdapter |
oauthClientAdapter |
APIManagerOrganizationAdapter |
orgAdapter |
APIManagerPoliciesAdapter |
policiesAdapter |
APIManagerQuotaAdapter |
quotaAdapter |
static String |
SYSTEM_API_QUOTA |
static String |
TYPE_BACK_END |
static String |
TYPE_FRONT_END |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCache(String cacheName) |
static void |
deleteInstance() |
static Map<String,String> |
getAllConfiguredCustomProperties(APIManagerAdapter.CUSTOM_PROP_TYPE type) |
static String |
getApiManagerVersion() |
ClientApplication |
getAppIdForCredential(String credential,
String type)
The actual App-ID based on the AppName.
|
static <K,V> org.ehcache.Cache<K,V> |
getCache(APIManagerAdapter.CacheType cacheType,
Class<K> key,
Class<V> value) |
static com.fasterxml.jackson.databind.JsonNode |
getCertInfo(InputStream certFile,
CaCert cert)
Helper method to fulfill the given certificates by the API-Developer into the required
format as it's needed by the API-Manager.
|
static User |
getCurrentUser(boolean useAdminClient) |
static com.fasterxml.jackson.databind.JsonNode |
getCustomPropertiesConfig() |
static com.fasterxml.jackson.databind.JsonNode |
getFileData(byte[] certificate,
String filename)
Helper method to translate a Base64 encoded format
as it's needed by the API-Manager.
|
static Image |
getImageFromAPIM(URI uri,
String baseFilename) |
static APIManagerAdapter |
getInstance() |
static boolean |
hasAdminAccount() |
static boolean |
hasAPIManagerVersion(String version)
Checks if the API-Manager has at least given version.
|
boolean |
isUsingOrgAdmin() |
void |
loginToAPIManager(boolean useAdminClient) |
static com.fasterxml.jackson.databind.JsonNode |
parseAppConfig(String appConfig)
Helper method to validate that configured Custom-Properties are really configured
in the API-Manager configuration.
|
public static String apiManagerVersion
public static com.fasterxml.jackson.databind.ObjectMapper mapper
public static String CREDENTIAL_TYPE_API_KEY
public static String CREDENTIAL_TYPE_EXT_CLIENTID
public static String CREDENTIAL_TYPE_OAUTH
public static final String SYSTEM_API_QUOTA
public static final String APPLICATION_DEFAULT_QUOTA
public static final String TYPE_FRONT_END
public static final String TYPE_BACK_END
public APIManagerConfigAdapter configAdapter
public APIManagerAPIAdapter apiAdapter
public APIManagerAPIMethodAdapter methodAdapter
public APIManagerPoliciesAdapter policiesAdapter
public APIManagerQuotaAdapter quotaAdapter
public APIManagerOrganizationAdapter orgAdapter
public APIManagerAPIAccessAdapter accessAdapter
public APIManagerOAuthClientProfilesAdapter oauthClientAdapter
public APIMgrAppsAdapter appAdapter
public static APIManagerAdapter getInstance() throws AppException
AppExceptionpublic static void deleteInstance()
throws AppException
AppExceptionpublic void loginToAPIManager(boolean useAdminClient)
throws AppException
AppExceptionpublic static User getCurrentUser(boolean useAdminClient) throws AppException
AppExceptionpublic static <K,V> org.ehcache.Cache<K,V> getCache(APIManagerAdapter.CacheType cacheType, Class<K> key, Class<V> value)
public static void clearCache(String cacheName)
public static boolean hasAPIManagerVersion(String version)
version - has the API-Manager this version of higher?public ClientApplication getAppIdForCredential(String credential, String type) throws AppException
credential - The credentials (API-Key, Client-ID) which is registered for an applicationtype - of the credential. See APIManagerAdapter for potential credential typesAppException - if JSON response from API-Manager can't be parsedpublic static Image getImageFromAPIM(URI uri, String baseFilename) throws AppException
AppExceptionpublic static String getApiManagerVersion() throws AppException
AppExceptionpublic static Map<String,String> getAllConfiguredCustomProperties(APIManagerAdapter.CUSTOM_PROP_TYPE type)
public static com.fasterxml.jackson.databind.JsonNode getCustomPropertiesConfig()
throws AppException
AppExceptionpublic static com.fasterxml.jackson.databind.JsonNode parseAppConfig(String appConfig) throws AppException
appConfig - from the API-Manager (which isn't JSON)AppException - if the app.config can't be parsedpublic static com.fasterxml.jackson.databind.JsonNode getCertInfo(InputStream certFile, CaCert cert) throws AppException
certFile - InputStream to the Certificatecert - the certificate itselfAppException - if JSON-Node-Config can't be createdpublic static com.fasterxml.jackson.databind.JsonNode getFileData(byte[] certificate,
String filename)
throws AppException
certificate - the certificate contentfilename - the name of the certificate file used as a reference in the generated Json objectAppException - when the certificate information can't be createdpublic static boolean hasAdminAccount()
throws AppException
AppException - when the API-Manager instance is not initializedpublic boolean isUsingOrgAdmin()
Copyright © 2020. All rights reserved.