org.bejug.javacareers.jobs.service
Interface CommentService


public interface CommentService

The comment service implementation which will be called by the view. This can be any view including RUI and/or HTML web clients.

Version:
$Revision: 1.4 $ - $Date: 2005/12/09 10:46:55 $
Author:
Peter Symoens (Last modified by $Author: shally $)

Method Summary
 void deleteComment(java.lang.Integer commentId)
          delete a comment.
 int getChildCommentCount(Comment comment)
           
 java.util.List getChildComments(Comment comment)
           
 Comment getComment(java.lang.Integer id)
          gets a comment by id.
 Comment getCommentBySubject(java.lang.Integer offerId, java.lang.String subject)
          get a comment.
 int getCommentCount(Item offer)
           
 java.util.List getComments(java.lang.Integer offerId, boolean rootOnly)
          Get all comments related to the offer.
 java.util.List getUserComments(User user)
           
 void storeComment(Comment comment)
           
 

Method Detail

storeComment

public void storeComment(Comment comment)
Parameters:
comment - The comment to store

deleteComment

public void deleteComment(java.lang.Integer commentId)
delete a comment.

Parameters:
commentId - the comment to delete

getCommentBySubject

public Comment getCommentBySubject(java.lang.Integer offerId,
                                   java.lang.String subject)
get a comment.

Parameters:
offerId - The offer the comment is linked to
subject - The subject of the comment
Returns:
a comment

getComments

public java.util.List getComments(java.lang.Integer offerId,
                                  boolean rootOnly)
Get all comments related to the offer.

Parameters:
rootOnly - if true, return only the root comment.
offerId - the id of the offer to get the comment from.
Returns:
a list of comments related to the offer.

getComment

public Comment getComment(java.lang.Integer id)
gets a comment by id.

Parameters:
id - the id of the comment
Returns:
comment Returns the wanted comment

getChildComments

public java.util.List getChildComments(Comment comment)
Parameters:
comment - Comment
Returns:
childComments Returns the childComments of this comment

getUserComments

public java.util.List getUserComments(User user)
Parameters:
user - User
Returns:
The user's comments

getChildCommentCount

public int getChildCommentCount(Comment comment)
Parameters:
comment - Comment
Returns:
childCount Return the nr of child comments from this comment

getCommentCount

public int getCommentCount(Item offer)
Parameters:
offer - Offer
Returns:
commentCount Returns the nr of comments for this Offer.


Copyright © 2005-2006 BeJUG. All Rights Reserved.