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 toisErrormethod.- Since:
- 5.4
- See Also:
MailingStatus.getStatusCode()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ERRORThere was an attempt to sent the mailing, that failed.INVALID_MESSAGEThere was an attempt to sent the mailing that failed.NEWInitial state.NO_ADDRESSThere was an attempt to sent the mailing, that failed.NO_GATEWAYThere was an attempt to sent the mailing, that failed.NO_TEMPLATEThere was an attempt to sent the mailing, that failed.NOT_DELIVERABLEThere was an attempt to sent the mailing, that failed.SENTMailing has been sent without error
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisError()True if the Status indicates a reason that prevented the Mailing from being deliveredstatic MailingStatusCodevalueOf(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. NoMessageTemplatecould 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. NoMailingRecipientdidn'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. TemplateMessageTemplateprovided 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. TheMessageGatewaydenied 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
-
-