Class TopicManagerAdminService
java.lang.Object
org.wso2.carbon.event.admin.internal.TopicManagerAdminService
Provides topic related functions as a web service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new topicorg.wso2.carbon.event.core.topic.TopicNodeGets all the topicsintGets the total number of subscriptions for a topic Suppressing warning as this is used as a web servicegetAllWSSubscriptionsForTopic(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 serviceGets 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[]Gets user roles through topic managergetWsSubscriptionsForTopic(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
-
Constructor Details
-
TopicManagerAdminService
public TopicManagerAdminService()
-
-
Method Details
-
getAllTopics
Gets 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
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
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
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
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
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
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
-