public interface APIConsumer extends APIManager
| Modifier and Type | Method and Description |
|---|---|
String |
addApplication(Application application,
String userId)
Adds an application
|
void |
addComment(APIIdentifier identifier,
String comment,
String user) |
String |
addSubscription(APIIdentifier identifier,
String subscriptionType,
String userId,
int applicationId,
String trustedIdp)
Add new Subscriber
|
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 APIs
|
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
|
Comment[] |
getComments(APIIdentifier identifier) |
Set<String> |
getDeniedTiers()
Returns a list of Tiers denied for the current user
|
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.
|
Set<WebApp> |
getTopRatedAPIs(int limit)
Returns top rated APIs
|
int |
getUserRating(APIIdentifier apiId,
String user) |
boolean |
isApplicationTokenExists(String accessToken)
Check whether an application access token is already persist in database.
|
boolean |
isSubscribed(APIIdentifier apiIdentifier,
String userId)
Returns true if a given user has subscribed to the WebApp
|
boolean |
isTierDeneid(String tierName)
Check whether given Tier is denied for the user
|
void |
rateAPI(APIIdentifier apiId,
APIRating rating,
String user)
Rate a particular WebApp.
|
void |
removeAPIRating(APIIdentifier apiId,
String user)
Remove an user rating of a particular WebApp.
|
void |
removeAPISubscription(APIIdentifier identifier,
String userId,
String applicationName) |
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) |
Map<String,Object> |
searchPaginatedAPIs(String searchTerm,
String searchType,
String tenantDomain,
int start,
int end) |
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, getDocumentationContent, getIcon, getSubscriber, getSubscriberAPIs, getTiers, getTiers, isAPIAvailable, isApplicationTokenRevoked, isContextExist, searchAccessToken, updateSubscriberSubscriber 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 APIsSet<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 tagsvoid rateAPI(APIIdentifier apiId, APIRating rating, String user) throws AppManagementException
apiId - The WebApp identifierrating - The rating provided by the subscriberuser - Username of the subscriber providing the ratingAppManagementException - If an error occurs while rating the WebAppvoid removeAPIRating(APIIdentifier apiId, String user) throws AppManagementException
apiId - The WebApp identifieruser - Username of the subscriber providing the ratingAppManagementException - If an error occurs while rating the WebAppSet<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 subscriptionvoid addComment(APIIdentifier identifier, String comment, String user) throws AppManagementException
identifier - Api identifiercomment - comment textuser - Username of the comment authorAppManagementException - if failed to add comment for WebAppComment[] getComments(APIIdentifier identifier) throws AppManagementException
identifier - Api identifierAppManagementException - if failed to get comments for identifierString 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
AppManagementExceptionint getUserRating(APIIdentifier apiId, String user) 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 subscriberCopyright © 2016 WSO2. All rights reserved.