public class AndesEventAdminService
extends org.wso2.carbon.core.AbstractAdmin
Constructor and Description |
---|
AndesEventAdminService() |
Modifier and Type | Method and Description |
---|---|
void |
addTopic(String topic)
Adds a new topic
|
boolean |
checkCurrentUserHasAddTopicPermission()
Evaluate current logged in user has add topic permission.
|
boolean |
checkCurrentUserHasDeleteTopicPermission()
Evaluate current logged in user has delete topic permission.
|
boolean |
checkCurrentUserHasDetailsTopicPermission()
Evaluate current logged in user has view topic details permission.
|
boolean |
checkCurrentUserHasPublishTopicPermission(String topicName)
Evaluate current logged in user has publish permission for given topic.
|
boolean |
checkUserHasAddTopicPermission(String username)
Evaluate given username has add topic permission.
|
boolean |
checkUserHasDeleteTopicPermission(String username)
Evaluate given username has delete topic permission.
|
boolean |
checkUserHasDetailsTopicPermission(String username)
Evaluate given username has view topic details permission.
|
boolean |
checkUserHasPublishTopicPermission(String topicName,
String username)
Evaluate given username has publish permission for given topic.
|
org.wso2.carbon.andes.event.core.TopicNode |
getAllTopics()
Gets all the topics
|
int |
getAllWSSubscriptionCountForTopic(String topic)
Gets the total number of subscriptions for a topic
Suppressing warning as this is used as a web service
|
Subscription[] |
getAllWSSubscriptionsForTopic(String topic,
int startingIndex,
int maxSubscriptionCount)
Gets all subscriptions for a topic with limited results to return
Suppressing warning as this is used as a web service
|
Subscription[] |
getJMSSubscriptionsForTopic(String topic)
Gets the JMS subscriptions for a topic
Suppressing warning as this is used as a web service
|
org.wso2.carbon.andes.event.core.TopicNode |
getPaginatedTopicTree(String topicPath,
int startIndex,
int numberOfTopicsPerRound)
Gets a subset of the topics
|
org.wso2.carbon.andes.event.core.TopicRolePermission[] |
getTopicRolePermissions(String topic)
Gets the permission roles for a topic
Suppressing warning as this is used as a web service
|
String[] |
getUserRoles()
Gets user roles through topic manager
|
Subscription[] |
getWsSubscriptionsForTopic(String topic)
Gets all the subscriptions
Suppressing warning as this is used as a web service
|
void |
publishToTopic(String content,
String topicName)
Publish a message to given topic
|
boolean |
removeTopic(String topic)
Removes a topic
Suppressing warning as this is used as a web service
|
void |
updatePermission(String topic,
org.wso2.carbon.andes.event.core.TopicRolePermission[] topicRolePermissions)
Updates the permissions for roles of a topic
Suppressing warning as this is used as a web service
|
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
public org.wso2.carbon.andes.event.core.TopicNode getAllTopics() throws EventAdminException
EventAdminException
public org.wso2.carbon.andes.event.core.TopicNode getPaginatedTopicTree(String topicPath, int startIndex, int numberOfTopicsPerRound) throws EventAdminException
startIndex
- start index of the paginated treenumberOfTopicsPerRound
- number of topics should be shown per roundEventAdminException
public org.wso2.carbon.andes.event.core.TopicRolePermission[] getTopicRolePermissions(String topic) throws EventAdminException
topic
- Topic nameEventAdminException
- Thrown when topic manager cannot be accessed.public void addTopic(String topic) throws EventAdminException
topic
- New topic nameEventAdminException
- Thrown when accessing registry or when providing permissions.public void updatePermission(String topic, org.wso2.carbon.andes.event.core.TopicRolePermission[] topicRolePermissions) throws EventAdminException
topic
- Topic nametopicRolePermissions
- New roles with permissionsEventAdminException
- Thrown when updating topic permissions.public Subscription[] getAllWSSubscriptionsForTopic(String topic, int startingIndex, int maxSubscriptionCount) throws EventAdminException
topic
- Topic namestartingIndex
- Starting index of which the results should be returnedmaxSubscriptionCount
- The amount of results to be returnedEventAdminException
- Thrown when accessing topic manager.public Subscription[] getWsSubscriptionsForTopic(String topic) throws EventAdminException
topic
- Topic nameEventAdminException
- Thrown when accessing topic manager.public int getAllWSSubscriptionCountForTopic(String topic) throws EventAdminException
topic
- Topic nameEventAdminException
- Thrown when accessing topic manager.public Subscription[] getJMSSubscriptionsForTopic(String topic) throws EventAdminException
topic
- Topic nameEventAdminException
- Thrown when getting JMS subscriptions details from registry.public String[] getUserRoles() throws EventAdminException
EventAdminException
- Thrown when topic manager is unable to get user roles.public void publishToTopic(String content, String topicName) throws EventAdminException
content
- message to publishtopicName
- topicEventAdminException
public boolean checkCurrentUserHasAddTopicPermission() throws EventAdminException
EventAdminException
public boolean checkUserHasAddTopicPermission(String username) throws EventAdminException
EventAdminException
public boolean checkCurrentUserHasDeleteTopicPermission() throws EventAdminException
EventAdminException
public boolean checkUserHasDeleteTopicPermission(String username) throws EventAdminException
EventAdminException
public boolean checkCurrentUserHasDetailsTopicPermission() throws EventAdminException
EventAdminException
public boolean checkUserHasDetailsTopicPermission(String username) throws EventAdminException
EventAdminException
public boolean checkCurrentUserHasPublishTopicPermission(String topicName) throws EventAdminException
EventAdminException
public boolean checkUserHasPublishTopicPermission(String topicName, String username) throws EventAdminException
EventAdminException
public boolean removeTopic(String topic) throws EventAdminException
topic
- Topic nameEventAdminException
Copyright © 2019 WSO2. All rights reserved.