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 TopicManagerServiceEventBrokerExceptionpublic TopicNode getPaginatedTopicTree(String topicPath, int startIndex, int numberOfTopicsPerRound) throws EventBrokerException
getPaginatedTopicTree in interface TopicManagerServicetopicPath - path of the node in the topic treestartIndex - start index of the paginated treenumberOfTopicsPerRound - number of topics should be shown per roundEventBrokerExceptionpublic void addTopic(String topicName) throws EventBrokerException
addTopic in interface TopicManagerServicetopicName - topic nameEventBrokerExceptionpublic TopicRolePermission[] getTopicRolePermission(String topicName) throws EventBrokerException
getTopicRolePermission in interface TopicManagerServicetopicName - topic nameEventBrokerExceptionpublic void updatePermissions(String topicName, TopicRolePermission[] topicRolePermissions) throws EventBrokerException
updatePermissions in interface TopicManagerServicetopicName - topic nametopicRolePermissions - array of permissions for topicsEventBrokerExceptionpublic String getTopicStoragePath()
public void setTopicStoragePath(String topicStoragePath)
topicStoragePath - path for topic storagepublic Subscription[] getSubscriptions(String topicName, boolean withChildren) throws EventBrokerException
getSubscriptions in interface TopicManagerServicetopicName - topic namewithChildren - include topics with children. i.e subtopicsEventBrokerExceptionpublic Subscription[] getJMSSubscriptions(String topicName) throws EventBrokerException
getJMSSubscriptions in interface TopicManagerServicetopicName - topic nameEventBrokerExceptionpublic String[] getBackendRoles() throws EventBrokerException
getBackendRoles in interface TopicManagerServiceEventBrokerExceptionpublic boolean removeTopic(String topicName) throws EventBrokerException
removeTopic in interface TopicManagerServicetopicName - topic nameEventBrokerExceptionpublic boolean isTopicExists(String topicName) throws EventBrokerException
isTopicExists in interface TopicManagerServicetopicName - topic nameEventBrokerExceptionpublic boolean checkUserHasAddTopicPermission(String username) throws EventBrokerException
checkUserHasAddTopicPermission in interface TopicManagerServiceusername - usernameEventBrokerExceptionpublic boolean checkUserHasDeleteTopicPermission(String username) throws EventBrokerException
checkUserHasDeleteTopicPermission in interface TopicManagerServiceusername - usernameEventBrokerExceptionpublic boolean checkUserHasDetailsTopicPermission(String username) throws EventBrokerException
checkUserHasDetailsTopicPermission in interface TopicManagerServiceusername - usernameEventBrokerExceptionpublic boolean checkUserHasPublishTopicPermission(String topicName, String username) throws EventBrokerException
checkUserHasPublishTopicPermission in interface TopicManagerServicetopicName - topic name to check againstusername - usernameEventBrokerExceptionCopyright © 2017 WSO2. All rights reserved.