Package com.day.cq.mailer
Enum MailingStatusCode
- java.lang.Object
-
- java.lang.Enum<MailingStatusCode>
-
- com.day.cq.mailer.MailingStatusCode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MailingStatusCode>
public enum MailingStatusCode extends java.lang.Enum<MailingStatusCode>
Codes of Status a Mailing. The Status is divided into two categories. One category is considered erroneous. This can be tested with a call toisError
method.- Since:
- 5.4
- See Also:
MailingStatus.getStatusCode()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ERROR
There was an attempt to sent the mailing, that failed.INVALID_MESSAGE
There was an attempt to sent the mailing that failed.NEW
Initial state.NO_ADDRESS
There was an attempt to sent the mailing, that failed.NO_GATEWAY
There was an attempt to sent the mailing, that failed.NO_TEMPLATE
There was an attempt to sent the mailing, that failed.NOT_DELIVERABLE
There was an attempt to sent the mailing, that failed.SENT
Mailing has been sent without error
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isError()
True if the Status indicates a reason that prevented the Mailing from being deliveredstatic MailingStatusCode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MailingStatusCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NEW
public static final MailingStatusCode NEW
Initial state. mailing may change
-
SENT
public static final MailingStatusCode SENT
Mailing has been sent without error
-
ERROR
public static final MailingStatusCode ERROR
There was an attempt to sent the mailing, that failed. No reason given.
-
NO_TEMPLATE
public static final MailingStatusCode NO_TEMPLATE
There was an attempt to sent the mailing, that failed. NoMessageTemplate
could be created for theMailing
-
NO_GATEWAY
public static final MailingStatusCode NO_GATEWAY
There was an attempt to sent the mailing, that failed. No Gateway is registered to sent mailing- See Also:
MessageGateway
-
NO_ADDRESS
public static final MailingStatusCode NO_ADDRESS
There was an attempt to sent the mailing, that failed. NoMailingRecipient
didn't provide an address suited for this mailing (eg. no e-mail address)
-
INVALID_MESSAGE
public static final MailingStatusCode INVALID_MESSAGE
There was an attempt to sent the mailing that failed. TemplateMessageTemplate
provided malformed values eg. e-mail addresses without "@"
-
NOT_DELIVERABLE
public static final MailingStatusCode NOT_DELIVERABLE
There was an attempt to sent the mailing, that failed. TheMessageGateway
denied relaying of the message
-
-
Method Detail
-
values
public static MailingStatusCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MailingStatusCode c : MailingStatusCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MailingStatusCode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isError
public boolean isError()
True if the Status indicates a reason that prevented the Mailing from being delivered- Returns:
- true if the state has to be considered abnormal false otherwise
-
-