public interface APIConsumer extends APIManager
| Modifier and Type | Method and Description |
|---|---|
String |
addApplication(Application application,
String userId)
Adds an application
|
String |
addSubscription(APIIdentifier identifier,
String subscriptionType,
String userId,
int applicationId,
String trustedIdp)
Add new Subscriber
|
void |
addSubscription(String subscriberName,
WebApp webApp,
String applicationName) |
void |
addToFavouriteApps(APIIdentifier identifier,
String username,
int tenantIdOfUser,
int tenantIdOfStore)
Add the given app as favourite app for given user.
|
Map<String,Object> |
getAllPaginatedPublishedAPIs(String tenantDomain,
int start,
int end)
Returns a paginated list of all published APIs.
|
Set<WebApp> |
getAllPublishedAPIs(String tenantDomain)
Returns a list of all published APIs.
|
Set<Tag> |
getAllTags(String tenantDomain)
Get all tags of published Apps
|
Set<Tag> |
getAllTags(String tenantDomain,
String assetType,
Map<String,String> attributeMap) |
Set<WebApp> |
getAPIsWithTag(String tag)
Returns a list of #
org.wso2.carbon.apimgt.api.model.API bearing the selected tag |
Application[] |
getApplications(Subscriber subscriber)
Returns a list of applications for a given subscriber
|
float |
getAverageRating(String uuid,
String assetType)
Get average rating of an App by UUID
|
BusinessOwner |
getBusinessOwner(int businessOwnerId)
Retrieve business owner by given id.
|
BusinessOwner |
getBusinessOwnerForAppStore(int businessOwnerId,
int appTenantId)
Retrieve business owner for a given business owner id.
|
List<String> |
getBusinessOwnerIdsBySearchPrefix(String searchPrefix,
int tenantId)
Search business owner.
|
Set<String> |
getDeniedTiers()
Returns a list of Tiers denied for the current user
|
List<APIIdentifier> |
getFavouriteApps(String username,
int tenantIdOfUser,
int tenantIdOfStore,
WebAppSortOption sortOption)
Returns favourite apps of given user for given tenant store based on given sorting option.
|
Map<String,Object> |
getPaginatedAPIsWithTag(String tag,
int start,
int end)
Returns a paginated list of #
org.wso2.carbon.apimgt.api.model.API bearing the selected tag |
Set<WebApp> |
getPublishedAPIsByProvider(String providerId,
int limit)
/** Get a list of published APIs by the given provider.
|
Set<WebApp> |
getPublishedAPIsByProvider(String providerId,
String loggedUser,
int limit)
Get a list of published APIs by the given provider.
|
Set<WebApp> |
getRecentlyAddedAPIs(int limit,
String tenantDomain)
Get recently added APIs to the store
|
Set<SubscribedAPI> |
getSubscribedAPIs(Subscriber subscriber)
Returns a set of SubscribedAPI purchased by the given Subscriber
|
Set<SubscribedAPI> |
getSubscribedAPIs(Subscriber subscriber,
String applicationName)
Returns a set of SubscribedAPIs filtered by the given application name.
|
Set<SubscribedAPI> |
getSubscribedIdentifiers(Subscriber subscriber,
APIIdentifier identifier) |
Subscriber |
getSubscriber(String subscriberId) |
Subscription |
getSubscription(APIIdentifier apiIdentifier,
int applicationId,
String subscriptionType)
Get the subscription for given search criteria.
|
Map<String,Set<WebApp>> |
getTaggedAPIs()
Return tagged apps
|
Set<WebApp> |
getTopRatedAPIs(int limit)
Returns top rated APIs
|
List<APIIdentifier> |
getUserAccessibleApps(String username,
int tenantIdOfUser,
int tenantIdOfStore,
WebAppSortOption sortOption,
boolean treatAsSite)
Returns the accessible web apps(anonymous + subscribed) of given user for given tenant store.
|
WebApp |
getWebApp(String uuid)
Returns details of an WebApp
|
boolean |
hasFavouritePage(String username,
int tenantIdOfUser,
int tenantIdOfStore)
Checks whether user has selected favourite page as default landing page in store.
|
boolean |
isApplicationTokenExists(String accessToken)
Check whether an application access token is already persist in database.
|
boolean |
isFavouriteApp(APIIdentifier identifier,
String username,
int tenantIdOfUser,
int tenantIdOfStore)
Check whether given app exists in the favourite app list of the user in given tenant store.
|
boolean |
isSubscribed(APIIdentifier apiIdentifier,
String userId)
Returns true if a given user has subscribed to the WebApp
|
boolean |
isSubscribedToMobileApp(String userId,
String appId) |
boolean |
isTierDeneid(String tierName)
Check whether given Tier is denied for the user
|
void |
removeAPISubscription(APIIdentifier identifier,
String userId,
String applicationName) |
void |
removeFavouritePage(String username,
int tenantIdOfUser,
int tenantIdOfStore)
Remove the favourite page from default landing page in store.
|
void |
removeFromFavouriteApps(APIIdentifier identifier,
String username,
int tenantIdOfUser,
int tenantIdOfStore)
Remove the given app from favourite app list of given user.
|
void |
removeSubscriber(APIIdentifier identifier,
String userId)
Remove a Subscriber
|
void |
removeSubscription(APIIdentifier identifier,
String userId,
int applicationId)
Unsubscribe the specified user from the specified WebApp in the given application
|
Set<WebApp> |
searchAPI(String searchTerm,
String searchType,
String tenantDomain) |
List<APIIdentifier> |
searchFavouriteApps(String username,
int tenantIdOfUser,
int tenantIdOfStore,
WebAppSearchOption searchOption,
String searchValue)
Returns favourite apps of user for given tenant store based on given search criteria.
|
Map<String,Object> |
searchPaginatedAPIs(String searchTerm,
String searchType,
String tenantDomain,
int start,
int end) |
List<APIIdentifier> |
searchUserAccessibleApps(String username,
int tenantIdOfUser,
int tenantIdOfStore,
boolean treatAsSite,
WebAppSearchOption searchOption,
String searchValue)
Returns accessible apps(anonymous + subscribed) of given user based on give search option.
|
void |
setFavouritePage(String username,
int tenantIdOfUser,
int tenantIdOfStore)
Add favourite page as default landing page in store.
|
void |
updateApplication(Application application)
Updates the details of the specified user application.
|
void |
updateSubscriptions(APIIdentifier identifier,
String userId,
int applicationId)
This method is to update the subscriber.
|
addIcon, addSubscriber, cleanup, getAccessTokenData, getAllAPIs, getAllDocumentation, getAllDocumentation, getAPI, getAPIVersions, getDocumentation, getDocumentation, getDocumentationContent, getIcon, getSubscriber, getSubscriberAPIs, getTiers, getTiers, isAPIAvailable, isApplicationTokenRevoked, isContextExist, isDocumentationExist, searchAccessToken, updateSubscriberBusinessOwner getBusinessOwner(int businessOwnerId) throws AppManagementException
businessOwnerId - Business owner idBusinessOwner objectAppManagementException - on error while trying to get business ownerBusinessOwner getBusinessOwnerForAppStore(int businessOwnerId, int appTenantId) throws AppManagementException
businessOwnerId - Business owner idappTenantId - Tenant id of the applicationBusinessOwner objectAppManagementException - on error while trying to get business ownerList<String> getBusinessOwnerIdsBySearchPrefix(String searchPrefix, int tenantId) throws AppManagementException
searchPrefix - Search prefixtenantId - Tenant idAppManagementException - on error while trying to search business ownerSubscriber getSubscriber(String subscriberId) throws AppManagementException
subscriberId - id of the SubscriberAppManagementException - if failed to get SubscriberSet<WebApp> getAPIsWithTag(String tag) throws AppManagementException
org.wso2.carbon.apimgt.api.model.API bearing the selected tagtag - name of the tagAppManagementException - if failed to get set of WebAppMap<String,Object> getPaginatedAPIsWithTag(String tag, int start, int end) throws AppManagementException
org.wso2.carbon.apimgt.api.model.API bearing the selected tagtag - name of the tagstart - starting numberend - ending numberAppManagementException - if failed to get set of WebAppSet<WebApp> getAllPublishedAPIs(String tenantDomain) throws AppManagementException
AppManagementException - if failed to WebApp setMap<String,Object> getAllPaginatedPublishedAPIs(String tenantDomain, int start, int end) throws AppManagementException
tenantDomain - tenant domainstart - starting numberend - ending numberAppManagementException - if failed to WebApp setSet<WebApp> getTopRatedAPIs(int limit) throws AppManagementException
limit - if -1, no limit. Return everything else, limit the return list to specified value.AppManagementException - if failed to get top rated APIsfloat getAverageRating(String uuid, String assetType) throws AppManagementException
uuid - assetType - AppManagementExceptionSet<WebApp> getRecentlyAddedAPIs(int limit, String tenantDomain) throws AppManagementException
limit - if -1, no limit. Return everything else, limit the return list to specified value.AppManagementException - if failed to get recently added APIsSet<Tag> getAllTags(String tenantDomain) throws AppManagementException
AppManagementException - if failed to get all the tagsSet<Tag> getAllTags(String tenantDomain, String assetType, Map<String,String> attributeMap) throws AppManagementException
tenantDomain - assetType - Currently we don't use asset type. Asset type could be webapp, mobileapp or any other asset
type.attributeMap - Attribute map for the give assetType.AppManagementExceptionSet<SubscribedAPI> getSubscribedAPIs(Subscriber subscriber) throws AppManagementException
subscriber - SubscriberAppManagementException - if failed to get WebApp for subscriberSet<SubscribedAPI> getSubscribedAPIs(Subscriber subscriber, String applicationName) throws AppManagementException
subscriber - SubscriberAppManagementException - if failed to get WebApp for subscriberboolean isSubscribed(APIIdentifier apiIdentifier, String userId) throws AppManagementException
apiIdentifier - APIIdentifieruserId - user idAppManagementException - if failed to check the subscribed stateString addSubscription(APIIdentifier identifier, String subscriptionType, String userId, int applicationId, String trustedIdp) throws AppManagementException
identifier - APIIdentifiersubscriptionType - Type of the subscription. E.g. Individual, EnterpriseuserId - id of the userapplicationId - Application Id @return String subscription statusAppManagementException - if failed to add subscription details to databaseSubscription getSubscription(APIIdentifier apiIdentifier, int applicationId, String subscriptionType) throws AppManagementException
apiIdentifier - APIIdentifierapplicationId - Application IdAppManagementException - If an error occurred while getting the subscription.void removeSubscription(APIIdentifier identifier, String userId, int applicationId) throws AppManagementException
identifier - APIIdentifieruserId - id of the userapplicationId - Application IdAppManagementException - if failed to add subscription details to databasevoid removeAPISubscription(APIIdentifier identifier, String userId, String applicationName) throws AppManagementException
AppManagementExceptionvoid removeSubscriber(APIIdentifier identifier, String userId) throws AppManagementException
identifier - APIIdentifieruserId - id of the userAppManagementException - if failed to add subscription details to databasevoid updateSubscriptions(APIIdentifier identifier, String userId, int applicationId) throws AppManagementException
identifier - APIIdentifieruserId - user idapplicationId - Application IdAppManagementException - if failed to update subscriptionWebApp getWebApp(String uuid) throws AppManagementException
uuid - uuid of the AAppManagementException - if failed get WebApp from APIIdentifierString addApplication(Application application, String userId) throws AppManagementException
application - ApplicationuserId - User IdAppManagementException - if failed to add Applicationvoid updateApplication(Application application) throws AppManagementException
application - Application object containing updated dataAppManagementException - If an error occurs while updating the applicationSet<SubscribedAPI> getSubscribedIdentifiers(Subscriber subscriber, APIIdentifier identifier) throws AppManagementException
AppManagementExceptionSet<WebApp> searchAPI(String searchTerm, String searchType, String tenantDomain) throws AppManagementException
AppManagementExceptionMap<String,Object> searchPaginatedAPIs(String searchTerm, String searchType, String tenantDomain, int start, int end) throws AppManagementException
AppManagementExceptionSet<WebApp> getPublishedAPIsByProvider(String providerId, String loggedUser, int limit) throws AppManagementException
providerId - , provider idloggedUser - logged userlimit - Maximum number of results to return. Pass -1 to get all.AppManagementException - if failed to get set of WebAppSet<WebApp> getPublishedAPIsByProvider(String providerId, int limit) throws AppManagementException
providerId - , provider idlimit - Maximum number of results to return. Pass -1 to get all.AppManagementException - if failed to get set of WebAppboolean isApplicationTokenExists(String accessToken) throws AppManagementException
isApplicationTokenExists in interface APIManageraccessToken - AppManagementExceptionSet<String> getDeniedTiers() throws AppManagementException
AppManagementException - if failed to get the tiersboolean isTierDeneid(String tierName) throws AppManagementException
tierName - AppManagementException - if failed to get the tiersApplication[] getApplications(Subscriber subscriber) throws AppManagementException
subscriber - SubscriberAppManagementException - if failed to applications for given subscribervoid addToFavouriteApps(APIIdentifier identifier, String username, int tenantIdOfUser, int tenantIdOfStore) throws AppManagementException
identifier - App identifierusername - UsernametenantIdOfUser - Tenant Id Of UsertenantIdOfStore - Tenant Id Of StoreAppManagementExceptionvoid removeFromFavouriteApps(APIIdentifier identifier, String username, int tenantIdOfUser, int tenantIdOfStore) throws AppManagementException
identifier - App identifierusername - UsernametenantIdOfUser - Tenant Id Of UsertenantIdOfStore - Tenant Id Of StoreAppManagementExceptionboolean isFavouriteApp(APIIdentifier identifier, String username, int tenantIdOfUser, int tenantIdOfStore) throws AppManagementException
identifier - Api identifierusername - UsernametenantIdOfUser - Tenant Id Of UsertenantIdOfStore - Tenant Id Of StoreAppManagementExceptionList<APIIdentifier> getFavouriteApps(String username, int tenantIdOfUser, int tenantIdOfStore, WebAppSortOption sortOption) throws AppManagementException
username - UsernametenantIdOfUser - Tenant Id Of UsertenantIdOfStore - Tenant Id Of StoresortOption - Sort OptionAppManagementExceptionList<APIIdentifier> searchFavouriteApps(String username, int tenantIdOfUser, int tenantIdOfStore, WebAppSearchOption searchOption, String searchValue) throws AppManagementException
username - UsernametenantIdOfUser - Tenant Id of Logged in usertenantIdOfStore - Tenant Id of StoresearchOption - Search OptionsearchValue - Search ValueAppManagementExceptionList<APIIdentifier> getUserAccessibleApps(String username, int tenantIdOfUser, int tenantIdOfStore, WebAppSortOption sortOption, boolean treatAsSite) throws AppManagementException
username - UsernametenantIdOfUser - Tenant Id Of UsertenantIdOfStore - Tenant Id Of StoresortOption - Sort OptiontreatAsSite - Treat As Site (TRUE->site,FALSE->WebApp)AppManagementExceptionList<APIIdentifier> searchUserAccessibleApps(String username, int tenantIdOfUser, int tenantIdOfStore, boolean treatAsSite, WebAppSearchOption searchOption, String searchValue) throws AppManagementException
username - UserNametenantIdOfUser - Tenant Id of Logged in usertenantIdOfStore - Tenant Id of Store(=Tenant Id of App)searchOption - Search OptiontreatAsSite - Treat As Site (TRUE->site,FALSE->WebApp)AppManagementExceptionvoid setFavouritePage(String username, int tenantIdOfUser, int tenantIdOfStore) throws AppManagementException
username - UsernametenantIdOfUser - Tenant Id Of UsertenantIdOfStore - Tenant Id Of StoreAppManagementExceptionvoid removeFavouritePage(String username, int tenantIdOfUser, int tenantIdOfStore) throws AppManagementException
username - UsernametenantIdOfUser - Tenant Id Of UsertenantIdOfStore - @throws AppManagementExceptionAppManagementExceptionboolean hasFavouritePage(String username, int tenantIdOfUser, int tenantIdOfStore) throws AppManagementException
username - UsernametenantIdOfUser - Tenant Id Of UsertenantIdOfStore - @throws AppManagementExceptionAppManagementExceptionboolean isSubscribedToMobileApp(String userId, String appId) throws AppManagementException
AppManagementExceptionvoid addSubscription(String subscriberName, WebApp webApp, String applicationName) throws AppManagementException
AppManagementExceptionCopyright © 2017 WSO2. All rights reserved.