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 Details

    • TopicManagerAdminService

      public TopicManagerAdminService()
  • Method Details

    • getAllTopics

      public org.wso2.carbon.event.core.topic.TopicNode getAllTopics() throws EventAdminException
      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

      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 name
      topicRolePermissions - 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 name
      startingIndex - Starting index of which the results should be returned
      maxSubscriptionCount - 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