public interface APIManager
| Modifier and Type | Method and Description |
|---|---|
String |
addIcon(String resourcePath,
Icon icon)
Associates the given icon image with the specified path.
|
void |
addSubscriber(Subscriber subscriber)
Creates a new subscriber.
|
void |
cleanup()
Cleans up any resources acquired by this APIManager instance.
|
APIKey |
getAccessTokenData(String accessToken)
Return information related to a specific access token
|
List<WebApp> |
getAllAPIs()
Returns a list of all existing APIs by all providers.
|
List<Documentation> |
getAllDocumentation(APIIdentifier appId)
Returns a list of documentation attached to a particular WebApp
|
List<Documentation> |
getAllDocumentation(APIIdentifier apiId,
String loggedUserName)
Returns a list of documentation attached to a particular WebApp
|
WebApp |
getAPI(APIIdentifier identifier)
Returns details of an WebApp
|
Set<String> |
getAPIVersions(String providerName,
String apiName)
Returns a set of WebApp versions for the given provider and WebApp name
|
Documentation |
getDocumentation(APIIdentifier apiId,
DocumentationType docType,
String docName)
Returns the specified document attached to the given WebApp
|
Documentation |
getDocumentation(String docId,
String requestedTenantDomain)
Get a documentation by artifact Id
|
String |
getDocumentationContent(APIIdentifier identifier,
String documentationName)
This method used to get the content of a documentation
|
Icon |
getIcon(APIIdentifier identifier)
Retrieves the icon image associated with a particular WebApp as a stream.
|
Subscriber |
getSubscriber(int subscriberId)
Returns the subscriber for the given subscriber id.
|
Set<WebApp> |
getSubscriberAPIs(Subscriber subscriber)
Returns a set of APIs purchased by the given Subscriber
|
Set<Tier> |
getTiers()
Returns a list of pre-defined #
org.wso2.carbon.apimgt.api.model.Tier in the system. |
Set<Tier> |
getTiers(String tenantDomain)
Returns a list of pre-defined #
org.wso2.carbon.apimgt.api.model.Tier in the system. |
boolean |
isAPIAvailable(APIIdentifier identifier)
Checks the Availability of given APIIdentifier
|
boolean |
isApplicationTokenExists(String accessToken)
Check whether an application access token is already persist in database.
|
boolean |
isApplicationTokenRevoked(String accessToken)
Check whether an application access token is already revoked.
|
boolean |
isContextExist(String context)
Checks whether the given WebApp context is already registered in the system
|
boolean |
isDocumentationExist(APIIdentifier identifier,
String docName)
Checks whether the given document already exists for the given app
|
Map<Integer,APIKey> |
searchAccessToken(String searchType,
String searchTerm,
String loggedInUser)
/**
Return information related to access token by a searchTerm and searchType *
|
void |
updateSubscriber(Subscriber subscriber)
Updates the details of the given subscriber.
|
List<WebApp> getAllAPIs() throws AppManagementException
AppManagementException - on errorWebApp getAPI(APIIdentifier identifier) throws AppManagementException
identifier - APIIdentifierAppManagementException - if failed get WebApp from APIIdentifierboolean isAPIAvailable(APIIdentifier identifier) throws AppManagementException
identifier - APIIdentifierAppManagementException - if failed to get WebApp availabilityboolean isContextExist(String context) throws AppManagementException
context - A String representing an WebApp contextAppManagementException - if failed to check the context availabilitySet<String> getAPIVersions(String providerName, String apiName) throws AppManagementException
providerName - name of the provider (common)apiName - name of the apiAppManagementException - if failed to get version for apiList<Documentation> getAllDocumentation(APIIdentifier appId) throws AppManagementException
appId - APIIdentifierAppManagementException - if failed to get DocumentationsList<Documentation> getAllDocumentation(APIIdentifier apiId, String loggedUserName) throws AppManagementException
apiId - APIIdentifierAppManagementException - if failed to get DocumentationsDocumentation getDocumentation(APIIdentifier apiId, DocumentationType docType, String docName) throws AppManagementException
apiId - APIIdentifierdocType - type of the documentationdocName - name of the docAppManagementException - if failed to get Documentationboolean isDocumentationExist(APIIdentifier identifier, String docName) throws AppManagementException
identifier - API IdentifierdocName - Name of the documentAppManagementException - if failed to check existence of the documentationDocumentation getDocumentation(String docId, String requestedTenantDomain) throws AppManagementException
docId - DocumentIDrequestedTenantDomain - tenant domain of the registry where the artifact is locatedAppManagementException - if failed to get DocumentationString getDocumentationContent(APIIdentifier identifier, String documentationName) throws AppManagementException
identifier, - WebApp identifierdocumentationName, - name of the inline documentationAppManagementException - if the asking documentation content is unavailablevoid addSubscriber(Subscriber subscriber) throws AppManagementException
subscriber - The subscriber to be addedAppManagementException - if failed add subscribervoid updateSubscriber(Subscriber subscriber) throws AppManagementException
subscriber - The subscriber to be updatedAppManagementException - if failed to update subscriberSubscriber getSubscriber(int subscriberId) throws AppManagementException
subscriberId - The subscriber id of the subscriber to be returnedAppManagementException - if failed to get SubscriberSet<WebApp> getSubscriberAPIs(Subscriber subscriber) throws AppManagementException
subscriber - SubscriberAppManagementException - if failed to get WebApp for subscriberString addIcon(String resourcePath, Icon icon) throws AppManagementException
resourcePath - a String representing the relative path of a resource.icon - to be savedAppManagementException - if an error occurs while adding the icon imageIcon getIcon(APIIdentifier identifier) throws AppManagementException
identifier - ID representing the WebAppAppManagementException - if an error occurs while retrieving the imagevoid cleanup()
throws AppManagementException
AppManagementException - if an error occurs while cleaning upboolean isApplicationTokenExists(String accessToken) throws AppManagementException
accessToken - AppManagementExceptionboolean isApplicationTokenRevoked(String accessToken) throws AppManagementException
accessToken - AppManagementExceptionAPIKey getAccessTokenData(String accessToken) throws AppManagementException
accessToken - AccessTokenAppManagementExceptionMap<Integer,APIKey> searchAccessToken(String searchType, String searchTerm, String loggedInUser) throws AppManagementException
searchType - searchTerm - loggedInUser - AppManagementExceptionSet<Tier> getTiers() throws AppManagementException
org.wso2.carbon.apimgt.api.model.Tier in the system.AppManagementException - if failed to get the predefined tiersSet<Tier> getTiers(String tenantDomain) throws AppManagementException
org.wso2.carbon.apimgt.api.model.Tier in the system.AppManagementException - if failed to get the predefined tiersCopyright © 2017 WSO2. All rights reserved.