public final class CommentManager extends Object
Modifier and Type | Field and Description |
---|---|
protected PSSession |
_session
The user connecting to the server.
|
Constructor and Description |
---|
CommentManager(PSSession session)
Creates a new manager for PageSeeder comments.
|
Modifier and Type | Method and Description |
---|---|
boolean |
archiveComment(PSComment comment,
PSMember member)
Archives the specified comment in PageSeeder.
|
boolean |
createComment(PSComment comment)
Creates the specified comment in PageSeeder.
|
boolean |
createComment(PSComment comment,
PSMember creator)
Creates the specified comment in PageSeeder.
|
boolean |
createComment(PSComment comment,
PSMember creator,
PSNotify notify,
List<PSGroup> groups)
Creates the specified comment in PageSeeder.
|
boolean |
createComment(PSComment comment,
PSMember creator,
PSNotify notify,
PSGroup group)
Creates the specified comment in PageSeeder.
|
boolean |
createComment(PSComment comment,
PSNotify notify,
List<PSGroup> groups)
Creates the specified comment in PageSeeder.
|
boolean |
createComment(PSComment comment,
PSNotify notify,
PSGroup group)
Creates the specified comment in PageSeeder.
|
List<PSComment> |
findComments(PSMember member,
PSGroup group,
String title,
String type,
List<String> paths)
Find comments using criteria.
|
List<PSComment> |
findComments(PSMember member,
PSGroup group,
String title,
String type,
List<String> statuses,
List<String> paths)
Find comments using criteria.
|
static PSEntityCache<PSComment> |
getCache()
Returns the internal cache used for the comments.
|
PSComment |
getComment(long id,
PSMember member)
Identify a comment from a specific comment ID.
|
List<PSComment> |
getCommentsByFilter(PSMember member,
PSGroup group,
String title,
String type,
List<String> paths)
Deprecated.
Use
findComments(PSMember, PSGroup,String, String, List) instead. |
List<PSComment> |
getCommentsByFilter(PSMember member,
PSGroup group,
String title,
String type,
List<String> statuses,
List<String> paths)
Deprecated.
|
boolean |
replyToComment(PSComment comment,
PSNotify notify,
List<PSGroup> groups,
long xlink)
Creates the specified comment in PageSeeder.
|
boolean |
save(PSComment comment,
PSMember editor,
PSNotify notify,
List<PSGroup> groups)
Edits the specified comment in PageSeeder.
|
boolean |
save(PSComment comment,
PSMember editor,
PSNotify notify,
PSGroup group)
Edits the specified comment in PageSeeder.
|
boolean |
save(PSComment comment,
PSNotify notify,
List<PSGroup> groups)
Edits the specified comment in PageSeeder.
|
boolean |
save(PSComment comment,
PSNotify notify,
PSGroup group)
Edits the specified comment in PageSeeder.
|
PSSession |
session() |
boolean |
unarchiveComment(PSComment comment,
PSMember member)
Unarchives the specified comment in PageSeeder.
|
protected final PSSession _session
public CommentManager(PSSession session)
session
- A valid session to connect to PageSeeder.public boolean createComment(PSComment comment) throws FailedPrecondition, APIException
This method only works for comments posted against a group.
comment
- The comment to createFailedPrecondition
APIException
public boolean createComment(PSComment comment, PSMember creator) throws FailedPrecondition, APIException
This method only works for comments posted against a group.
comment
- The comment to createcreator
- The comment's creator (may be different from author)FailedPrecondition
APIException
public boolean createComment(PSComment comment, PSNotify notify, PSGroup group) throws FailedPrecondition, APIException
comment
- The comment to createnotify
- Whether the comments should be silent, normal or an announcement (may be null
)group
- The group the comment should be posted againstFailedPrecondition
APIException
public boolean createComment(PSComment comment, PSMember creator, PSNotify notify, PSGroup group) throws FailedPrecondition, APIException
comment
- The comment to createcreator
- The comment's creator (may be different from author)notify
- Whether the comments should be silent, normal or an announcement (may be null
)group
- The group the comment should be posted againstFailedPrecondition
APIException
public boolean createComment(PSComment comment, PSNotify notify, List<PSGroup> groups) throws FailedPrecondition, APIException
comment
- The comment to createnotify
- Whether the comments should be silent, normal or an announcement (may be null
)groups
- The group the comment should be posted againstFailedPrecondition
APIException
public boolean createComment(PSComment comment, PSMember creator, PSNotify notify, List<PSGroup> groups) throws FailedPrecondition, APIException
comment
- The comment to createcreator
- The comment's creator (may be different from author)notify
- Whether the comments should be silent, normal or an announcement (may be null
)groups
- The group the comment should be posted againstFailedPrecondition
APIException
public boolean save(PSComment comment, PSNotify notify, PSGroup group) throws FailedPrecondition, APIException
comment
- The comment to savenotify
- Whether the comments should be silent, normal or an announcement (may be null
)group
- The group the comment should be posted againstFailedPrecondition
APIException
public boolean save(PSComment comment, PSMember editor, PSNotify notify, PSGroup group) throws FailedPrecondition, APIException
comment
- The comment to saveeditor
- The comment's editor (may be different from author)notify
- Whether the comments should be silent, normal or an announcement (may be null
)group
- The group the comment should be posted againstFailedPrecondition
APIException
public boolean save(PSComment comment, PSNotify notify, List<PSGroup> groups) throws FailedPrecondition, APIException
comment
- The comment to savenotify
- Whether the comments should be silent, normal or an announcement (may be null
)groups
- The groups the comment should be posted againstFailedPrecondition
APIException
public boolean save(PSComment comment, PSMember editor, PSNotify notify, List<PSGroup> groups) throws FailedPrecondition, APIException
comment
- The comment to saveeditor
- The comment's editor (may be different from author)notify
- Whether the comments should be silent, normal or an announcement (may be null
)groups
- The groups the comment should be posted againstFailedPrecondition
APIException
public boolean archiveComment(PSComment comment, PSMember member) throws FailedPrecondition, APIException
comment
- The comment to archivemember
- The member archiving the commentFailedPrecondition
APIException
public boolean unarchiveComment(PSComment comment, PSMember member) throws FailedPrecondition, APIException
comment
- The comment to archivemember
- The member archiving the commentFailedPrecondition
APIException
public boolean replyToComment(PSComment comment, PSNotify notify, List<PSGroup> groups, long xlink) throws FailedPrecondition, APIException
comment
- The comment to archivenotify
- Whether the comments should be silent, normal or an announcement (may be null
)groups
- The group the comment should be posted againstxlink
- The comment to reply toFailedPrecondition
APIException
public PSComment getComment(long id, PSMember member) throws APIException
id
- The ID of the comment.member
- The member who is trying to access the comment.null
if not found)APIException
public List<PSComment> findComments(PSMember member, PSGroup group, String title, String type, List<String> paths) throws APIException
member
- The member who is trying to access the comments.group
- The context grouptitle
- The comments title (can be null
)type
- The comments type (can be null
)paths
- A list of paths of URIs the comments must be attached to (can be null
)null
)APIException
public List<PSComment> findComments(PSMember member, PSGroup group, String title, String type, List<String> statuses, List<String> paths) throws APIException
member
- The member who is trying to access the comments.group
- The context grouptitle
- The comments title (can be null
)type
- The comments type (can be null
)statuses
- A list of statuses the comments must have (can be null
)paths
- A list of paths of URIs the comments must be attached to (can be null
)null
)APIException
@Deprecated public List<PSComment> getCommentsByFilter(PSMember member, PSGroup group, String title, String type, List<String> paths) throws APIException
findComments(PSMember, PSGroup,String, String, List)
instead.member
- The member who is trying to access the comments.group
- The context grouptitle
- The comments title (can be null
)type
- The comments type (can be null
)paths
- A list of paths of URIs the comments must be attached to (can be null
)null
)APIException
@Deprecated public List<PSComment> getCommentsByFilter(PSMember member, PSGroup group, String title, String type, List<String> statuses, List<String> paths) throws APIException
findComments(PSMember, PSGroup,String, String, List, List)
instead.member
- The member who is trying to access the comments.group
- The context grouptitle
- The comments title (can be null
)type
- The comments type (can be null
)statuses
- A list of statuses the comments must have (can be null
)paths
- A list of paths of URIs the comments must be attached to (can be null
)null
)APIException
public static PSEntityCache<PSComment> getCache()
public PSSession session()
Copyright © 2016 Allette Systems. All rights reserved.