Package com.clover.sdk.v3.apps
Class Screenshot
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.apps.Screenshot
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Screenshot extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Screenshot.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<Screenshot>
CREATOR
static JSONifiable.Creator<Screenshot>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Screenshot()
Constructs a new empty instance.protected
Screenshot(boolean noInit)
Constructs a new empty instance.Screenshot(Screenshot src)
Constructs a new instance that is a deep copy of the source instance.Screenshot(String json)
Constructs a new instance from the given JSON String.Screenshot(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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearLarge()
Clears the 'large' field, the 'has' method for this field will now return falsevoid
clearLocale()
Clears the 'locale' field, the 'has' method for this field will now return falsevoid
clearMedium()
Clears the 'medium' field, the 'has' method for this field will now return falsevoid
clearName()
Clears the 'name' field, the 'has' method for this field will now return falsevoid
clearSmall()
Clears the 'small' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.Screenshot
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.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.String
getLarge()
URL for the large version (800 x 800) of the app screenshotString
getLocale()
https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html ISO 639-1 ISO_3166-1_alpha-2 Examples: en_US, de_DE, en_CA, fr_CAString
getMedium()
URL for the medium version (200 x 200) of the app screenshotString
getName()
URL for the app screenshotString
getSmall()
URL for the small version (80 x 80) of the app screenshotboolean
hasLarge()
Checks whether the 'large' field has been set, however the value could be nullboolean
hasLocale()
Checks whether the 'locale' field has been set, however the value could be nullboolean
hasMedium()
Checks whether the 'medium' field has been set, however the value could be nullboolean
hasName()
Checks whether the 'name' field has been set, however the value could be nullboolean
hasSmall()
Checks whether the 'small' field has been set, however the value could be nullboolean
isNotNullLarge()
Checks whether the 'large' field is set and is not nullboolean
isNotNullLocale()
Checks whether the 'locale' field is set and is not nullboolean
isNotNullMedium()
Checks whether the 'medium' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullSmall()
Checks whether the 'small' field is set and is not nullvoid
mergeChanges(Screenshot 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.Screenshot
setLarge(String large)
Sets the field 'large'.Screenshot
setLocale(String locale)
Sets the field 'locale'.Screenshot
setMedium(String medium)
Sets the field 'medium'.Screenshot
setName(String name)
Sets the field 'name'.Screenshot
setSmall(String small)
Sets the field 'small'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<Screenshot> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Screenshot> JSON_CREATOR
-
-
Constructor Detail
-
Screenshot
public Screenshot()
Constructs a new empty instance.
-
Screenshot
protected Screenshot(boolean noInit)
Constructs a new empty instance.
-
Screenshot
public Screenshot(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Screenshot
public Screenshot(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.
-
Screenshot
public Screenshot(Screenshot src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getName
public String getName()
URL for the app screenshot
-
getLocale
public String getLocale()
https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html ISO 639-1 ISO_3166-1_alpha-2 Examples: en_US, de_DE, en_CA, fr_CA
-
getSmall
public String getSmall()
URL for the small version (80 x 80) of the app screenshot
-
getMedium
public String getMedium()
URL for the medium version (200 x 200) of the app screenshot
-
getLarge
public String getLarge()
URL for the large version (800 x 800) of the app screenshot
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
getJSONObject
public 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.- Specified by:
getJSONObject
in interfaceJSONifiable
-
isNotNullName
public boolean isNotNullName()
Checks whether the 'name' field is set and is not null
-
isNotNullLocale
public boolean isNotNullLocale()
Checks whether the 'locale' field is set and is not null
-
isNotNullSmall
public boolean isNotNullSmall()
Checks whether the 'small' field is set and is not null
-
isNotNullMedium
public boolean isNotNullMedium()
Checks whether the 'medium' field is set and is not null
-
isNotNullLarge
public boolean isNotNullLarge()
Checks whether the 'large' field is set and is not null
-
hasName
public boolean hasName()
Checks whether the 'name' field has been set, however the value could be null
-
hasLocale
public boolean hasLocale()
Checks whether the 'locale' field has been set, however the value could be null
-
hasSmall
public boolean hasSmall()
Checks whether the 'small' field has been set, however the value could be null
-
hasMedium
public boolean hasMedium()
Checks whether the 'medium' field has been set, however the value could be null
-
hasLarge
public boolean hasLarge()
Checks whether the 'large' field has been set, however the value could be null
-
setName
public Screenshot setName(String name)
Sets the field 'name'.
-
setLocale
public Screenshot setLocale(String locale)
Sets the field 'locale'.
-
setSmall
public Screenshot setSmall(String small)
Sets the field 'small'.
-
setMedium
public Screenshot setMedium(String medium)
Sets the field 'medium'.
-
setLarge
public Screenshot setLarge(String large)
Sets the field 'large'.
-
clearName
public void clearName()
Clears the 'name' field, the 'has' method for this field will now return false
-
clearLocale
public void clearLocale()
Clears the 'locale' field, the 'has' method for this field will now return false
-
clearSmall
public void clearSmall()
Clears the 'small' field, the 'has' method for this field will now return false
-
clearMedium
public void clearMedium()
Clears the 'medium' field, the 'has' method for this field will now return false
-
clearLarge
public void clearLarge()
Clears the 'large' field, the 'has' method for this field will now return false
-
containsChanges
public boolean containsChanges()
Returns true if this instance has any changes.
-
resetChangeLog
public void resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
-
copyChanges
public Screenshot copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Screenshot src)
Copy all the changed fields from the given source to this instance.
-
-