org.apache.james.imapserver
Class Flags
java.lang.Object
|
+--org.apache.james.imapserver.Flags
- All Implemented Interfaces:
- org.apache.avalon.framework.activity.Initializable, java.io.Serializable
- public class Flags
- extends java.lang.Object
- implements java.io.Serializable, org.apache.avalon.framework.activity.Initializable
The set of flags associated with a message. The \Seen flag is maintained
on a per-user basis.
Reference: RFC 2060 - para 2.3
- Version:
- 0.1 on 14 Dec 2000
- Author:
- Charles Benett
- See Also:
- Serialized Form
Constructor Summary |
Flags()
|
Method Summary |
java.lang.String |
getFlags(java.lang.String user)
Returns IMAP formatted String of Flags for named user |
void |
initialize()
Initialisation - only for object creation not on deserialisation. |
boolean |
isAnswered()
|
boolean |
isDeleted()
|
boolean |
isDraft()
|
boolean |
isFlagged()
|
boolean |
isRecent()
|
boolean |
isSeen(java.lang.String user)
|
void |
setAnswered(boolean newState)
|
void |
setDeleted(boolean newState)
|
void |
setDraft(boolean newState)
|
void |
setFlagged(boolean newState)
|
boolean |
setFlags(java.lang.String flagString,
java.lang.String user)
Sets Flags for message from IMAP-forammted string parameter. |
void |
setRecent(boolean newState)
|
void |
setSeen(boolean newState,
java.lang.String user)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ANSWERED
public static final int ANSWERED
DELETED
public static final int DELETED
DRAFT
public static final int DRAFT
FLAGGED
public static final int FLAGGED
RECENT
public static final int RECENT
SEEN
public static final int SEEN
Flags
public Flags()
initialize
public void initialize()
- Initialisation - only for object creation not on deserialisation.
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
getFlags
public java.lang.String getFlags(java.lang.String user)
- Returns IMAP formatted String of Flags for named user
setFlags
public boolean setFlags(java.lang.String flagString,
java.lang.String user)
- Sets Flags for message from IMAP-forammted string parameter.
The FLAGS form overwrites existing flags, ie sets all other
flags to false.
The +FLAGS form adds the flags in list to the existing flags
The -FLAGS form removes the flags in list from the existing
flags
Note that the Recent flag cannot be set by user and is ignored by
this method.
- Parameters:
flagString
- a string formatted according to
RFC2060 store_att_flagsuser
- the String email address of the user
setAnswered
public void setAnswered(boolean newState)
isAnswered
public boolean isAnswered()
setDeleted
public void setDeleted(boolean newState)
isDeleted
public boolean isDeleted()
setDraft
public void setDraft(boolean newState)
isDraft
public boolean isDraft()
setFlagged
public void setFlagged(boolean newState)
isFlagged
public boolean isFlagged()
setRecent
public void setRecent(boolean newState)
isRecent
public boolean isRecent()
setSeen
public void setSeen(boolean newState,
java.lang.String user)
isSeen
public boolean isSeen(java.lang.String user)
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.