|
Oracle® Mail Java API Reference 10g Release 1 (10.1.1) B14492-01 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.mail.Folder | +--oracle.mail.sdk.esmail.OracleFolder
This class implements an Oracle folder.
When a folder is opened, a messageCache (Vector) and a uidMap (Hashtable) is created. The messageCache contains a list of Message objects with only a small set of information filled in. The uidMap provides quick access to the Message object using the message UID.
When information is needed from the store, a database connection is retrieved from the database pool (OracleDBPool) and then released back to the pool when the operation is complete.
Inner Class Summary | |
static class |
OracleFolder.OracleFlag |
Inner classes inherited from class javax.mail.UIDFolder |
javax.mail.UIDFolder.FetchProfileItem |
Fields inherited from class javax.mail.Folder |
HOLDS_FOLDERS, HOLDS_MESSAGES, READ_ONLY, READ_WRITE |
Fields inherited from interface javax.mail.UIDFolder |
LASTUID |
Method Summary | |
javax.mail.Message[] |
_doSearch(java.lang.String criteria) |
void |
addACI(java.lang.String aUser, java.lang.String aAci) Takes in a user_address, ACI string and calls an LDAP api to set the ACI for the user. |
void |
addACI(java.lang.String aUser, java.lang.String aAci, boolean fullACISupport) Deprecated. |
void |
addACI(java.lang.String aUser, java.lang.String aAci, int mode) Takes in a user_address, ACI string and an integer with the approporate flag bit set to indicate whether the full ACI list is supported and whether to apply the ACI rights recursively down the folder hierarchy. |
void |
addACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aAci) addACI method takes in a user type, user_address, aci string and calls ldap api to set the aci for the user. |
void |
addACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aAci, boolean fullACISupport) Deprecated. |
void |
addACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aAci, int mode) Takes in a user_address, ACI string and a flag to determine if the full ACI list is supported or not and calls a LDAP api to set the ACI for the user. |
void |
appendMessages(javax.mail.Message[] msgs) Appends messages to this folder. |
void |
appendMessages(javax.mail.Message[] msgs, java.lang.String migrationID_header) Appends messages to this folder. |
void |
appendMessages(javax.mail.Message[] msgs, java.lang.String dateStr, boolean rflag) |
void |
close(boolean expunge) Closes the folder and expunges the folder if requested. |
static int |
convertFlag(javax.mail.Flags flag) |
static javax.mail.Flags |
convertFlag(int flags) |
long |
convertUsrFlag(javax.mail.Flags flag) |
void |
copyMessages(javax.mail.Message[] msgs, javax.mail.Folder folder) Copies the specified messages from this folder to the specified destination folder. |
boolean |
create(int type) If type doesn't have HOLDS_MESSAGES, it implies /NOSELECT. |
boolean |
delete(boolean recurse) Deletes this folder. |
boolean |
exists() Checks if the folder exists on the store. |
javax.mail.Message[] |
expunge() Expunges messages marked \DELETED. |
void |
fetch(javax.mail.Message[] msgs, javax.mail.FetchProfile fp) Prefetches the items specified in the FetchProfile for the given messages. |
int[][] |
getCounts() This method returns the counts for the folder as a 2-D array. |
OracleFilteredMsgHdrs[] |
getFilteredHeaders(long[] msgUids) Returns a list of . |
javax.mail.Folder |
getFolder(java.lang.String name) Returns the folder object corresponding to the given name. |
int |
getFolderExpiry() Gets the expiry limit for the folder. |
long |
getFolderId() Returns the internal folder id for this folder. |
long |
getFolderSize() Returns the sum total of the sizes of all the messages in a folder. |
long |
getFolderSize(boolean recurse) Returns the sum total of the sizes of all the messages in a folder. |
java.lang.String |
getFullName() Returns the current folder's full name which DOES NOT contain the namespace |
java.lang.String |
getFullPath() Returns the full folder name with the namespace. |
java.util.Vector |
getGranteeACI() Returns a vector of OracleGranteeACI objects. |
javax.mail.Message |
getMessage(int msgnum) Returns the message object corresponding to the given message number. |
javax.mail.Message[] |
getMessageByType(int type) Returns the message object that corresponds to the given message type. |
javax.mail.Message |
getMessageByUID(long uid) Returns the Message object that corresponds to the given message uid. |
int |
getMessageCount() Returns the total number of messages in a folder. |
javax.mail.Message[] |
getMessagesByUID(long[] uids) Returns the messages specified in the UID array. |
javax.mail.Message[] |
getMessagesByUID(long start, long end) Returns the messages specified in the range (inclusively). |
java.lang.String |
getName() Returns the cannonical name of the folder. |
int |
getNewMessageCount() Returns the number of messages with \RECENT flag in this folder. |
javax.mail.Folder |
getParent() Returns a new folder object that represents the parent of this folder. |
javax.mail.Flags |
getPermanentFlags() Returns the list of permanent flags. |
char |
getSeparator() Returns the folder delimiter character. |
int |
getType() Returns the folder type - HOLDS_FOLDER, HOLDS_MESSAGE. |
long |
getUID(javax.mail.Message message) Returns the msg UID for the specified message. |
long |
getUIDValidity() Returns the uid validity information for the folder. |
int |
getUnreadMessageCount() Returns the total number of unread messages in a folder. |
javax.mail.URLName |
getURLName() Returns the URL name reprensenting this folder. |
boolean |
hasNewMessages() Checks whether the folder has messages with the \RECENT flag set. |
boolean |
isInheritedACI(java.lang.String aUser) Takes in an user_address and check if the rights is inherited from parent folder. |
boolean |
isOpen() Returns the opened flag. |
boolean |
isShared() Checks if the folder is shared. |
boolean |
isSubscribed() Returns true if this folder is subscribed. |
javax.mail.Folder[] |
list(java.lang.String pattern) Returns a list of folder objects that match the pattern. |
javax.mail.Folder[] |
listSubscribed(java.lang.String pattern) Returns a list subscribed of folder objects that match the pattern. |
void |
modifyACI(java.lang.String aUser, java.lang.String aACI) Deprecated. |
void |
modifyACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aACI) Deprecated. |
void |
moveMessages(javax.mail.Message[] msgs, javax.mail.Folder folder) Moves messages to other folders. |
void |
open(int mode) Returns the folder information and then fetches all the messages in the folder. |
void |
openInternal(int mode) |
void |
removeACI(java.lang.String aUser) Takes in a user_address and removes folder access for the user. |
void |
removeACI(java.lang.String aUser, int mode) Takes in a user_address and removes folder access for the user. |
void |
removeACI(java.lang.String aUserType, java.lang.String aUser) Takes in a user type, user_address and removes access for the user. |
void |
removeACI(java.lang.String aUserType, java.lang.String aUser, int mode) Takes in a user type, user_address and removes access for the user. |
boolean |
renameTo(javax.mail.Folder f) Renames this folder and notifies the RenameListeners. |
javax.mail.Message[] |
search(javax.mail.search.SearchTerm term) Constructs the IMAP4 search string and calls the PL/SQL search. |
javax.mail.Message[] |
search(javax.mail.search.SearchTerm term, javax.mail.Message[] msgs) Constructs the IMAP4 search string and calls the PL/SQL search. |
void |
setFlags(int[] msgnums, javax.mail.Flags flag, boolean value) Set flags for the folder. |
void |
setFlags(int start, int end, javax.mail.Flags flag, boolean value) Sets flags for the folder. |
void |
setFlags(javax.mail.Message[] msgs, javax.mail.Flags flag, boolean value) Set flags |
void |
setFolderExpiry(int daysKept) Sets the expiry limit for the folder. |
void |
setSubscribed(boolean subscribe) Subscribes or unsubscribes the folder. |
long[] |
sortMessages(java.util.Vector aSortCriteriaVector) Sorts the messages in the folder according to the specified order, returning a list of message UIDs. |
Methods inherited from class javax.mail.Folder |
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, getMessages, getMessages, getMessages, getMode, getStore, list, listSubscribed, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public void appendMessages(javax.mail.Message[] msgs) throws javax.mail.MessagingException
msgs
- Message objects to append into this folderpublic void appendMessages(javax.mail.Message[] msgs, java.lang.String migrationID_header) throws javax.mail.MessagingException
msgs
- Message objects to append into this foldermigrationID_header
- Message header where the migration ID is storepublic void appendMessages(javax.mail.Message[] msgs, java.lang.String dateStr, boolean rflag) throws javax.mail.MessagingException
public void close(boolean expunge) throws javax.mail.MessagingException
expunge
- Flag to indicate if expunge is requiredpublic void copyMessages(javax.mail.Message[] msgs, javax.mail.Folder folder) throws javax.mail.MessagingException
public boolean create(int type) throws javax.mail.MessagingException
public boolean delete(boolean recurse) throws javax.mail.MessagingException
public boolean exists() throws javax.mail.MessagingException
public void moveMessages(javax.mail.Message[] msgs, javax.mail.Folder folder) throws javax.mail.MessagingException
public javax.mail.Message[] expunge() throws javax.mail.MessagingException
public void fetch(javax.mail.Message[] msgs, javax.mail.FetchProfile fp) throws javax.mail.MessagingException
public javax.mail.Folder getFolder(java.lang.String name) throws javax.mail.MessagingException
public java.lang.String getFullName()
public javax.mail.Message getMessage(int msgnum) throws javax.mail.MessagingException
public int getMessageCount() throws javax.mail.MessagingException
public java.lang.String getName()
public int getNewMessageCount() throws javax.mail.MessagingException
public javax.mail.Folder getParent() throws javax.mail.MessagingException
public javax.mail.Flags getPermanentFlags()
public char getSeparator()
public int getType() throws javax.mail.MessagingException
public int getUnreadMessageCount() throws javax.mail.MessagingException
public javax.mail.URLName getURLName() throws javax.mail.MessagingException
public boolean hasNewMessages() throws javax.mail.MessagingException
public boolean isOpen()
public boolean isSubscribed()
public javax.mail.Folder[] list(java.lang.String pattern) throws javax.mail.MessagingException
public javax.mail.Folder[] listSubscribed(java.lang.String pattern) throws javax.mail.MessagingException
public void open(int mode) throws javax.mail.MessagingException
public void openInternal(int mode) throws javax.mail.MessagingException
public boolean renameTo(javax.mail.Folder f) throws javax.mail.MessagingException
public javax.mail.Message[] _doSearch(java.lang.String criteria) throws javax.mail.MessagingException
public javax.mail.Message[] search(javax.mail.search.SearchTerm term) throws javax.mail.MessagingException
public javax.mail.Message[] search(javax.mail.search.SearchTerm term, javax.mail.Message[] msgs) throws javax.mail.MessagingException
public void setFlags(int[] msgnums, javax.mail.Flags flag, boolean value) throws javax.mail.MessagingException
public void setFlags(int start, int end, javax.mail.Flags flag, boolean value) throws javax.mail.MessagingException
public void setFlags(javax.mail.Message[] msgs, javax.mail.Flags flag, boolean value) throws javax.mail.MessagingException
public void setSubscribed(boolean subscribe) throws javax.mail.MessagingException
public javax.mail.Message getMessageByUID(long uid) throws javax.mail.MessagingException
public javax.mail.Message[] getMessagesByUID(long[] uids) throws javax.mail.MessagingException
public javax.mail.Message[] getMessagesByUID(long start, long end) throws javax.mail.MessagingException
public long getUID(javax.mail.Message message) throws javax.mail.MessagingException
public long getUIDValidity() throws javax.mail.MessagingException
public java.lang.String getFullPath()
public long getFolderId() throws javax.mail.MessagingException
public static int convertFlag(javax.mail.Flags flag)
public long convertUsrFlag(javax.mail.Flags flag) throws javax.mail.MessagingException
public static javax.mail.Flags convertFlag(int flags)
public void addACI(java.lang.String aUser, java.lang.String aAci) throws javax.mail.MessagingException
aUser
- user, dl, domain, etc to be granted access to shared folderaAci
- user's ACIpublic void addACI(java.lang.String aUser, java.lang.String aAci, boolean fullACISupport) throws javax.mail.MessagingException
aUser
- user, dl, domain, etc to be granted access to shared folderaAci
- user's acipublic void addACI(java.lang.String aUser, java.lang.String aAci, int mode) throws javax.mail.MessagingException
aUser
- user, dl, domain, etc to be granted access to shared folderaAci
- user's acimode
- the way to process and apply the acipublic void addACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aAci, boolean fullACISupport) throws javax.mail.MessagingException
aUserType
- user - ESDSConstants.DS_MAILUSER, dl - ESDSConstants.DS_DISTRIBUTION_LIST, domain - ESDSConstants.DS_DOMAINaUser
- user, dl, domain, etc to be granted access to shared folderaAci
- user's acifullACISupport
- flag for full aci vs r,i onlypublic void addACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aAci, int mode) throws javax.mail.MessagingException
aUserType
- user - ESDSConstants.DS_MAILUSER, dl - ESDSConstants.DS_DISTRIBUTION_LIST, domain - ESDSConstants.DS_DOMAINaUser
- user, dl, domain, etc to be granted access to shared folderaAci
- user's acimode
- the way to process and apply the acipublic void addACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aAci) throws javax.mail.MessagingException
aUserType
- user - ESDSConstants.DS_MAILUSER, dl - ESDSConstants.DS_DISTRIBUTION_LIST, domain - ESDSConstants.DS_DOMAINaUser
- user, dl, domain, etc to be granted access to shared folderaAci
- user's acipublic void removeACI(java.lang.String aUser) throws javax.mail.MessagingException
aUser
- user, dl, domain, oid group to be granted access to shared folderpublic void removeACI(java.lang.String aUser, int mode) throws javax.mail.MessagingException
aUser
- user, dl, domain, oid group to be granted access to shared foldermode
- the way to process and apply the acipublic void removeACI(java.lang.String aUserType, java.lang.String aUser, int mode) throws javax.mail.MessagingException
aUserType
- user - ESDSConstants.DS_MAILUSER, dl - ESDSConstants.DS_DISTRIBUTION_LIST, domain - ESDSConstants.DS_DOMAINaUser
- user, dl, domain, oid group to be granted access to shared foldermode
- the way to process and apply the acipublic void removeACI(java.lang.String aUserType, java.lang.String aUser) throws javax.mail.MessagingException
aUserType
- user - ESDSConstants.DS_MAILUSER, dl - ESDSConstants.DS_DISTRIBUTION_LIST, domain - ESDSConstants.DS_DOMAINaUser
- user, dl, domain, oid group to be granted access to shared folderpublic boolean isInheritedACI(java.lang.String aUser) throws javax.mail.MessagingException
aUser
- user, dl, domain, oid group to be granted access to shared folderpublic void modifyACI(java.lang.String aUser, java.lang.String aACI) throws javax.mail.MessagingException
aUser
- user, dl, domain, etc to be granted access to shared folderaACI
- new aci for the userpublic void modifyACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aACI) throws javax.mail.MessagingException
aUserType
- user - ESDSConstants.DS_MAILUSER, dl - ESDSConstants.DS_DISTRIBUTION_LIST, domain - ESDSConstants.DS_DOMAINaUser
- user, dl, domain, etc to be granted access to shared folderaACI
- new aci for the userpublic java.util.Vector getGranteeACI() throws javax.mail.MessagingException
Returns a vector of OracleGranteeACI objects. The complete list of grantee aci(s) on shared folders can be obtained by using the OracleGranteeACI objects.
public boolean isShared() throws javax.mail.MessagingException
public long getFolderSize() throws javax.mail.MessagingException
public long getFolderSize(boolean recurse) throws javax.mail.MessagingException
public long[] sortMessages(java.util.Vector aSortCriteriaVector) throws javax.mail.MessagingException
aSortCriteriaVector
- Construct a vector with all the sort criteriapublic javax.mail.Message[] getMessageByType(int type) throws javax.mail.MessagingException
public OracleFilteredMsgHdrs[] getFilteredHeaders(long[] msgUids) throws javax.mail.MessagingException
public int[][] getCounts() throws java.lang.Exception
This method returns the counts for the folder as a 2-D array. The columns of the 2-D array contain the following information: 1 - msg_type (values correspond to the types defined in OracleMessage) EMAIL_TYPE, VOICE_TYPE, FAX_TYPE, NEWS_TYPE, TD_TYPE 2 - total messages of type in folder 3 - total unseen(unread) 4 - total recent
public int getFolderExpiry() throws javax.mail.MessagingException
none
-public void setFolderExpiry(int daysKept) throws javax.mail.MessagingException
daysKept
- - the number of days after which messages expire
|
Oracle® Mail Java API Reference 10g Release 1 (10.1.1) B14492-01 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |