public class VasSettings extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
VasSettings.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<VasSettings> |
CREATOR |
static JSONifiable.Creator<VasSettings> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
VasSettings()
Constructs a new empty instance.
|
protected |
VasSettings(boolean noInit)
Constructs a new empty instance.
|
|
VasSettings(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.
|
|
VasSettings(String json)
Constructs a new instance from the given JSON String.
|
|
VasSettings(VasSettings src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearExtras()
Clears the 'extras' field, the 'has' method for this field will now return false
|
void |
clearPushMode()
Clears the 'pushMode' field, the 'has' method for this field will now return false
|
void |
clearServiceTypes()
Clears the 'serviceTypes' field, the 'has' method for this field will now return false
|
void |
clearVasMode()
Clears the 'vasMode' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
VasSettings |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Map<String,String> |
getExtras()
Additional context relevant extras such as EXTRA_ORDER_ID
|
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.
|
VasPushMode |
getPushMode()
Indicates if vas is push url only, no push, or push in addition to GET
|
List<VasDataType> |
getServiceTypes()
Vas service types of interest for this txn
|
VasMode |
getVasMode()
Populated per tx.
|
boolean |
hasExtras()
Checks whether the 'extras' field has been set, however the value could be null
|
boolean |
hasPushMode()
Checks whether the 'pushMode' field has been set, however the value could be null
|
boolean |
hasServiceTypes()
Checks whether the 'serviceTypes' field has been set, however the value could be null
|
boolean |
hasVasMode()
Checks whether the 'vasMode' field has been set, however the value could be null
|
boolean |
isNotEmptyExtras()
Checks whether the 'extras' field is set and is not null and is not empty
|
boolean |
isNotEmptyServiceTypes()
Checks whether the 'serviceTypes' field is set and is not null and is not empty
|
boolean |
isNotNullExtras()
Checks whether the 'extras' field is set and is not null
|
boolean |
isNotNullPushMode()
Checks whether the 'pushMode' field is set and is not null
|
boolean |
isNotNullServiceTypes()
Checks whether the 'serviceTypes' field is set and is not null
|
boolean |
isNotNullVasMode()
Checks whether the 'vasMode' field is set and is not null
|
void |
mergeChanges(VasSettings 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.
|
VasSettings |
setExtras(Map<String,String> extras)
Sets the field 'extras'.
|
VasSettings |
setPushMode(VasPushMode pushMode)
Sets the field 'pushMode'.
|
VasSettings |
setServiceTypes(List<VasDataType> serviceTypes)
Sets the field 'serviceTypes'.
|
VasSettings |
setVasMode(VasMode vasMode)
Sets the field 'vasMode'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<VasSettings> CREATOR
public static final JSONifiable.Creator<VasSettings> JSON_CREATOR
public VasSettings()
protected VasSettings(boolean noInit)
public VasSettings(String json) throws IllegalArgumentException
IllegalArgumentException
public VasSettings(JSONObject jsonObject)
public VasSettings(VasSettings src)
public VasMode getVasMode()
public List<VasDataType> getServiceTypes()
public Map<String,String> getExtras()
public VasPushMode getPushMode()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullVasMode()
public boolean isNotNullServiceTypes()
public boolean isNotEmptyServiceTypes()
public boolean isNotNullExtras()
public boolean isNotEmptyExtras()
public boolean isNotNullPushMode()
public boolean hasVasMode()
public boolean hasServiceTypes()
public boolean hasExtras()
public boolean hasPushMode()
public VasSettings setVasMode(VasMode vasMode)
public VasSettings setServiceTypes(List<VasDataType> serviceTypes)
public VasSettings setExtras(Map<String,String> extras)
public VasSettings setPushMode(VasPushMode pushMode)
public void clearVasMode()
public void clearServiceTypes()
public void clearExtras()
public void clearPushMode()
public boolean containsChanges()
public void resetChangeLog()
public VasSettings copyChanges()
public void mergeChanges(VasSettings src)