|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.logging.LogDelegator
org.olat.core.commons.services.commentAndRating.UserCommentsManager
public abstract class UserCommentsManager
Description:
The user comment manager provides methods to comment any given
OLATResourceable object. To use this manager, make sure a proper
implementation for the bean
'org.olat.core.commons.services.commentAndRating.UserCommentsManager' is
defined in the spring configuration.
Initial Date: 23.11.2009
| Constructor Summary | |
|---|---|
UserCommentsManager()
|
|
| Method Summary | |
|---|---|
abstract java.lang.Long |
countComments()
|
abstract UserComment |
createComment(Identity creator,
java.lang.String commentText)
Create a new comment for the configured resource |
abstract int |
deleteAllComments()
Delete all comments and replies for the configured resource and sub path |
abstract int |
deleteAllCommentsIgnoringSubPath()
Delete all comments and replies for the configured resource while ignoring the sub path. |
abstract int |
deleteComment(UserComment comment,
boolean deleteReplies)
Delete a comment |
abstract java.util.List<UserComment> |
getComments()
Get a list of user comments for the configured resource |
static UserCommentsManager |
getInstance(OLATResourceable ores,
java.lang.String subpath)
Factory method to create a comment manager for the given OLATResourceable. |
void |
init(OLATResourceable ores,
java.lang.String subpath)
Helper method to set the olat resource for this manager |
abstract UserComment |
reloadComment(UserComment comment)
Reload the given user comment with the most recent version from the database |
abstract UserComment |
replyTo(UserComment originalComment,
Identity creator,
java.lang.String replyCommentText)
Reply to an existing comment |
abstract UserComment |
updateComment(UserComment comment,
java.lang.String newCommentText)
Update a comment. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserCommentsManager()
| Method Detail |
|---|
public static final UserCommentsManager getInstance(OLATResourceable ores,
java.lang.String subpath)
ores - The olat resourceable that provides a typename and a type idsubpath - an optional string that defines any subpath. Use this when
your ores is not specific enough
public void init(OLATResourceable ores,
java.lang.String subpath)
ores - subpath - public abstract java.lang.Long countComments()
public abstract java.util.List<UserComment> getComments()
public abstract UserComment createComment(Identity creator,
java.lang.String commentText)
creator - The author of the commentcomment - The commentText
public abstract UserComment reloadComment(UserComment comment)
public abstract UserComment replyTo(UserComment originalComment,
Identity creator,
java.lang.String replyCommentText)
originalComment - The comment to which the user repliedcreator - The author of the replyreplyCommentText - The reply text
public abstract UserComment updateComment(UserComment comment,
java.lang.String newCommentText)
comment - The comment which should be updatednewCommentText - The updated comment text
public abstract int deleteComment(UserComment comment,
boolean deleteReplies)
comment - deleteReplies - true: cascade delete comment, also any existing replies;
false: don't delete replies, unlink them so they appear as new
commentsint - number of deleted comments (including replies)public abstract int deleteAllComments()
public abstract int deleteAllCommentsIgnoringSubPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||