public class TopicTool extends Object
Constructor and Description |
---|
TopicTool() |
Modifier and Type | Method and Description |
---|---|
BlogData |
getBlog(Number blogId)
Return the details of a topic, the properties will not be contained.
|
String |
getBlogRole(Long blogId) |
Blog |
getDefaultBlog() |
Long |
getDefaultBlogId() |
String |
getDefaultBlogRole() |
MinimalBlogData |
getMinimalBlogInfo(Number blogId)
Return the minimal set of information on a topic, even if the current user has no access to
the topic.
|
String |
getUsersWithRoleAsJson(long topicId,
String role)
Method to get a list of users with the given role from the given topic.
|
boolean |
hasChildren(Long topicId) |
boolean |
hasExternalObjects(Long blogId)
Set the external objects for this blog.
|
boolean |
hasPermission(long topicId,
String permissionIdentifier)
Can be used to check if the current user has a specific permission on a given blog.
|
boolean |
isDefaultBlogEnabled(boolean readAccessRequired,
boolean writeAccessRequired) |
public BlogData getBlog(Number blogId)
blogId
- the ID of the topicpublic String getBlogRole(Long blogId)
blogId
- The id of the blog to test.public Blog getDefaultBlog()
public Long getDefaultBlogId()
public String getDefaultBlogRole()
public MinimalBlogData getMinimalBlogInfo(Number blogId)
blogId
- the ID of the topicpublic String getUsersWithRoleAsJson(long topicId, String role)
topicId
- The topics id.role
- The role to get.public boolean hasChildren(Long topicId)
topicId
- The topics id.public boolean hasExternalObjects(Long blogId)
blogId
- The blogs id.public boolean hasPermission(long topicId, String permissionIdentifier)
topicId
- The topics id.permissionIdentifier
- The permission as String.public boolean isDefaultBlogEnabled(boolean readAccessRequired, boolean writeAccessRequired)
readAccessRequired
- if true the default blog will only be enabled if the current user has read access
to that blogwriteAccessRequired
- if true the default blog will only be enabled if the current user has write access
to that blogCopyright © 2019 Communote team. All rights reserved.