|
Oracle Email Java API Reference Release 2(9.0.4) B10724-01 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
Method Summary | |
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) 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 |
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) 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 |
close(boolean expunge) Closes the folder and expunges the folder if requested. |
void |
copyMessages(javax.mail.Message[] msgs, oracle.mail.sdk.esmail.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, oracle.mail.sdk.esmail.FetchProfile fp) Prefetches the items specified in the FetchProfile for the given messages. |
OracleFilteredMsgHdrs[] |
getFilteredHeaders(long[] msgUids) Returns a list of . |
oracle.mail.sdk.esmail.Folder |
getFolder(java.lang.String name) Returns the folder object corresponding to the given name. |
long |
getFolderId() Returns the internal folder id for this folder. |
int |
getFolderSize() 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. |
oracle.mail.sdk.esmail.Folder |
getParent() Returns a new folder object that represents the parent of this folder. |
oracle.mail.sdk.esmail.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. |
oracle.mail.sdk.esmail.URLName |
getURLName() Returns the URL name reprensenting this folder. |
boolean |
hasNewMessages() Checks whether the folder has messages with the \RECENT flag set. |
boolean |
isOpen() Returns the opened flag. |
boolean |
isShared() Checks if the folder is shared. |
boolean |
isSubscribed() Returns true if this folder is subscribed. |
oracle.mail.sdk.esmail.Folder[] |
list(java.lang.String pattern) Returns a list of folder objects that match the pattern. |
oracle.mail.sdk.esmail.Folder[] |
listSubscribed(java.lang.String pattern) Returns a list subscribed of folder objects that match the pattern. |
void |
moveMessages(javax.mail.Message[] msgs, oracle.mail.sdk.esmail.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 |
removeACI(java.lang.String aUser) 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. |
boolean |
renameTo(oracle.mail.sdk.esmail.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, oracle.mail.sdk.esmail.Flags flag, boolean value) Set flags for the folder. |
void |
setFlags(int start, int end, oracle.mail.sdk.esmail.Flags flag, boolean value) Sets flags for the folder. |
void |
setFlags(javax.mail.Message[] msgs, oracle.mail.sdk.esmail.Flags flag, boolean value) Set flags |
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. |
Method Detail |
public void appendMessages(javax.mail.Message[] msgs) throws oracle.mail.sdk.esmail.MessagingException
msgs
- Message objects to append into this folderpublic void appendMessages(javax.mail.Message[] msgs, java.lang.String migrationID_header) throws oracle.mail.sdk.esmail.MessagingException
msgs
- Message objects to append into this foldermigrationID_header
- Message header where the migration ID is storepublic void close(boolean expunge) throws oracle.mail.sdk.esmail.MessagingException
expunge
- Flag to indicate if expunge is requiredpublic void copyMessages(javax.mail.Message[] msgs, oracle.mail.sdk.esmail.Folder folder) throws oracle.mail.sdk.esmail.MessagingException
public boolean create(int type) throws oracle.mail.sdk.esmail.MessagingException
public boolean delete(boolean recurse) throws oracle.mail.sdk.esmail.MessagingException
public boolean exists() throws oracle.mail.sdk.esmail.MessagingException
public void moveMessages(javax.mail.Message[] msgs, oracle.mail.sdk.esmail.Folder folder) throws oracle.mail.sdk.esmail.MessagingException
public javax.mail.Message[] expunge() throws oracle.mail.sdk.esmail.MessagingException
public void fetch(javax.mail.Message[] msgs, oracle.mail.sdk.esmail.FetchProfile fp) throws oracle.mail.sdk.esmail.MessagingException
public oracle.mail.sdk.esmail.Folder getFolder(java.lang.String name) throws oracle.mail.sdk.esmail.MessagingException
public java.lang.String getFullName()
public javax.mail.Message getMessage(int msgnum) throws oracle.mail.sdk.esmail.MessagingException
public int getMessageCount() throws oracle.mail.sdk.esmail.MessagingException
public java.lang.String getName()
public int getNewMessageCount() throws oracle.mail.sdk.esmail.MessagingException
public oracle.mail.sdk.esmail.Folder getParent() throws oracle.mail.sdk.esmail.MessagingException
public oracle.mail.sdk.esmail.Flags getPermanentFlags()
public char getSeparator()
public int getType() throws oracle.mail.sdk.esmail.MessagingException
public int getUnreadMessageCount() throws oracle.mail.sdk.esmail.MessagingException
public oracle.mail.sdk.esmail.URLName getURLName() throws oracle.mail.sdk.esmail.MessagingException
public boolean hasNewMessages() throws oracle.mail.sdk.esmail.MessagingException
public boolean isOpen()
public boolean isSubscribed()
public oracle.mail.sdk.esmail.Folder[] list(java.lang.String pattern) throws oracle.mail.sdk.esmail.MessagingException
public oracle.mail.sdk.esmail.Folder[] listSubscribed(java.lang.String pattern) throws oracle.mail.sdk.esmail.MessagingException
public void open(int mode) throws oracle.mail.sdk.esmail.MessagingException
public boolean renameTo(oracle.mail.sdk.esmail.Folder f) throws oracle.mail.sdk.esmail.MessagingException
public javax.mail.Message[] search(javax.mail.search.SearchTerm term) throws oracle.mail.sdk.esmail.MessagingException
public javax.mail.Message[] search(javax.mail.search.SearchTerm term, javax.mail.Message[] msgs) throws oracle.mail.sdk.esmail.MessagingException
public void setFlags(int[] msgnums, oracle.mail.sdk.esmail.Flags flag, boolean value) throws oracle.mail.sdk.esmail.MessagingException
public void setFlags(int start, int end, oracle.mail.sdk.esmail.Flags flag, boolean value) throws oracle.mail.sdk.esmail.MessagingException
public void setFlags(javax.mail.Message[] msgs, oracle.mail.sdk.esmail.Flags flag, boolean value) throws oracle.mail.sdk.esmail.MessagingException
public void setSubscribed(boolean subscribe) throws oracle.mail.sdk.esmail.MessagingException
public javax.mail.Message getMessageByUID(long uid) throws oracle.mail.sdk.esmail.MessagingException
public javax.mail.Message[] getMessagesByUID(long[] uids) throws oracle.mail.sdk.esmail.MessagingException
public javax.mail.Message[] getMessagesByUID(long start, long end) throws oracle.mail.sdk.esmail.MessagingException
public long getUID(javax.mail.Message message) throws oracle.mail.sdk.esmail.MessagingException
public long getUIDValidity() throws oracle.mail.sdk.esmail.MessagingException
public java.lang.String getFullPath()
public long getFolderId() throws oracle.mail.sdk.esmail.MessagingException
public void addACI(java.lang.String aUser, java.lang.String aAci) throws oracle.mail.sdk.esmail.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 oracle.mail.sdk.esmail.MessagingException
aUser
- user, dl, domain, etc to be granted access to shared folderaAci
- user's acipublic void addACI(java.lang.String aUserType, java.lang.String aUser, java.lang.String aAci, boolean fullACISupport) throws oracle.mail.sdk.esmail.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) throws oracle.mail.sdk.esmail.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 oracle.mail.sdk.esmail.MessagingException
aUser
- user, dl, domain, oid group to be granted access to shared folderpublic void removeACI(java.lang.String aUserType, java.lang.String aUser) throws oracle.mail.sdk.esmail.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 java.util.Vector getGranteeACI() throws oracle.mail.sdk.esmail.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 oracle.mail.sdk.esmail.MessagingException
public int getFolderSize() throws oracle.mail.sdk.esmail.MessagingException
public long[] sortMessages(java.util.Vector aSortCriteriaVector) throws oracle.mail.sdk.esmail.MessagingException
aSortCriteriaVector
- Construct a vector with all the sort criteriapublic javax.mail.Message[] getMessageByType(int type) throws oracle.mail.sdk.esmail.MessagingException
public OracleFilteredMsgHdrs[] getFilteredHeaders(long[] msgUids) throws oracle.mail.sdk.esmail.MessagingException
|
Oracle Email Java API Reference Release 2(9.0.4) B10724-01 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |