com.funambol.mail
Class AccountFolder

java.lang.Object
  extended by com.funambol.mail.Folder
      extended by com.funambol.mail.AccountFolder

public class AccountFolder
extends Folder

AccountFolder represents a particular Folder with additional attributes: displayName and emailAddress. It has the role attribute fixed to "account".


Field Summary
static char ACCOUNT_ITEM_PREFIX
           
static java.lang.String ACCOUNT_ROLE
           
static java.lang.String EMAIL_ADDRESS
           
static java.lang.String VISIBLE_NAME
           
 
Fields inherited from class com.funambol.mail.Folder
created, FOLDER_ITEM_PREFIX, FOLDER_SEPARATOR, fullname, recordId, role, ROOT_FOLDER_PATH, store
 
Constructor Summary
AccountFolder(Store store)
          Constructs a new AccountFolder providing a reference to the Store in which it has to be created.
AccountFolder(java.lang.String fullname, java.util.Date created, Store store, java.lang.String visibleName, java.lang.String emailAddress)
          Constructs a new AccountFolder providing a name for it, the creation date and a reference to the Store in which it has to be created.
 
Method Summary
 void deserialize(java.io.DataInputStream din)
           
 boolean equals(AccountFolder account)
           
 java.lang.String getEmailAddress()
          Return the EmailAddress attribute
 java.lang.String getRole()
          The the Account role
 java.lang.String getVisibleName()
          Return the VisibleName attribute
static boolean isSupportedStream(char prefix)
          Check whether the provided prefix char represents a AccountFolder DataInputStream
 void serialize(java.io.DataOutputStream dout)
           
 void setEmailAddress(java.lang.String address)
          Set the EmailAddress attribute
 void setVisibleName(java.lang.String name)
          Set the VisibleName attribute
protected  void writeRecordPrefix(java.io.DataOutputStream dout)
           
 
Methods inherited from class com.funambol.mail.Folder
appendMessage, deleteMessage, deleteMessage, getChildren, getCreated, getFullName, getMessage, getMessageCount, getName, getParent, getRecordId, getSeparator, list, setRecordId, setRole, setStore, updateMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCOUNT_ITEM_PREFIX

public static final char ACCOUNT_ITEM_PREFIX
See Also:
Constant Field Values

ACCOUNT_ROLE

public static final java.lang.String ACCOUNT_ROLE
See Also:
Constant Field Values

VISIBLE_NAME

public static final java.lang.String VISIBLE_NAME
See Also:
Constant Field Values

EMAIL_ADDRESS

public static final java.lang.String EMAIL_ADDRESS
See Also:
Constant Field Values
Constructor Detail

AccountFolder

public AccountFolder(Store store)
Constructs a new AccountFolder providing a reference to the Store in which it has to be created. It is used when creating a AccountFolder from a DataInputStream.

Parameters:
store - The Store in which the folder has to be created

AccountFolder

public AccountFolder(java.lang.String fullname,
                     java.util.Date created,
                     Store store,
                     java.lang.String visibleName,
                     java.lang.String emailAddress)
Constructs a new AccountFolder providing a name for it, the creation date and a reference to the Store in which it has to be created.

Parameters:
fullname - The fullname for this AccountFolder
created - The creation date for this AccountFolder
store - The Store in which the folder has to be created
visibleName - The VisibleName of the AccountFolder
emailAddress - The EmailAddress of the AccountFolder
Method Detail

getVisibleName

public java.lang.String getVisibleName()
Return the VisibleName attribute

Returns:
The VisibleName

getEmailAddress

public java.lang.String getEmailAddress()
Return the EmailAddress attribute

Returns:
The EmailAddress

setVisibleName

public void setVisibleName(java.lang.String name)
Set the VisibleName attribute

Parameters:
name - The new visible name

setEmailAddress

public void setEmailAddress(java.lang.String address)
Set the EmailAddress attribute

Parameters:
address - The new email address

getRole

public java.lang.String getRole()
The the Account role

Overrides:
getRole in class Folder
Returns:
ACCOUNT_ROLE

isSupportedStream

public static boolean isSupportedStream(char prefix)
Check whether the provided prefix char represents a AccountFolder DataInputStream

Parameters:
prefix - The item prefix.
Returns:
true If supported.

writeRecordPrefix

protected void writeRecordPrefix(java.io.DataOutputStream dout)
                          throws java.io.IOException
Overrides:
writeRecordPrefix in class Folder
Throws:
java.io.IOException

serialize

public void serialize(java.io.DataOutputStream dout)
               throws java.io.IOException
Overrides:
serialize in class Folder
Throws:
java.io.IOException
See Also:
com.funambol.storage.Serializable#serialize(java.io.DataOutputStream)

deserialize

public void deserialize(java.io.DataInputStream din)
                 throws java.io.IOException
Overrides:
deserialize in class Folder
Throws:
java.io.IOException
See Also:
com.funambol.storage.Serializable#deserialize(java.io.DataInputStream)

equals

public boolean equals(AccountFolder account)


Copyright © 2001-2009 Funambol.