public class CommentAndRatingDefaultSecurityCallback extends java.lang.Object implements CommentAndRatingSecurityCallback
Guests are allowed to view but not create any data.
Initial Date: 24.11.2009
| 构造器和说明 |
|---|
CommentAndRatingDefaultSecurityCallback(Identity identity,
boolean isModerator,
boolean isAnonymous)
Constructor to create a default security callback
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
canCreateComments() |
boolean |
canDeleteComment(UserComment comment) |
boolean |
canRate() |
boolean |
canReplyToComment(UserComment comment) |
boolean |
canUpdateComment(UserComment comment,
java.util.List<UserComment> allComments)
java.util.List)
|
boolean |
canViewComments() |
boolean |
canViewOtherUsersRatings() |
boolean |
canViewRatingAverage() |
public CommentAndRatingDefaultSecurityCallback(Identity identity, boolean isModerator, boolean isAnonymous)
identity - The current identityisModerator - true: this user has administrative capabilities; false: this is a normal userisAnonymous - true: user is unknown, e.g. a guest; false: user is knownpublic boolean canCreateComments()
canCreateComments 在接口中 CommentAndRatingSecurityCallbackpublic boolean canViewComments()
canViewComments 在接口中 CommentAndRatingSecurityCallbackpublic boolean canReplyToComment(UserComment comment)
canReplyToComment 在接口中 CommentAndRatingSecurityCallbackcomment - The comment to be repliedpublic boolean canDeleteComment(UserComment comment)
canDeleteComment 在接口中 CommentAndRatingSecurityCallbackcomment - The comment to deletepublic boolean canUpdateComment(UserComment comment, java.util.List<UserComment> allComments)
canUpdateComment 在接口中 CommentAndRatingSecurityCallbackcomment - The comment to editallComments - list of all comments to check if this comment has any repliespublic boolean canRate()
canRate 在接口中 CommentAndRatingSecurityCallbackpublic boolean canViewOtherUsersRatings()
canViewOtherUsersRatings 在接口中 CommentAndRatingSecurityCallbackpublic boolean canViewRatingAverage()
canViewRatingAverage 在接口中 CommentAndRatingSecurityCallback