public class TopicManagerServiceImpl extends Object implements TopicManagerService
Constructor and Description |
---|
TopicManagerServiceImpl(String topicStoragePath)
Initializes Registry Topic Manager
|
Modifier and Type | Method and Description |
---|---|
void |
addTopic(String topicName)
Adding topic, when creating topics from the user interface
Adds a new topic
|
boolean |
checkUserHasAddTopicPermission(String username)
Check if given user has add topic permission.
|
boolean |
checkUserHasDeleteTopicPermission(String username)
Check if given user has delete topic permission.
|
boolean |
checkUserHasDetailsTopicPermission(String username)
Check if given user has permission to view topic details.
|
boolean |
checkUserHasPublishTopicPermission(String topicName,
String username)
Check if given user has permission to publish to topic.
|
String[] |
getBackendRoles()
Get array of backend roles excluding admin and wso2.anonymous.role roles
|
Subscription[] |
getJMSSubscriptions(String topicName)
Gets the JMS subscriptions for a given topic
|
TopicNode |
getPaginatedTopicTree(String topicPath,
int startIndex,
int numberOfTopicsPerRound)
Get the paginated topic tree.
|
Subscription[] |
getSubscriptions(String topicName,
boolean withChildren)
Gets subscriptions for a topic
|
TopicRolePermission[] |
getTopicRolePermission(String topicName)
Gets the permissions for topic
|
String |
getTopicStoragePath()
Gets the topic storage path
|
TopicNode |
getTopicTree()
Gets the topic tree.
|
boolean |
isTopicExists(String topicName)
Checks whether topic exists
|
boolean |
removeTopic(String topicName)
Removes a topic
|
void |
setTopicStoragePath(String topicStoragePath)
The topic storage path
|
void |
updatePermissions(String topicName,
TopicRolePermission[] topicRolePermissions)
Update permissions for a topic
|
public TopicManagerServiceImpl(String topicStoragePath)
topicStoragePath
- the topic registry pathpublic TopicNode getTopicTree() throws EventBrokerException
getTopicTree
in interface TopicManagerService
EventBrokerException
public TopicNode getPaginatedTopicTree(String topicPath, int startIndex, int numberOfTopicsPerRound) throws EventBrokerException
getPaginatedTopicTree
in interface TopicManagerService
topicPath
- path of the node in the topic treestartIndex
- start index of the paginated treenumberOfTopicsPerRound
- number of topics should be shown per roundEventBrokerException
public void addTopic(String topicName) throws EventBrokerException
addTopic
in interface TopicManagerService
topicName
- topic nameEventBrokerException
public TopicRolePermission[] getTopicRolePermission(String topicName) throws EventBrokerException
getTopicRolePermission
in interface TopicManagerService
topicName
- topic nameEventBrokerException
public void updatePermissions(String topicName, TopicRolePermission[] topicRolePermissions) throws EventBrokerException
updatePermissions
in interface TopicManagerService
topicName
- topic nametopicRolePermissions
- array of permissions for topicsEventBrokerException
public String getTopicStoragePath()
public void setTopicStoragePath(String topicStoragePath)
topicStoragePath
- path for topic storagepublic Subscription[] getSubscriptions(String topicName, boolean withChildren) throws EventBrokerException
getSubscriptions
in interface TopicManagerService
topicName
- topic namewithChildren
- include topics with children. i.e subtopicsEventBrokerException
public Subscription[] getJMSSubscriptions(String topicName) throws EventBrokerException
getJMSSubscriptions
in interface TopicManagerService
topicName
- topic nameEventBrokerException
public String[] getBackendRoles() throws EventBrokerException
getBackendRoles
in interface TopicManagerService
EventBrokerException
public boolean removeTopic(String topicName) throws EventBrokerException
removeTopic
in interface TopicManagerService
topicName
- topic nameEventBrokerException
public boolean isTopicExists(String topicName) throws EventBrokerException
isTopicExists
in interface TopicManagerService
topicName
- topic nameEventBrokerException
public boolean checkUserHasAddTopicPermission(String username) throws EventBrokerException
checkUserHasAddTopicPermission
in interface TopicManagerService
username
- usernameEventBrokerException
public boolean checkUserHasDeleteTopicPermission(String username) throws EventBrokerException
checkUserHasDeleteTopicPermission
in interface TopicManagerService
username
- usernameEventBrokerException
public boolean checkUserHasDetailsTopicPermission(String username) throws EventBrokerException
checkUserHasDetailsTopicPermission
in interface TopicManagerService
username
- usernameEventBrokerException
public boolean checkUserHasPublishTopicPermission(String topicName, String username) throws EventBrokerException
checkUserHasPublishTopicPermission
in interface TopicManagerService
topicName
- topic name to check againstusername
- usernameEventBrokerException
Copyright © 2019 WSO2. All rights reserved.