Folders can contain Message objects, other Folder objects or
both. This nesting capability enables a folder hierarchy for stored
messages. The different levels of hierarchy in a folder's full name are
separated by the hierarchy separator character, which you can retrieve using
getSeparator().
You can retrieve a contained folder by name using
getFolder, or a list of contained folders by
using list(). Both these methods return folders not cached by the
Store owning this folder, so invoking either method multiple times
on the folder returns distinct Folder objects.
Note: Multiple Folder objects can refer to the same physical
folder on device. As a result, you should invoke
addFolderListener to register a
FolderListener to listen for any FolderEvent affecting a
folder. When finished, you can remove the listener with
removeFolderListener.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
A Folder containing deleted messages.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
DRAFT
public static final int DRAFT
A Folder containing draft messages.
This Folder type may be used in getType() and list(int).
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
FILED
public static final int FILED
Contains items that are filed in a Folder.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
INBOX
public static final int INBOX
A Folder containing received messages.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
INVALID
public static final int INVALID
A Folder containing items marked as invalid.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
INVALID_FOLDER_ID
public static final int INVALID_FOLDER_ID
Indicates an invalid folder ID.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
ORPHAN
public static final int ORPHAN
A Folder containing items who's 'parent' has been deleted.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
OTHER
public static final int OTHER
A Folder that the user created - a personal folder.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
OUTBOX
public static final int OUTBOX
A Folder containing messages in the process of being sent.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
ROOT_SEPARATOR
public static final char ROOT_SEPARATOR
Character that separates the user's root folder from subfolders.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
String that separates the user's root folder from subfolders.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
SENT
public static final int SENT
A Folder containing sent messages.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
SEPARATOR_CHAR
public static final char SEPARATOR_CHAR
Character that separates folders in a hierarchy.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
SUBTREE
public static final int SUBTREE
A Folder that is contained within another Folder.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
UNFILED
public static final int UNFILED
Contains items that are not currently filed in a Folder.
This Folder type may be used in getType() and list(int).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
This method delivers an appropriate FolderEvent to any
registered FolderListener when the message arrives in this
folder.
This method reassignes the internal folder object on the message to
this folder.
Parameters:
msg - Message to save in this folder.
Returns:
True if the message was saved successfully; false if the message
append failed, for instance, if the message is already part of the list.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
This method delivers an appropriate FolderEvent to any
registered FolderListener when the messages arrive in this
folder.
Implementations of this class must not abort this operation if a
message in the provided list turns out to be an expunged message.
Parameters:
msgs - Messages to append to this folder.
Returns:
True if the messages are saved successfully; otherwise, false.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Deletes a message from this folder. If the message is marked as SAVED, then the message is deleted from this folder but is not deleted from the device.
This method delivers an appropriate FolderEvent to any
registered FolderListener when the message is removed from this
folder.
Parameters:
msg - Message to delete from this folder.
Returns:
True if the message is successfully deleted; otherwise, false
(for example, if the message does not exist in this folder).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
deleteMessage
public boolean deleteMessage(Message msg,
boolean forceDeleteSaved)
Deletes a message from this folder.
This method delivers an appropriate FolderEvent to any
registered FolderListener when the message is removed from this
folder.
Parameters:
msg - Message to delete from this folder.
forceDeleteSaved - If the message is saved, force it's deletion.
Returns:
True if the message is successfully deleted; otherwise, false
(for example, if the message does not exist in this folder).
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
True if the object is equal to this folder; otherwise, false.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
This method retrieves only the draft messages contained in the
message array.
Parameters:
array - A list of messages.
Returns:
Array of draft messages contained in the message list, or an empty array if
the message list does not contain any draft messages.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
The returned name is an absolute name, which starts with the
hierarchy delimiter.
Returns:
Full name for this folder.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
This method retrieves only the messages contained directly in this
folder, not from any sub-folders.
Returns:
Array of messages contained in this folder, or an empty array if
this folder does not directly contain any messages.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Use this method to retrieve the friendly name (base name with no
heirarchy delimiter or path).
Returns:
Friendly name for this folder.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Parent folder or null if there is no parent folder (the folder is
already at the root level).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getSeparator
public static char getSeparator()
Retrieves the delimiter character that separates sub-folders.
Returns:
Delimiter character that separates folders in a path name.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getType
public int getType()
Retrieves this folder's type.
Returns:
Type of this folder.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
List of folders that this folder contains, or an empty array if
no sub-folders present.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Retrieves this folder's sub-folders only of provided type.
Parameters:
type - Type of folder to retrieve.
Returns:
List of folders of your provided type that this folder contains,
or an empty array if no such sub-folders present.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Note: This method overrides the default toString()
functionality; instead, it retrieves the full name string from
getFullName(). If getFullName() returns null, this method falls
back on the default toString() behaviour.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.