| 
 | ePOST API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.email.Folder
public class Folder
Represents a notion of a folder in the email service.
| Field Summary | |
|---|---|
| static int | COMPRESS_LIMIT | 
| static int | MAX_SNAPSHOT_ENTRIES | 
| static java.lang.String | ROOT_FOLDER_NAME | 
| Constructor Summary | |
|---|---|
| Folder(EmailLog log,
       Post post,
       java.security.KeyPair pair)Constructs a Folder from a log and a storage service. | |
| Method Summary | |
|---|---|
|  void | addChildFolder(Folder folder,
               Continuation command)Adds an existing folder as a child folder of this folder | 
|  void | addMessage(Email email,
           Continuation command)Appends an email to this Folder, with default (no) flags set. | 
|  void | addMessage(Email email,
           Flags flags,
           long internaldate,
           Continuation command)Appends an email to this Folder with the specified flags set. | 
|  void | addMessages(Email[] emails,
            Flags[] flags,
            long[] internaldates,
            Continuation command)Appends an email to this Folder with the specified flags set. | 
|  void | addSubscription(java.lang.String sub,
                Continuation command)Adds a subscriptions to the log | 
|  void | createChildFolder(java.lang.String name,
                  Continuation command)Creates a new child of the given name. | 
|  void | createSnapShot(Continuation command)Creates and inserts a snapshot for the current folder | 
|  void | dump() | 
|  void | getChildFolder(java.lang.String name,
               Continuation command)Returns the selected Folder. | 
| protected  void | getChildReferences(java.util.Set set,
                   Continuation command) | 
|  java.lang.String[] | getChildren()Returns the names of the child Folders of the current Folder. | 
|  void | getContentHashReferences(java.util.Set set,
                         Continuation command)This method returns a list of all the handles stored in the folder or any subfolders. | 
|  long | getCreationTime()Returns the time (in milliseconds) that this email log was created. | 
|  int | getExists()Returns the number of messages which exist in this folder | 
| protected  void | getLogReferences(java.util.Set set,
                 Continuation command) | 
| protected  void | getLogReferences(java.util.Set set,
                 SnapShot[] snapshot,
                 Continuation command) | 
|  void | getLogs(java.util.Set set,
        Continuation command)This method is periodically invoked by Post in order to get a list of all mutable data which the application is interested in. | 
| protected  void | getMessageReferences(java.util.Set set,
                     Continuation command) | 
|  void | getMessages(Continuation command)Returns the Emails contained in this Folder. | 
|  void | getMessages(SnapShot[] snapshots,
            Continuation command)Returns the Emails contained in this Folder. | 
|  java.lang.String | getName()Returns the name of this folder | 
|  int | getNextUID()Returns the next UID that will be assigned to an incoming message. | 
|  Post | getPost() | 
|  int | getRecent()Returns the number of messages which are recent in this folder | 
|  void | getSubscriptions(Continuation command)Returns the list of subscriptions in the log | 
|  boolean | isRoot()Returns whether or not this folder is the root of the email hierarchy | 
|  void | moveMessage(StoredEmail email,
            Folder folder,
            Continuation command)Moves a message from this folder into a another, given folder. | 
|  void | removeFolder(java.lang.String name,
             Continuation command)Deletes a folder from the user's mailbox. | 
|  void | removeMessage(StoredEmail email,
              Continuation command)Deletes a message from this Folder. | 
|  void | removeMessages(StoredEmail[] email,
               Continuation command)Deletes a list of messages from this Folder. | 
|  void | removeSubscription(java.lang.String sub,
                   Continuation command)Adds a subscriptions to the log | 
|  void | setName(java.lang.String name,
        Continuation command)Changes the name of this folder. | 
|  void | setPost(Post post)Sets the post service of this Folder. | 
| protected  SnapShot[] | splitEmails(StoredEmail[] emails,
            LogEntry entry)Splits the emails into a bunch of snapshots, for a memory cap | 
