Jwma

dtw.webmail.model
Interface JwmaFolder

All Known Implementing Classes:
JwmaFolderImpl

public interface JwmaFolder

An interface defining the contract for interaction with the JwmaFolder model.

The JwmaFolder allows a view programmer to obtain information about a folder.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger

Field Summary
static int TYPE_ALL
          Defines a virtual type that represents all of the above.
static int TYPE_FOLDER
          Defines folder type that can only hold folders.
static int TYPE_FOLDER_CONTAINER
          Defines a virtual type that represents all folders that can hold folders.
static int TYPE_MAILBOX
          Defines folder type that can only hold messages.
static int TYPE_MESSAGE_CONTAINER
          Defines a virtual type that represents all folders that can hold messages.
static int TYPE_MIXED
          Defines folder type that can hold messages and folders.
 
Method Summary
 java.lang.String getName()
          Returns a String representing the name of this folder.
 java.lang.String getPath()
          Returns a String representing the path of this folder object.
 int getType()
          Returns an int representing the type of this folder.
 boolean hasMessages()
          Tests if this folder object contains messages.
 boolean hasSubfolders()
          Tests if this folder contains subfolders.
 boolean isSubscribed()
          Tests if this folder is subscribed.
 boolean isType(int type)
          Tests if this folder is of a given type.
 JwmaMessageInfo[] listMessageInfos()
          Returns a JwmaMessageInfo[].
 JwmaFolder[] listSubfolders()
          Convenience method that returns aJwmaFolder[] containing all subfolders within this folder.
 JwmaFolder[] listSubfolders(int type)
          Returns aJwmaFolder[] containing all subfolders of the given type within this folder.
 JwmaFolder[] listSubfolders(int type, boolean subscribed)
          Returns aJwmaFolder[] containing all subfolders of the given type within this folder, observing subscription.
 

Field Detail

TYPE_MAILBOX

public static final int TYPE_MAILBOX
Defines folder type that can only hold messages.

See Also:
Constant Field Values

TYPE_FOLDER

public static final int TYPE_FOLDER
Defines folder type that can only hold folders.

See Also:
Constant Field Values

TYPE_MIXED

public static final int TYPE_MIXED
Defines folder type that can hold messages and folders.

See Also:
Constant Field Values

TYPE_MESSAGE_CONTAINER

public static final int TYPE_MESSAGE_CONTAINER
Defines a virtual type that represents all folders that can hold messages.

See Also:
Constant Field Values

TYPE_FOLDER_CONTAINER

public static final int TYPE_FOLDER_CONTAINER
Defines a virtual type that represents all folders that can hold folders.

See Also:
Constant Field Values

TYPE_ALL

public static final int TYPE_ALL
Defines a virtual type that represents all of the above.

See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Returns a String representing the name of this folder.

Returns:
the name of this folder as String.

getPath

public java.lang.String getPath()
Returns a String representing the path of this folder object.

Returns:
the path of this folder as String.

getType

public int getType()
Returns an int representing the type of this folder.

Returns:
the type of this folder object as int.

isType

public boolean isType(int type)
Tests if this folder is of a given type.

Returns:
true if this folder is of the given type, false otherwise.

hasSubfolders

public boolean hasSubfolders()
Tests if this folder contains subfolders.

Returns:
true if this folder contains subfolders, false otherwise.

hasMessages

public boolean hasMessages()
Tests if this folder object contains messages.

Returns:
true if this folder contains messages, false otherwise.

isSubscribed

public boolean isSubscribed()
Tests if this folder is subscribed.

Returns:
true if subscribed, false otherwise.

listSubfolders

public JwmaFolder[] listSubfolders(int type,
                                   boolean subscribed)
Returns aJwmaFolder[] containing all subfolders of the given type within this folder, observing subscription.

If the store does not contain any matching folder, then this method returns an empty array. Otherwise it contains one JwmaFolder for each subfolder of the given type.

Returns:
a JwmaFolder[] containing all subfolders of the given type within this folder. The array will be empty if there are none.

listSubfolders

public JwmaFolder[] listSubfolders(int type)
Returns aJwmaFolder[] containing all subfolders of the given type within this folder.

If the store does not contain any matching folder, then this method returns an empty array. Otherwise it contains one JwmaFolder for each subfolder of the given type.

Returns:
a JwmaFolder[] containing all subfolders of the given type within this folder. The array will be empty if there are none.

listSubfolders

public JwmaFolder[] listSubfolders()
Convenience method that returns aJwmaFolder[] containing all subfolders within this folder.

If this folder does not contain any subfolder, then this method returns an empty array. Otherwise it contains one JwmaFolder for each subfolder.

Returns:
a JwmaFolder[] containing all subfolders of this folder. The array will be empty if there are none.

listMessageInfos

public JwmaMessageInfo[] listMessageInfos()
Returns a JwmaMessageInfo[].

If this folder does not contain any messages, then this method returns an empty array. Otherwise it contains one JwmaMessageInfo instance for each message in this folder, encapsulating all necessary information for list displaying of the message.

Returns:
a JwmaMessageInfo[] containing a info instance for each message in this folder. The array will be empty if there are no messages in this folder.
See Also:
JwmaMessageInfo

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)