public abstract class AbstractAPIManager extends Object implements org.wso2.carbon.appmgt.api.APIManager
| Modifier and Type | Field and Description |
|---|---|
protected AppMDAO |
appMDAO |
protected AppRepository |
appRepository |
protected org.apache.commons.logging.Log |
log |
protected org.wso2.carbon.registry.core.Registry |
registry |
protected String |
tenantDomain |
protected int |
tenantId |
protected String |
username |
| Constructor and Description |
|---|
AbstractAPIManager() |
AbstractAPIManager(String username) |
| Modifier and Type | Method and Description |
|---|---|
String |
addIcon(String resourcePath,
org.wso2.carbon.appmgt.api.model.Icon icon) |
void |
addSubscriber(org.wso2.carbon.appmgt.api.model.Subscriber subscriber) |
void |
cleanup() |
org.wso2.carbon.appmgt.api.model.APIKey |
getAccessTokenData(String accessToken) |
List<org.wso2.carbon.appmgt.api.model.WebApp> |
getAllAPIs() |
List<org.wso2.carbon.appmgt.api.model.WebApp> |
getAllAPIs(String appType) |
List<org.wso2.carbon.appmgt.api.model.Documentation> |
getAllDocumentation(org.wso2.carbon.appmgt.api.model.APIIdentifier appId) |
List<org.wso2.carbon.appmgt.api.model.Documentation> |
getAllDocumentation(org.wso2.carbon.appmgt.api.model.APIIdentifier apiId,
String loggedUsername) |
org.wso2.carbon.appmgt.api.model.WebApp |
getAPI(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier) |
org.wso2.carbon.appmgt.api.model.WebApp |
getAPI(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier,
org.wso2.carbon.appmgt.api.model.APIIdentifier oldIdentifier) |
org.wso2.carbon.appmgt.api.model.WebApp |
getAPI(String apiPath) |
Set<String> |
getAPIVersions(String providerName,
String apiName) |
org.wso2.carbon.appmgt.api.model.Documentation |
getDocumentation(org.wso2.carbon.appmgt.api.model.APIIdentifier apiId,
org.wso2.carbon.appmgt.api.model.DocumentationType docType,
String docName) |
org.wso2.carbon.appmgt.api.model.Documentation |
getDocumentation(String docId,
String requestedTenantDomain)
Get a documentation by artifact Id
|
String |
getDocumentationContent(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier,
String documentationName) |
org.wso2.carbon.appmgt.api.model.Icon |
getIcon(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier) |
org.wso2.carbon.appmgt.api.model.Subscriber |
getSubscriber(int subscriberId) |
Set<org.wso2.carbon.appmgt.api.model.WebApp> |
getSubscriberAPIs(org.wso2.carbon.appmgt.api.model.Subscriber subscriber) |
Set<org.wso2.carbon.appmgt.api.model.Tier> |
getTiers()
Returns a list of pre-defined #
Tier in the system. |
Set<org.wso2.carbon.appmgt.api.model.Tier> |
getTiers(String tenantDomain)
Returns a list of pre-defined #
Tier in the system. |
protected void |
handleException(String msg) |
protected void |
handleException(String msg,
Exception e) |
protected void |
handleResourceAlreadyExistsException(String msg) |
protected void |
handleResourceAuthorizationException(String msg) |
protected void |
handleResourceNotFoundException(String msg) |
boolean |
isAPIAvailable(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier) |
boolean |
isApplicationTokenExists(String accessToken) |
boolean |
isApplicationTokenRevoked(String accessToken) |
boolean |
isContextExist(String context) |
boolean |
isDocumentationExist(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier,
String docName)
Checks whether the given document already exists for the given api
|
Map<Integer,org.wso2.carbon.appmgt.api.model.APIKey> |
searchAccessToken(String searchType,
String searchTerm,
String loggedInUser) |
void |
updateSubscriber(org.wso2.carbon.appmgt.api.model.Subscriber subscriber) |
protected org.apache.commons.logging.Log log
protected org.wso2.carbon.registry.core.Registry registry
protected AppMDAO appMDAO
protected int tenantId
protected String tenantDomain
protected String username
protected AppRepository appRepository
public AbstractAPIManager()
throws org.wso2.carbon.appmgt.api.AppManagementException
org.wso2.carbon.appmgt.api.AppManagementExceptionpublic AbstractAPIManager(String username) throws org.wso2.carbon.appmgt.api.AppManagementException
org.wso2.carbon.appmgt.api.AppManagementExceptionpublic void cleanup()
cleanup in interface org.wso2.carbon.appmgt.api.APIManagerpublic List<org.wso2.carbon.appmgt.api.model.WebApp> getAllAPIs() throws org.wso2.carbon.appmgt.api.AppManagementException
getAllAPIs in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic List<org.wso2.carbon.appmgt.api.model.WebApp> getAllAPIs(String appType) throws org.wso2.carbon.appmgt.api.AppManagementException
org.wso2.carbon.appmgt.api.AppManagementExceptionpublic org.wso2.carbon.appmgt.api.model.WebApp getAPI(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier)
throws org.wso2.carbon.appmgt.api.AppManagementException
getAPI in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic org.wso2.carbon.appmgt.api.model.WebApp getAPI(String apiPath) throws org.wso2.carbon.appmgt.api.AppManagementException
org.wso2.carbon.appmgt.api.AppManagementExceptionpublic boolean isAPIAvailable(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier)
throws org.wso2.carbon.appmgt.api.AppManagementException
isAPIAvailable in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic Set<String> getAPIVersions(String providerName, String apiName) throws org.wso2.carbon.appmgt.api.AppManagementException
getAPIVersions in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic String addIcon(String resourcePath, org.wso2.carbon.appmgt.api.model.Icon icon) throws org.wso2.carbon.appmgt.api.AppManagementException
addIcon in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic List<org.wso2.carbon.appmgt.api.model.Documentation> getAllDocumentation(org.wso2.carbon.appmgt.api.model.APIIdentifier appId) throws org.wso2.carbon.appmgt.api.AppManagementException
getAllDocumentation in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic List<org.wso2.carbon.appmgt.api.model.Documentation> getAllDocumentation(org.wso2.carbon.appmgt.api.model.APIIdentifier apiId, String loggedUsername) throws org.wso2.carbon.appmgt.api.AppManagementException
getAllDocumentation in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic org.wso2.carbon.appmgt.api.model.Documentation getDocumentation(org.wso2.carbon.appmgt.api.model.APIIdentifier apiId,
org.wso2.carbon.appmgt.api.model.DocumentationType docType,
String docName)
throws org.wso2.carbon.appmgt.api.AppManagementException
getDocumentation in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic boolean isDocumentationExist(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier,
String docName)
throws org.wso2.carbon.appmgt.api.AppManagementException
isDocumentationExist in interface org.wso2.carbon.appmgt.api.APIManageridentifier - API IdentifierdocName - Name of the documentorg.wso2.carbon.appmgt.api.AppManagementException - if failed to check existence of the documentationpublic org.wso2.carbon.appmgt.api.model.Documentation getDocumentation(String docId, String requestedTenantDomain) throws org.wso2.carbon.appmgt.api.AppManagementException
getDocumentation in interface org.wso2.carbon.appmgt.api.APIManagerdocId - artifact id of the documentrequestedTenantDomain - tenant domain of the registry where the artifact is locatedorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic String getDocumentationContent(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier, String documentationName) throws org.wso2.carbon.appmgt.api.AppManagementException
getDocumentationContent in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic boolean isContextExist(String context) throws org.wso2.carbon.appmgt.api.AppManagementException
isContextExist in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic void addSubscriber(org.wso2.carbon.appmgt.api.model.Subscriber subscriber)
throws org.wso2.carbon.appmgt.api.AppManagementException
addSubscriber in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic void updateSubscriber(org.wso2.carbon.appmgt.api.model.Subscriber subscriber)
throws org.wso2.carbon.appmgt.api.AppManagementException
updateSubscriber in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic org.wso2.carbon.appmgt.api.model.Subscriber getSubscriber(int subscriberId)
throws org.wso2.carbon.appmgt.api.AppManagementException
getSubscriber in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic org.wso2.carbon.appmgt.api.model.Icon getIcon(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier)
throws org.wso2.carbon.appmgt.api.AppManagementException
getIcon in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic Set<org.wso2.carbon.appmgt.api.model.WebApp> getSubscriberAPIs(org.wso2.carbon.appmgt.api.model.Subscriber subscriber) throws org.wso2.carbon.appmgt.api.AppManagementException
getSubscriberAPIs in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionprotected void handleException(String msg, Exception e) throws org.wso2.carbon.appmgt.api.AppManagementException
org.wso2.carbon.appmgt.api.AppManagementExceptionprotected void handleException(String msg) throws org.wso2.carbon.appmgt.api.AppManagementException
org.wso2.carbon.appmgt.api.AppManagementExceptionprotected final void handleResourceAlreadyExistsException(String msg) throws org.wso2.carbon.appmgt.api.AppMgtResourceAlreadyExistsException
org.wso2.carbon.appmgt.api.AppMgtResourceAlreadyExistsExceptionprotected final void handleResourceNotFoundException(String msg) throws org.wso2.carbon.appmgt.api.AppMgtResourceNotFoundException
org.wso2.carbon.appmgt.api.AppMgtResourceNotFoundExceptionprotected final void handleResourceAuthorizationException(String msg) throws org.wso2.carbon.appmgt.api.AppMgtAuthorizationFailedException
org.wso2.carbon.appmgt.api.AppMgtAuthorizationFailedExceptionpublic boolean isApplicationTokenExists(String accessToken) throws org.wso2.carbon.appmgt.api.AppManagementException
isApplicationTokenExists in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic boolean isApplicationTokenRevoked(String accessToken) throws org.wso2.carbon.appmgt.api.AppManagementException
isApplicationTokenRevoked in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic org.wso2.carbon.appmgt.api.model.APIKey getAccessTokenData(String accessToken) throws org.wso2.carbon.appmgt.api.AppManagementException
getAccessTokenData in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic Map<Integer,org.wso2.carbon.appmgt.api.model.APIKey> searchAccessToken(String searchType, String searchTerm, String loggedInUser) throws org.wso2.carbon.appmgt.api.AppManagementException
searchAccessToken in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic org.wso2.carbon.appmgt.api.model.WebApp getAPI(org.wso2.carbon.appmgt.api.model.APIIdentifier identifier,
org.wso2.carbon.appmgt.api.model.APIIdentifier oldIdentifier)
throws org.wso2.carbon.appmgt.api.AppManagementException
org.wso2.carbon.appmgt.api.AppManagementExceptionpublic Set<org.wso2.carbon.appmgt.api.model.Tier> getTiers() throws org.wso2.carbon.appmgt.api.AppManagementException
Tier in the system.getTiers in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic Set<org.wso2.carbon.appmgt.api.model.Tier> getTiers(String tenantDomain) throws org.wso2.carbon.appmgt.api.AppManagementException
Tier in the system.getTiers in interface org.wso2.carbon.appmgt.api.APIManagerorg.wso2.carbon.appmgt.api.AppManagementExceptionCopyright © 2017 WSO2. All rights reserved.