@Immutable public class DispositionType extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_AUTOMATIC_ACTION |
static String |
MDNACTION_MDN_SENT_AUTOMATICALLY |
static String |
STATUS_MODIFIER_ERROR |
static String |
STATUS_MODIFIER_WARNING |
static String |
STATUS_PROCESSED |
| Constructor and Description |
|---|
DispositionType(String sAction,
String sMDNAction,
String sStatus,
String sStatusModifier,
String sStatusDescription) |
| Modifier and Type | Method and Description |
|---|---|
static DispositionType |
createError(String sStatusDescription) |
static DispositionType |
createFromString(String sDisposition) |
static DispositionType |
createSuccess() |
String |
getAction() |
String |
getAsString() |
String |
getMDNAction() |
String |
getStatus() |
String |
getStatusDescription() |
String |
getStatusModifier() |
boolean |
isError() |
boolean |
isWarning() |
String |
toString() |
void |
validate(IMessage aSrcMsg,
String sText)
Throws a
AS2DispositionException if the message is a warning or an
error. |
public static final String ACTION_AUTOMATIC_ACTION
public static final String MDNACTION_MDN_SENT_AUTOMATICALLY
public static final String STATUS_PROCESSED
public static final String STATUS_MODIFIER_ERROR
public static final String STATUS_MODIFIER_WARNING
public boolean isError()
true if it is an error, false if not
(maybe success or warning).public boolean isWarning()
true if it is a warning, false if not
(maybe success or error).public void validate(@Nonnull IMessage aSrcMsg, @Nonnull String sText) throws AS2DispositionException
AS2DispositionException if the message is a warning or an
error. If the disposition is fine this method simply returns.aSrcMsg - The source message. May not be null.sText - The disposition text to use. May not be null.AS2DispositionException - The checked exception.@Nonnull public static DispositionType createFromString(@Nullable String sDisposition) throws AS2Exception
AS2Exception@Nonnull public static DispositionType createSuccess()
null.@Nonnull public static DispositionType createError(@Nonnull String sStatusDescription)
sStatusDescription - The status description to be used. May not be null.STATUS_MODIFIER_ERROR and the provided status description.Copyright © 2013–2022 Philip Helger. All rights reserved.