com.jalios.jcmsplugin.comment
Class CommentUtil

java.lang.Object
  extended by com.jalios.jcmsplugin.comment.CommentUtil

public class CommentUtil
extends Object

This class is a set of Static utility methods to manipulate Comment

Since:
jcms-5.7.0
Version:
$Revision: 18595 $
Author:
Jean-Philippe Encausse

Field Summary
static Class COMMENT_CLASS
           
static String REVISION
           
 
Constructor Summary
CommentUtil()
           
 
Method Summary
static boolean allowAnonymousComment()
          Returns true if Comments can be published anonymously
static boolean canComment(Member mbr, Publication pub)
          Returns true if the member can comment on the given publication
static Collection getComments(Publication content, Member loggedMember)
          Returns all comments bind to the given content
static Plugin getPlugin()
          Returns the CommentPlugin
static boolean isCommentable(Publication pub)
          Returns true if the publication is commentable
static boolean isCompatibleType(Class clazz)
          Returns true if the given class is commentable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

COMMENT_CLASS

public static Class COMMENT_CLASS
Constructor Detail

CommentUtil

public CommentUtil()
Method Detail

isCommentable

public static boolean isCommentable(Publication pub)
Returns true if the publication is commentable

Parameters:
pub - the workin publicaiton
Returns:
boolean true id it is commentable

canComment

public static boolean canComment(Member mbr,
                                 Publication pub)
Returns true if the member can comment on the given publication

Parameters:
mbr - the member who comment
pub - the working publication
Returns:
boolean true if the member can comment the publication

allowAnonymousComment

public static boolean allowAnonymousComment()
Returns true if Comments can be published anonymously

Returns:
boolean

isCompatibleType

public static boolean isCompatibleType(Class clazz)
Returns true if the given class is commentable

Parameters:
clazz - the class to check
Returns:
boolean true if the given class is compatible

getComments

public static Collection getComments(Publication content,
                                     Member loggedMember)
Returns all comments bind to the given content

Parameters:
content - the working content
Returns:
Collection a Collection of Comment

getPlugin

public static Plugin getPlugin()
Returns the CommentPlugin

Returns:
Plugin the CommentPlugin


Copyright © 2001-2007 Jalios SA. All Rights Reserved.