com.stratelia.silverpeas.notificationserver.channel.silvermail
Class SILVERMAILPersistence

java.lang.Object
  extended by com.stratelia.silverpeas.notificationserver.channel.silvermail.SILVERMAILPersistence

public class SILVERMAILPersistence
extends Object

Class declaration

Version:
%I%, %G%
Author:

Constructor Summary
SILVERMAILPersistence()
           
 
Method Summary
static void addMessage(SILVERMAILMessage silverMsg)
           
protected static long convertFolderNameToId(String folderName)
           
static void deleteAllMessages(String currentUserId, String folderName)
           
static void deleteMessage(long msgId, String userId)
           
static SILVERMAILMessage getMessage(long msgId)
           
static Collection<SILVERMAILMessage> getMessageOfFolder(int userId, String folderName)
           
static Collection<SILVERMAILMessage> getMessageOfFolder(int userId, String folderName, int readState)
           
static Collection<SILVERMAILMessage> getNotReadMessagesOfFolder(int userId, String folderName)
           
static Collection<SILVERMAILMessage> getReadMessagesOfFolder(int userId, String folderName)
           
protected static String getUserLogin(long userId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SILVERMAILPersistence

public SILVERMAILPersistence()
Method Detail

addMessage

public static void addMessage(SILVERMAILMessage silverMsg)
                       throws SILVERMAILException
Throws:
SILVERMAILException

getNotReadMessagesOfFolder

public static Collection<SILVERMAILMessage> getNotReadMessagesOfFolder(int userId,
                                                                       String folderName)
                                                                throws SILVERMAILException
Throws:
SILVERMAILException

getReadMessagesOfFolder

public static Collection<SILVERMAILMessage> getReadMessagesOfFolder(int userId,
                                                                    String folderName)
                                                             throws SILVERMAILException
Throws:
SILVERMAILException

getMessageOfFolder

public static Collection<SILVERMAILMessage> getMessageOfFolder(int userId,
                                                               String folderName)
                                                        throws SILVERMAILException
Throws:
SILVERMAILException

getMessageOfFolder

public static Collection<SILVERMAILMessage> getMessageOfFolder(int userId,
                                                               String folderName,
                                                               int readState)
                                                        throws SILVERMAILException
Parameters:
userId -
folderName -
readState - not read only (0) , read only (1), all messages (-1)
Returns:
Throws:
SILVERMAILException

getMessage

public static SILVERMAILMessage getMessage(long msgId)
                                    throws SILVERMAILException
Throws:
SILVERMAILException

deleteMessage

public static void deleteMessage(long msgId,
                                 String userId)
                          throws SILVERMAILException
Throws:
SILVERMAILException

deleteAllMessages

public static void deleteAllMessages(String currentUserId,
                                     String folderName)
                              throws SILVERMAILException
Throws:
SILVERMAILException

convertFolderNameToId

protected static long convertFolderNameToId(String folderName)
Parameters:
folderName -
Returns:
Throws:
SILVERMAILException

getUserLogin

protected static String getUserLogin(long userId)
                              throws SILVERMAILException
Parameters:
userId -
Returns:
Throws:
SILVERMAILException


Copyright © 2016 Silverpeas. All Rights Reserved.