Package org.bluezoo.gumdrop.mailbox
Enum Class StoreAction
- All Implemented Interfaces:
Serializable,Comparable<StoreAction>,Constable
Enumeration of IMAP STORE command actions.
The STORE command modifies the flags of messages. This enum defines the three operations that can be performed on message flags as specified in RFC 9051 Section 6.4.6.
- Author:
- Chris Burdess
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic StoreActionfromImapKeyword(String keyword) Parses an IMAP store action keyword to the corresponding StoreAction enum value.Returns the IMAP keyword representation of this action.toString()static StoreActionReturns the enum constant of this class with the specified name.static StoreAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REPLACE
Replace the existing flags with the specified flags. IMAP command: FLAGS or FLAGS.SILENT -
ADD
Add the specified flags to the existing flags. IMAP command: +FLAGS or +FLAGS.SILENT -
REMOVE
Remove the specified flags from the existing flags. IMAP command: -FLAGS or -FLAGS.SILENT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getImapKeyword
Returns the IMAP keyword representation of this action. For example, ADD returns "+FLAGS".- Returns:
- the IMAP keyword (without .SILENT suffix)
-
fromImapKeyword
Parses an IMAP store action keyword to the corresponding StoreAction enum value. The comparison is case-insensitive. The .SILENT suffix is ignored if present.- Parameters:
keyword- the IMAP keyword (e.g., "FLAGS", "+FLAGS", "-FLAGS.SILENT")- Returns:
- the corresponding StoreAction, or null if not recognized
-
toString
- Overrides:
toStringin classEnum<StoreAction>
-