public final class MesosferStorylineDetail
extends java.lang.Object
MesosferStorylineDetail
is a custom local representation of storyline data that can be saved and retrieved from the Mesosfer cloud.
The basic workflow for creating new data is to construct a new MesosferStoryline
by accessing
createStoryline(String)
or createStoryline(MesosferStoryline)
,
use setter method to fill it with storyline data, and then use
saveAsync(SaveCallback)
to persist to the cloud.
The basic workflow for accessing existing data is to use a MesosferQuery
to specify which
existing data to retrieve.Constructor and Description |
---|
MesosferStorylineDetail() |
Modifier and Type | Method and Description |
---|---|
static MesosferStorylineDetail |
createStoryline(MesosferStoryline storyline)
Constructs a new
MesosferStorylineDetail with no data in it. |
static MesosferStorylineDetail |
createStoryline(java.lang.String mesosferStorylineId)
Constructs a new
MesosferStorylineDetail with no data in it. |
static MesosferStorylineDetail |
createWithObjectId(java.lang.String objectId)
Creates a reference to an existing
MesosferStorylineDetail . |
void |
deleteAsync(DeleteCallback callback)
Deletes this object on the server in a background thread.
|
void |
fetchAsync(GetCallback<MesosferStorylineDetail> callback)
Fetches this object with the data from the server in a background thread.
|
java.lang.String |
getAlertMessage()
Gets alert message.
|
java.lang.String |
getAlertTitle()
Gets alert title.
|
java.util.List<MesosferBeacon> |
getBeacons()
Gets beacons.
|
MesosferStoryline.Campaign |
getCampaign()
Gets
MesosferStoryline.Campaign . |
java.util.Date |
getCreatedAt()
This reports time as the server sees it, so that if you create a
MesosferStorylineDetail ,
then wait a while, and then call saveAsync(SaveCallback) , the creation time will be
the time of the first saveAsync(SaveCallback) call rather than the time the object
was created locally. |
MesosferBeacon.Event |
getEvent()
Gets
MesosferBeacon.Event . |
java.lang.String |
getObjectId()
Accessor to the object id.
|
static MesosferQuery<MesosferStorylineDetail> |
getQuery()
Constructs a query for
MesosferStorylineDetail . |
static MesosferQuery<MesosferStorylineDetail> |
getQuery(MesosferStoryline storyline)
Constructs a query for
MesosferStorylineDetail . |
com.eyro.mesosfer.MesosferShowDay |
getShowOn()
Gets show on.
|
MesosferStoryline |
getStoryline()
Gets
MesosferStoryline object. |
java.util.Date |
getUpdatedAt()
This reports time as the server sees it, so that if you make changes to a
MesosferStorylineDetail ,
then wait a while, and then call saveAsync(SaveCallback) , the updated time will be
the time of the saveAsync(SaveCallback) call rather than the time the object
was changed locally. |
java.lang.String |
getUrlImageAndroid()
Gets url image android.
|
java.lang.String |
getUrlImageIOS()
Gets url image ios.
|
java.lang.String |
getUrlPage()
Gets url page.
|
java.lang.String |
getUrlVideo()
Gets url video.
|
boolean |
isDataAvailable()
Gets whether the
MesosferStorylineDetail has been fetched. |
void |
saveAsync(SaveCallback callback)
Saves this object with the data from the server in a background thread.
|
MesosferStorylineDetail |
setAlertMessage(java.lang.String alertMessage)
Sets alert message.
|
MesosferStorylineDetail |
setAlertTitle(java.lang.String alertTitle)
Sets alert title.
|
MesosferStorylineDetail |
setBeacons(java.util.List<MesosferBeacon> beacons)
Sets beacons.
|
MesosferStorylineDetail |
setCampaign(MesosferStoryline.Campaign campaign)
Sets campaign.
|
MesosferStorylineDetail |
setEvent(MesosferBeacon.Event event)
Sets event.
|
MesosferStorylineDetail |
setShowOn(com.eyro.mesosfer.MesosferShowDay showOn)
Sets show on.
|
MesosferStorylineDetail |
setUrlImageAndroid(java.lang.String urlImageAndroid)
Sets url image android.
|
MesosferStorylineDetail |
setUrlImageIOS(java.lang.String urlImageIOS)
Sets url image ios.
|
MesosferStorylineDetail |
setUrlPage(java.lang.String urlPage)
Sets url page.
|
MesosferStorylineDetail |
setUrlVideo(java.lang.String urlVideo)
Sets url video.
|
org.json.JSONObject |
toJSON()
To put all keys and values of this
MesosferStorylineDetail into a JSONObject . |
java.lang.String |
toString() |
public static MesosferStorylineDetail createWithObjectId(java.lang.String objectId)
MesosferStorylineDetail
. Calling isDataAvailable()
on this object will return false
until fetchAsync(GetCallback)
has been called.objectId
- The object id for the referenced notification object.MesosferStorylineDetail
without data.public static MesosferStorylineDetail createStoryline(java.lang.String mesosferStorylineId)
MesosferStorylineDetail
with no data in it. A MesosferStorylineDetail
constructed in this way will not have an objectId and will not persist to the database until
saveAsync(SaveCallback)
is called.mesosferStorylineId
- the MesosferStoryline
objectIdMesosferStorylineDetail
public static MesosferStorylineDetail createStoryline(MesosferStoryline storyline)
MesosferStorylineDetail
with no data in it. A MesosferStorylineDetail
constructed in this way will not have an objectId and will not persist to the database until
saveAsync(SaveCallback)
is called.storyline
- the MesosferStoryline
MesosferStorylineDetail
public MesosferStoryline getStoryline()
MesosferStoryline
object.MesosferStoryline
object.public MesosferStoryline.Campaign getCampaign()
MesosferStoryline.Campaign
.MesosferStoryline.Campaign
public MesosferBeacon.Event getEvent()
MesosferBeacon.Event
.MesosferBeacon.Event
public java.lang.String getAlertTitle()
public java.lang.String getAlertMessage()
public java.lang.String getUrlVideo()
public java.lang.String getUrlPage()
public java.lang.String getUrlImageAndroid()
public java.lang.String getUrlImageIOS()
public java.util.List<MesosferBeacon> getBeacons()
public com.eyro.mesosfer.MesosferShowDay getShowOn()
public boolean isDataAvailable()
MesosferStorylineDetail
has been fetched.true
if the MesosferStorylineDetail
is new or has been fetched.
false
otherwise.public java.lang.String getObjectId()
public java.util.Date getCreatedAt()
MesosferStorylineDetail
,
then wait a while, and then call saveAsync(SaveCallback)
, the creation time will be
the time of the first saveAsync(SaveCallback)
call rather than the time the object
was created locally.public java.util.Date getUpdatedAt()
MesosferStorylineDetail
,
then wait a while, and then call saveAsync(SaveCallback)
, the updated time will be
the time of the saveAsync(SaveCallback)
call rather than the time the object
was changed locally.public org.json.JSONObject toJSON()
MesosferStorylineDetail
into a JSONObject
.JSONObject
of all keys and valuespublic java.lang.String toString()
toString
in class java.lang.Object
public static MesosferQuery<MesosferStorylineDetail> getQuery()
MesosferStorylineDetail
.public static MesosferQuery<MesosferStorylineDetail> getQuery(MesosferStoryline storyline)
MesosferStorylineDetail
.storyline
- the MesosferStoryline
public MesosferStorylineDetail setCampaign(MesosferStoryline.Campaign campaign)
campaign
- the campaignpublic MesosferStorylineDetail setEvent(MesosferBeacon.Event event)
event
- the eventpublic MesosferStorylineDetail setAlertTitle(java.lang.String alertTitle)
alertTitle
- the alert titlepublic MesosferStorylineDetail setAlertMessage(java.lang.String alertMessage)
alertMessage
- the alert messagepublic MesosferStorylineDetail setUrlVideo(java.lang.String urlVideo)
urlVideo
- the url videopublic MesosferStorylineDetail setUrlPage(java.lang.String urlPage)
urlPage
- the url pagepublic MesosferStorylineDetail setUrlImageAndroid(java.lang.String urlImageAndroid)
urlImageAndroid
- the url image androidpublic MesosferStorylineDetail setUrlImageIOS(java.lang.String urlImageIOS)
urlImageIOS
- the url image iospublic MesosferStorylineDetail setBeacons(java.util.List<MesosferBeacon> beacons)
beacons
- the beaconspublic MesosferStorylineDetail setShowOn(com.eyro.mesosfer.MesosferShowDay showOn)
showOn
- the show onpublic void deleteAsync(DeleteCallback callback)
callback
- callback.done(e)
is called when the save completes.public void saveAsync(SaveCallback callback)
callback
- callback.done(e)
is called when the save completes.public void fetchAsync(GetCallback<MesosferStorylineDetail> callback)
callback
- callback.done(object, e)
is called when the fetch completes.