public class DisplayAndPrintMessage extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
DisplayAndPrintMessage.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<DisplayAndPrintMessage> |
CREATOR |
static JSONifiable.Creator<DisplayAndPrintMessage> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
DisplayAndPrintMessage()
Constructs a new empty instance.
|
protected |
DisplayAndPrintMessage(boolean noInit)
Constructs a new empty instance.
|
|
DisplayAndPrintMessage(DisplayAndPrintMessage src)
Constructs a new instance that is a deep copy of the source instance.
|
|
DisplayAndPrintMessage(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
DisplayAndPrintMessage(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearContent()
Clears the 'content' field, the 'has' method for this field will now return false
|
void |
clearDestination()
Clears the 'destination' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
DisplayAndPrintMessage |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getContent()
Contains the display and/or print message text from gateway
|
MessageDestination |
getDestination()
Destination for the message CDSP - CustomerDisplay, CRCP - CustomerReceipt, MDSP - MerchantDisplay, MRCP - MerchantReceipt
|
protected GenericClient |
getGenericClient() |
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
boolean |
hasContent()
Checks whether the 'content' field has been set, however the value could be null
|
boolean |
hasDestination()
Checks whether the 'destination' field has been set, however the value could be null
|
boolean |
isNotNullContent()
Checks whether the 'content' field is set and is not null
|
boolean |
isNotNullDestination()
Checks whether the 'destination' field is set and is not null
|
void |
mergeChanges(DisplayAndPrintMessage src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
DisplayAndPrintMessage |
setContent(String content)
Sets the field 'content'.
|
DisplayAndPrintMessage |
setDestination(MessageDestination destination)
Sets the field 'destination'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<DisplayAndPrintMessage> CREATOR
public static final JSONifiable.Creator<DisplayAndPrintMessage> JSON_CREATOR
public DisplayAndPrintMessage()
protected DisplayAndPrintMessage(boolean noInit)
public DisplayAndPrintMessage(String json) throws IllegalArgumentException
IllegalArgumentException
public DisplayAndPrintMessage(JSONObject jsonObject)
public DisplayAndPrintMessage(DisplayAndPrintMessage src)
public MessageDestination getDestination()
public String getContent()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullDestination()
public boolean isNotNullContent()
public boolean hasDestination()
public boolean hasContent()
public DisplayAndPrintMessage setDestination(MessageDestination destination)
public DisplayAndPrintMessage setContent(String content)
public void clearDestination()
public void clearContent()
public boolean containsChanges()
public void resetChangeLog()
public DisplayAndPrintMessage copyChanges()
public void mergeChanges(DisplayAndPrintMessage src)