Class SILVERMAILPersistence
- java.lang.Object
-
- org.silverpeas.core.notification.user.server.channel.silvermail.SILVERMAILPersistence
-
public class SILVERMAILPersistence extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
countNotReadMessagesOfFolder(String userId, String folderName)
static void
deleteAllMessagesInFolder(String currentUserId)
static void
deleteMessage(long msgId, String userId)
static void
deleteMessages(String currentUserId, Collection<String> ids)
static SILVERMAILMessage
getMessage(long msgId)
Gets a message by its identifier.static SILVERMAILMessage
getMessageAndMarkAsRead(long msgId)
Gets a message by its identifier and mark it as read.static SilverpeasList<SILVERMAILMessage>
getMessageOfFolder(String userId, String folderName, PaginationPage pagination, SilvermailCriteria.QUERY_ORDER_BY orderBy)
static void
markAllMessagesAsRead(String currentUserId)
static void
markMessagesAsRead(String currentUserId, Collection<String> ids)
-
-
-
Method Detail
-
countNotReadMessagesOfFolder
public static long countNotReadMessagesOfFolder(String userId, String folderName)
-
getMessageOfFolder
public static SilverpeasList<SILVERMAILMessage> getMessageOfFolder(String userId, String folderName, PaginationPage pagination, SilvermailCriteria.QUERY_ORDER_BY orderBy)
-
getMessage
public static SILVERMAILMessage getMessage(long msgId)
Gets a message by its identifier.- Parameters:
msgId
- the message identifier.
-
getMessageAndMarkAsRead
public static SILVERMAILMessage getMessageAndMarkAsRead(long msgId) throws SILVERMAILException
Gets a message by its identifier and mark it as read.- Parameters:
msgId
- the message identifier.- Throws:
SILVERMAILException
-
deleteMessage
public static void deleteMessage(long msgId, String userId) throws SILVERMAILException
- Throws:
SILVERMAILException
-
deleteAllMessagesInFolder
public static void deleteAllMessagesInFolder(String currentUserId)
-
markAllMessagesAsRead
public static void markAllMessagesAsRead(String currentUserId)
-
deleteMessages
public static void deleteMessages(String currentUserId, Collection<String> ids)
-
markMessagesAsRead
public static void markMessagesAsRead(String currentUserId, Collection<String> ids)
-
-