|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.mail.MailPath
public final class MailPath
MailPath - Represents a message's unique path inside a mailbox, that is the account ID followed by the folder fullname followed
by the value of SEPERATOR followed by mail's unique ID:
Example: default1/INBOX.Subfolder/1234
| Field Summary | |
|---|---|
static java.util.Comparator<MailPath> |
COMPARATOR
Gets an appropriate instance of Comparator to sort instances of MailPath |
static MailPath |
NULL
A null MailPath |
static char |
SEPERATOR
The '/' character which separates folder's fullname from mail's ID in a mail path |
| Constructor Summary | |
|---|---|
MailPath()
Default constructor |
|
MailPath(int accountId,
java.lang.String folder,
java.lang.String uid)
Initializes a new MailPath |
|
MailPath(java.lang.String mailPathStr)
Initializes a new MailPath |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
int |
getAccountId()
Gets the account ID. |
java.lang.String |
getFolder()
Gets the folder fullname |
java.lang.String |
getFolderArgument()
Gets the folder argument; default3/INBOX. |
java.lang.String |
getMailID()
Gets the mail ID. |
static java.lang.String |
getMailPath(int accountId,
java.lang.String folder,
java.lang.String mailId)
Gets the mail path corresponding to given folder fullname and message UID |
static MailPath[] |
getMailPaths(java.lang.String mailPaths)
Returns the mail paths for given comma-separated mail IDs each conform to pattern <folder-path><value-of- SEPERATOR
><mail-ID> |
static MailPath[] |
getMailPaths(java.lang.String[] mailPaths)
Returns the mail paths for given mail IDs each conform to pattern <folder-path><value-of- SEPERATOR
><mail-ID> |
java.lang.String |
getStr()
Gets this mail path's string representation. |
static java.lang.String[] |
getUIDs(MailPath[] mailPaths)
Extracts the IDs from given mail paths |
int |
hashCode()
|
MailPath |
setMailIdentifierString(java.lang.String mailPathStr)
Sets this mail path's folder fullname and mail's unique ID (for re-usage). |
java.lang.String |
toString()
Gets this mail path's string representation following pattern: "default" + <account-id> + <default-separator> + <folder-fullname> + "/" + <mail-id> default2/INBOX/Subfolder/453" |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.Comparator<MailPath> COMPARATOR
Comparator to sort instances of MailPath
public static final MailPath NULL
null MailPath
public static final char SEPERATOR
'/' character which separates folder's fullname from mail's ID in a mail path
| Constructor Detail |
|---|
public MailPath()
public MailPath(java.lang.String mailPathStr)
throws MailException
MailPath
mailPathStr - The mail path's string representation
MailException - If mail path's string representation does not match expected pattern
public MailPath(int accountId,
java.lang.String folder,
java.lang.String uid)
MailPath
accountId - The account IDfolder - Folder fullnameuid - The mail's unique ID| Method Detail |
|---|
public static java.lang.String getMailPath(int accountId,
java.lang.String folder,
java.lang.String mailId)
accountId - The account IDfolder - The folder fullnamemailId - The mail ID
String
public static MailPath[] getMailPaths(java.lang.String mailPaths)
throws MailException
SEPERATOR
><mail-ID>
mailPaths - The comma-separated mail IDs
MailException - If mail paths cannot be generated
public static MailPath[] getMailPaths(java.lang.String[] mailPaths)
throws MailException
SEPERATOR
><mail-ID>
mailPaths - The mail IDs
MailException - If mail paths cannot be generatedpublic static java.lang.String[] getUIDs(MailPath[] mailPaths)
mailPaths - The mail IDs
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic int getAccountId()
public java.lang.String getFolder()
public java.lang.String getFolderArgument()
public java.lang.String getStr()
toString()public java.lang.String getMailID()
public MailPath setMailIdentifierString(java.lang.String mailPathStr)
throws MailException
mailPathStr - The mail paths string representation
MailException - If mail path's string representation does not match expected patternpublic java.lang.String toString()
default2/INBOX/Subfolder/453"
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||