org.opencrx.application.imap
Class IMAPFolderImpl

java.lang.Object
  extended by javax.mail.Folder
      extended by org.opencrx.application.imap.IMAPFolderImpl
All Implemented Interfaces:
UIDFolder

public class IMAPFolderImpl
extends Folder
implements UIDFolder


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.mail.UIDFolder
UIDFolder.FetchProfileItem
 
Field Summary
protected  File folderDir
           
protected  String folderId
           
static String MAILDIR_PROPERTY_NAME
           
static int META_INF_CREATED_AT
           
static int META_INF_LAST_SYNCHRONIZED_AT
           
static int META_INF_NEXT_UID
           
protected static String METAINF_FILE_NAME
           
protected  String name
           
protected  javax.jdo.PersistenceManagerFactory pmf
           
protected static long SYNCHRONIZE_REFRESH_RATE
           
protected  String username
           
 
Fields inherited from class javax.mail.Folder
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store
 
Fields inherited from interface javax.mail.UIDFolder
LASTUID
 
Constructor Summary
IMAPFolderImpl(String name, String folderId, String username, javax.jdo.PersistenceManagerFactory pmf)
           
 
Method Summary
 void appendMessages(Message[] newMessages)
           
 void close(boolean arg0)
           
 boolean create(int arg0)
           
 boolean delete(boolean arg0)
           
 boolean exists()
           
 Message[] expunge()
           
protected  ActivityQueryHelper getActivitiesHelper()
           
 Folder getFolder(String arg0)
           
 String getFullName()
           
static File getMailDir(String username)
           
 Message getMessage(int messageNumber)
           
 Message getMessageByUID(long uid)
           
 int getMessageCount()
           
 Message[] getMessagesByUID(long[] uids)
           
 Message[] getMessagesByUID(long start, long end)
           
 String getName()
           
 Folder getParent()
           
 Flags getPermanentFlags()
           
 char getSeparator()
           
 int getType()
           
 long getUID(Message message)
           
 long getUIDValidity()
           
 boolean hasNewMessages()
           
 boolean isOpen()
           
 Folder[] list(String arg0)
           
 Object[] loadMetaInf()
           
 void open(int arg0)
           
 boolean renameTo(Folder arg0)
           
 Message[] search(SearchTerm searchTerm)
           
 void storeMetaInf(Object[] metainf)
           
 
Methods inherited from class javax.mail.Folder
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, copyMessages, fetch, finalize, getDeletedMessageCount, getMessages, getMessages, getMessages, getMode, getNewMessageCount, getStore, getUnreadMessageCount, getURLName, isSubscribed, list, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, setFlags, setFlags, setFlags, setSubscribed, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

METAINF_FILE_NAME

protected static final String METAINF_FILE_NAME
See Also:
Constant Field Values

SYNCHRONIZE_REFRESH_RATE

protected static final long SYNCHRONIZE_REFRESH_RATE
See Also:
Constant Field Values

MAILDIR_PROPERTY_NAME

public static final String MAILDIR_PROPERTY_NAME
See Also:
Constant Field Values

META_INF_CREATED_AT

public static final int META_INF_CREATED_AT
See Also:
Constant Field Values

META_INF_LAST_SYNCHRONIZED_AT

public static final int META_INF_LAST_SYNCHRONIZED_AT
See Also:
Constant Field Values

META_INF_NEXT_UID

public static final int META_INF_NEXT_UID
See Also:
Constant Field Values

name

protected final String name

folderDir

protected File folderDir

username

protected final String username

folderId

protected final String folderId

pmf

protected final javax.jdo.PersistenceManagerFactory pmf
Constructor Detail

IMAPFolderImpl

public IMAPFolderImpl(String name,
                      String folderId,
                      String username,
                      javax.jdo.PersistenceManagerFactory pmf)
Method Detail

loadMetaInf

public Object[] loadMetaInf()

storeMetaInf

public void storeMetaInf(Object[] metainf)

getMailDir

public static File getMailDir(String username)

getActivitiesHelper

protected ActivityQueryHelper getActivitiesHelper()

appendMessages

public void appendMessages(Message[] newMessages)
                    throws MessagingException
Specified by:
appendMessages in class Folder
Throws:
MessagingException

close

public void close(boolean arg0)
           throws MessagingException
Specified by:
close in class Folder
Throws:
MessagingException

create

public boolean create(int arg0)
               throws MessagingException
Specified by:
create in class Folder
Throws:
MessagingException

delete

public boolean delete(boolean arg0)
               throws MessagingException
Specified by:
delete in class Folder
Throws:
MessagingException

exists

public boolean exists()
               throws MessagingException
Specified by:
exists in class Folder
Throws:
MessagingException

expunge

public Message[] expunge()
                  throws MessagingException
Specified by:
expunge in class Folder
Throws:
MessagingException

getFolder

public Folder getFolder(String arg0)
                 throws MessagingException
Specified by:
getFolder in class Folder
Throws:
MessagingException

getMessage

public Message getMessage(int messageNumber)
                   throws MessagingException
Specified by:
getMessage in class Folder
Throws:
MessagingException

getMessageCount

public int getMessageCount()
                    throws MessagingException
Specified by:
getMessageCount in class Folder
Throws:
MessagingException

getFullName

public String getFullName()
Specified by:
getFullName in class Folder

getName

public String getName()
Specified by:
getName in class Folder

getParent

public Folder getParent()
                 throws MessagingException
Specified by:
getParent in class Folder
Throws:
MessagingException

getPermanentFlags

public Flags getPermanentFlags()
Specified by:
getPermanentFlags in class Folder

getSeparator

public char getSeparator()
                  throws MessagingException
Specified by:
getSeparator in class Folder
Throws:
MessagingException

getType

public int getType()
            throws MessagingException
Specified by:
getType in class Folder
Throws:
MessagingException

hasNewMessages

public boolean hasNewMessages()
                       throws MessagingException
Specified by:
hasNewMessages in class Folder
Throws:
MessagingException

isOpen

public boolean isOpen()
Specified by:
isOpen in class Folder

list

public Folder[] list(String arg0)
              throws MessagingException
Specified by:
list in class Folder
Throws:
MessagingException

open

public void open(int arg0)
          throws MessagingException
Specified by:
open in class Folder
Throws:
MessagingException

renameTo

public boolean renameTo(Folder arg0)
                 throws MessagingException
Specified by:
renameTo in class Folder
Throws:
MessagingException

getMessageByUID

public Message getMessageByUID(long uid)
                        throws MessagingException
Specified by:
getMessageByUID in interface UIDFolder
Throws:
MessagingException

getMessagesByUID

public Message[] getMessagesByUID(long[] uids)
                           throws MessagingException
Specified by:
getMessagesByUID in interface UIDFolder
Throws:
MessagingException

getMessagesByUID

public Message[] getMessagesByUID(long start,
                                  long end)
                           throws MessagingException
Specified by:
getMessagesByUID in interface UIDFolder
Throws:
MessagingException

getUID

public long getUID(Message message)
            throws MessagingException
Specified by:
getUID in interface UIDFolder
Throws:
MessagingException

getUIDValidity

public long getUIDValidity()
                    throws MessagingException
Specified by:
getUIDValidity in interface UIDFolder
Throws:
MessagingException

search

public Message[] search(SearchTerm searchTerm)
                 throws MessagingException
Overrides:
search in class Folder
Throws:
MessagingException


This software is published under the BSD license. Copyright © 2003-2012, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.