Class CommentService
- java.lang.Object
-
- fr.paris.lutece.plugins.appointment.service.CommentService
-
public class CommentService extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<CommentDTO>buildCommentDTO(java.util.List<Comment> listComment)static CommentcreateAndNotifyMailingList(Comment comment, int idMailingList, java.util.Locale locale)Create an instance of the comment class and notify the mailing liststatic java.util.List<Comment>findListCommentsInclusive(java.sql.Date startingDate, java.sql.Date endingDate, int nIdForm)fin List Comments between two datesstatic java.util.List<Comment>finListComments(java.sql.Date startingDate, java.sql.Date endingDate, int nIdForm)fin List Comments between two datesstatic voidremoveAndNotifyMailingList(int nKey, int idMailingList, java.util.Locale locale)Remove the comment whose identifier is specified in parameter and notify the mailing liststatic voidsendNotification(Comment comment, int idMailingList, CommentNotificationConfig.NotificationType type, java.util.Locale locale)static CommentupdateAndNotifyMailingList(Comment comment, int idMailingList, java.util.Locale locale)Update of the comment which is specified in parameter and notify the mailing list
-
-
-
Method Detail
-
finListComments
public static java.util.List<Comment> finListComments(java.sql.Date startingDate, java.sql.Date endingDate, int nIdForm)
fin List Comments between two dates- Parameters:
startingDate- the date startendingDate- the date end
-
findListCommentsInclusive
public static java.util.List<Comment> findListCommentsInclusive(java.sql.Date startingDate, java.sql.Date endingDate, int nIdForm)
fin List Comments between two dates- Parameters:
startingDate- the date startendingDate- the date end
-
createAndNotifyMailingList
public static Comment createAndNotifyMailingList(Comment comment, int idMailingList, java.util.Locale locale)
Create an instance of the comment class and notify the mailing list- Parameters:
comment- The instance of the Comment which contains the informations to storeidMailingList- the mailing list id to notify- Returns:
- The instance of comment which has been created with its primary key.
-
updateAndNotifyMailingList
public static Comment updateAndNotifyMailingList(Comment comment, int idMailingList, java.util.Locale locale)
Update of the comment which is specified in parameter and notify the mailing list- Parameters:
comment- The instance of the Comment which contains the data to storeidMailingList- the mailing list id to notify- Returns:
- The instance of the comment which has been updated
-
removeAndNotifyMailingList
public static void removeAndNotifyMailingList(int nKey, int idMailingList, java.util.Locale locale)Remove the comment whose identifier is specified in parameter and notify the mailing list- Parameters:
nKey- The comment IdidMailingList- the mailing list id to notify
-
sendNotification
public static void sendNotification(Comment comment, int idMailingList, CommentNotificationConfig.NotificationType type, java.util.Locale locale)
- Parameters:
comment-idMailingList- the mailing list id to notifylocale-
-
buildCommentDTO
public static java.util.List<CommentDTO> buildCommentDTO(java.util.List<Comment> listComment)
-
-