|  java.lang.String | toString() | 
|  void | updateMessage(StoredEmail email,
              Continuation command)Updates an Email (flags) | 
|  void | updateMessages(StoredEmail[] emails,
               Continuation command)Updates a list of Emails (flags) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final int COMPRESS_LIMIT
public static final int MAX_SNAPSHOT_ENTRIES
public static java.lang.String ROOT_FOLDER_NAME
| Constructor Detail | 
|---|
public Folder(EmailLog log,
              Post post,
              java.security.KeyPair pair)
log - the Log which contains the data for the Folder.storage - the storage service used to get log data from PAST.| Method Detail | 
|---|
public boolean isRoot()
public void setPost(Post post)
post - the new post service for this Folderpublic Post getPost()
public java.lang.String getName()
public void setName(java.lang.String name,
                    Continuation command)
name - The new name to usecommand - the work to perform after this call.public void getSubscriptions(Continuation command)
command - the work to perform after this call.
public void addSubscription(java.lang.String sub,
                            Continuation command)
command - the work to perform after this call.sub - The subscription to add
public void removeSubscription(java.lang.String sub,
                               Continuation command)
command - the work to perform after this call.sub - The subscription to addpublic int getNextUID()
public int getExists()
public int getRecent()
public long getCreationTime()
public void getContentHashReferences(java.util.Set set,
                                     Continuation command)
protected void getMessageReferences(java.util.Set set,
                                    Continuation command)
protected void getLogReferences(java.util.Set set,
                                Continuation command)
protected void getLogReferences(java.util.Set set,
                                SnapShot[] snapshot,
                                Continuation command)
protected void getChildReferences(java.util.Set set,
                                  Continuation command)
public void getLogs(java.util.Set set,
                    Continuation command)
public void updateMessage(StoredEmail email,
                          Continuation command)
email - The email to update.command - the work to perform after this call.
public void updateMessages(StoredEmail[] emails,
                           Continuation command)
email - The emails to update.command - the work to perform after this call.
public void addMessage(Email email,
                       Continuation command)
email - The email to insert.command - the work to perform after this call
public void addMessage(Email email,
                       Flags flags,
                       long internaldate,
                       Continuation command)
email - The email to insert.flags - The flags to insert the email withinternaldate - The date to insert the email withcommand - the work to perform after this call
public void addMessages(Email[] emails,
                        Flags[] flags,
                        long[] internaldates,
                        Continuation command)
email - The email to insert.command - the work to perform after this call
public void moveMessage(StoredEmail email,
                        Folder folder,
                        Continuation command)
email - The email to move.folder - The destination folder for the message.command - the remaining work to carry out
public void removeMessage(StoredEmail email,
                          Continuation command)
email - The email to delete.command - the remaining work to carry out
public void removeMessages(StoredEmail[] email,
                           Continuation command)
emails - The emails to delete.command - the remaining work to carry out
public void createChildFolder(java.lang.String name,
                              Continuation command)
name - the name of the new child Foldercommand - the work to perform after this call
public void addChildFolder(Folder folder,
                           Continuation command)
folder - The folder to addcommand - The command to call once the add is done
public void removeFolder(java.lang.String name,
                         Continuation command)
name - The name of the folder to delete.command - the work to perform after this call
public void getChildFolder(java.lang.String name,
                           Continuation command)
name - the name of the Folder to returncommand - the work to perform after this call
protected SnapShot[] splitEmails(StoredEmail[] emails,
                                 LogEntry entry)
emails - The emails
public void createSnapShot(Continuation command)
command - The command to run once the result is receivedpublic java.lang.String[] getChildren()
public void getMessages(Continuation command)
command - the work to perform after this call
public void getMessages(SnapShot[] snapshots,
                        Continuation command)
command - the work to perform after this callpublic void dump()
public java.lang.String toString()
toString in class java.lang.Object
| 
 | ePOST API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||