Class TopicManagerAdminService
- java.lang.Object
-
- org.wso2.carbon.event.admin.internal.TopicManagerAdminService
-
public class TopicManagerAdminService extends Object
Provides topic related functions as a web service.
-
-
Constructor Summary
Constructors Constructor Description TopicManagerAdminService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTopic(String topic)Adds a new topicorg.wso2.carbon.event.core.topic.TopicNodegetAllTopics()Gets all the topicsintgetAllWSSubscriptionCountForTopic(String topic)Gets the total number of subscriptions for a topic Suppressing warning as this is used as a web serviceSubscription[]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 serviceSubscription[]getJMSSubscriptionsForTopic(String topic)Gets the JMS subscriptions for a topic Suppressing warning as this is used as a web serviceorg.wso2.carbon.event.core.topic.TopicRolePermission[]getTopicRolePermissions(String topic)Gets the permission roles for a topic Suppressing warning as this is used as a web serviceString[]getUserRoles()Gets user roles through topic managerSubscription[]getWsSubscriptionsForTopic(String topic)Gets all the subscriptions Suppressing warning as this is used as a web servicebooleanremoveTopic(String topic)Removes a topic Suppressing warning as this is used as a web servicevoidupdatePermission(String topic, org.wso2.carbon.event.core.topic.TopicRolePermission[] topicRolePermissions)Updates the permissions for roles of a topic Suppressing warning as this is used as a web service
-
-
-
Method Detail
-
getAllTopics
public org.wso2.carbon.event.core.topic.TopicNode getAllTopics() throws EventAdminExceptionGets all the topics- Returns:
- A topic node
- Throws:
EventAdminException
-
getTopicRolePermissions
public org.wso2.carbon.event.core.topic.TopicRolePermission[] getTopicRolePermissions(String topic) throws EventAdminException
Gets the permission roles for a topic Suppressing warning as this is used as a web service- Parameters:
topic- Topic name- Returns:
- An array of TopicRolePermission
- Throws:
EventAdminException- Thrown when topic manager cannot be accessed.
-
addTopic
public void addTopic(String topic) throws EventAdminException
Adds a new topic- Parameters:
topic- New topic name- Throws:
EventAdminException- Thrown when accessing registry or when providing permissions.
-
updatePermission
public void updatePermission(String topic, org.wso2.carbon.event.core.topic.TopicRolePermission[] topicRolePermissions) throws EventAdminException
Updates the permissions for roles of a topic Suppressing warning as this is used as a web service- Parameters:
topic- Topic nametopicRolePermissions- New roles with permissions- Throws:
EventAdminException- Thrown when updating topic permissions.
-
getAllWSSubscriptionsForTopic
public Subscription[] getAllWSSubscriptionsForTopic(String topic, int startingIndex, int maxSubscriptionCount) throws EventAdminException
Gets all subscriptions for a topic with limited results to return Suppressing warning as this is used as a web service- Parameters:
topic- Topic namestartingIndex- Starting index of which the results should be returnedmaxSubscriptionCount- The amount of results to be returned- Returns:
- An array of Subscriptions
- Throws:
EventAdminException- Thrown when accessing topic manager.
-
getWsSubscriptionsForTopic
public Subscription[] getWsSubscriptionsForTopic(String topic) throws EventAdminException
Gets all the subscriptions Suppressing warning as this is used as a web service- Parameters:
topic- Topic name- Returns:
- An array of subscriptions
- Throws:
EventAdminException- Thrown when accessing topic manager.
-
getAllWSSubscriptionCountForTopic
public int getAllWSSubscriptionCountForTopic(String topic) throws EventAdminException
Gets the total number of subscriptions for a topic Suppressing warning as this is used as a web service- Parameters:
topic- Topic name- Returns:
- Number of subscriptions
- Throws:
EventAdminException- Thrown when accessing topic manager.
-
getJMSSubscriptionsForTopic
public Subscription[] getJMSSubscriptionsForTopic(String topic) throws EventAdminException
Gets the JMS subscriptions for a topic Suppressing warning as this is used as a web service- Parameters:
topic- Topic name- Returns:
- An array of subscriptions
- Throws:
EventAdminException- Thrown when getting JMS subscriptions details from registry.
-
getUserRoles
public String[] getUserRoles() throws EventAdminException
Gets user roles through topic manager- Returns:
- A string array of roles
- Throws:
EventAdminException- Thrown when topic manager is unable to get user roles.
-
removeTopic
public boolean removeTopic(String topic) throws EventAdminException
Removes a topic Suppressing warning as this is used as a web service- Parameters:
topic- Topic name- Returns:
- true if topic existed to delete and deleted, false otherwise.
- Throws:
EventAdminException
-
-