Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Interface PrivateMessageFolder

All Superinterfaces:
JiveObject

public interface PrivateMessageFolder
extends JiveObject

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

See Also:
PrivateMessageManager, PrivateMessage

Field Summary
static long FOLDER_DRAFTS
           
static long FOLDER_INBOX
           
static long FOLDER_SENT
           
static long 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.
 long getID()
          Returns the ID of the folder.
 int getMessageCount()
          Returns the number of messages in the folder.
 JiveIterator<PrivateMessage> getMessages()
          Returns all the messages in the folder sorted by date descending.
 JiveIterator<PrivateMessage> 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.
 
Methods inherited from interface com.jivesoftware.community.JiveObject
getObjectType
 

Field Detail

FOLDER_INBOX

static final long FOLDER_INBOX
See Also:
Constant Field Values

FOLDER_SENT

static final long FOLDER_SENT
See Also:
Constant Field Values

FOLDER_DRAFTS

static final long FOLDER_DRAFTS
See Also:
Constant Field Values

FOLDER_TRASH

static final long 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

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

Specified by:
getID in interface JiveObject
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

JiveIterator<PrivateMessage> getMessages()
Returns all the messages in the folder sorted by date descending.

Returns:
all messages in the folder.

getMessages

JiveIterator<PrivateMessage> 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.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.