Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum
Interface PrivateMessageFolder

All Known Implementing Classes:
DbPrivateMessageFolder, PrivateMessageFolderProxy

public interface PrivateMessageFolder

Holds private messages. Every user has four built-in folders and a number of custom folders. The built-in folders are:

Since:
4.0
See Also:
PrivateMessageManager, PrivateMessage

Field Summary
static int FOLDER_DRAFTS
           
static int FOLDER_INBOX
           
static int FOLDER_SENT
           
static int FOLDER_TRASH
           
static int SORT_DATE
           
static int SORT_SENDER
           
static int SORT_SUBJECT
           
 
Method Summary
 void deleteMessage(PrivateMessage privateMessage)
          Deletes a private message from the folder by moving it to the trash folder.
 int getID()
          Returns the ID of the folder.
 int getMessageCount()
          Returns the number of messages in the folder.
 java.util.Iterator getMessages()
          Returns all the messages in the folder sorted by date descending.
 java.util.Iterator getMessages(int startIndex, int count, int sortField, boolean sortDescending)
          Returns messages in the folder based on the params.
 java.lang.String getName()
          Returns the name of the folder.
 User getOwner()
          Returns the owner of the private message folder.
 int getUnreadMessageCount()
          Returns the number of unread messages in the folder.
 void moveMessage(PrivateMessage privateMessage, PrivateMessageFolder destinationFolder)
          Moves a private message to another folder.
 void setName(java.lang.String name)
          Sets the name of the folder.
 

Field Detail

FOLDER_INBOX

static final int FOLDER_INBOX
See Also:
Constant Field Values

FOLDER_SENT

static final int FOLDER_SENT
See Also:
Constant Field Values

FOLDER_DRAFTS

static final int FOLDER_DRAFTS
See Also:
Constant Field Values

FOLDER_TRASH

static final int FOLDER_TRASH
See Also:
Constant Field Values

SORT_DATE

static final int SORT_DATE
See Also:
Constant Field Values

SORT_SUBJECT

static final int SORT_SUBJECT
See Also:
Constant Field Values

SORT_SENDER

static final int SORT_SENDER
See Also:
Constant Field Values
Method Detail

getID

int getID()
Returns the ID of the folder. The folder ID may be one of the standard folders or a custom folder.

Returns:
the ID of the folder.

getOwner

User getOwner()
Returns the owner of the private message folder.

Returns:
the owner of the private message folder.

getName

java.lang.String getName()
Returns the name of the folder.

Returns:
the name of the folder.

setName

void setName(java.lang.String name)
Sets the name of the folder. This method does nothing if the folder is one of the standard folders.

Parameters:
name - the new name for the folder.

getMessages

java.util.Iterator getMessages()
Returns all the messages in the folder sorted by date descending.

Returns:
all messages in the folder.

getMessages

java.util.Iterator getMessages(int startIndex,
                               int count,
                               int sortField,
                               boolean sortDescending)
Returns messages in the folder based on the params. Valid fields to sort on are:

getMessageCount

int getMessageCount()
Returns the number of messages in the folder.

Returns:
the total number of messages.

getUnreadMessageCount

int getUnreadMessageCount()
Returns the number of unread messages in the folder.

Returns:
the number of unread messages.

deleteMessage

void deleteMessage(PrivateMessage privateMessage)
Deletes a private message from the folder by moving it to the trash folder. Messages in the Trash folder will be routinely automatically deleted. If this is the Trash folder, this method will do nothing.

Parameters:
privateMessage - the private message to delete.

moveMessage

void moveMessage(PrivateMessage privateMessage,
                 PrivateMessageFolder destinationFolder)
Moves a private message to another folder.

Parameters:
privateMessage - the message to move.
destinationFolder - the folder to move the message to.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.