public class SFSInvitation extends java.lang.Object implements Invitation
The SFS2X Invitation Manager is very simple to use. All you need to provide is:
InvitationCallback
.Constructor and Description |
---|
SFSInvitation(User inviter,
User invitee,
int secondsForAnswer) |
SFSInvitation(User inviter,
User invitee,
int secondsForAnswer,
ISFSObject params) |
Modifier and Type | Method and Description |
---|---|
static Invitation |
fromSFSArray(ISFSArray sfsa) |
InvitationCallback |
getCallback()
Obtain a reference to the CallBack handler class
|
int |
getExpiryTime()
The expiration timestamp.
|
int |
getId()
Get the unique invitation ID
|
User |
getInvitee()
Get the Invitee, the user that receives the invitation
|
User |
getInviter()
Get the Inviter, the user that started this invitation
|
ISFSObject |
getParams()
An SFSObject of custom parameters can be attached to the invitation.
|
int |
getSecondsForAnswer()
The amount of seconds given to the invitee to respond to the invitation
|
boolean |
isExpired()
Checks if the invitation is expired.
|
void |
setCallback(InvitationCallback callback)
Set the CallBack handler for the invitation.
|
void |
setParams(ISFSObject params)
An SFSObject of custom parameters can be attached to the invitation.
|
java.lang.String |
toString() |
public SFSInvitation(User inviter, User invitee, int secondsForAnswer, ISFSObject params)
public static Invitation fromSFSArray(ISFSArray sfsa)
public int getId()
Invitation
getId
in interface Invitation
public ISFSObject getParams()
Invitation
getParams
in interface Invitation
SFSObject
public void setParams(ISFSObject params)
Invitation
setParams
in interface Invitation
params
- the custom parametersSFSObject
public User getInviter()
Invitation
getInviter
in interface Invitation
public User getInvitee()
Invitation
getInvitee
in interface Invitation
public int getExpiryTime()
Invitation
getExpiryTime
in interface Invitation
public boolean isExpired()
Invitation
isExpired
in interface Invitation
public int getSecondsForAnswer()
Invitation
getSecondsForAnswer
in interface Invitation
public InvitationCallback getCallback()
Invitation
getCallback
in interface Invitation
InvitationCallback
public void setCallback(InvitationCallback callback)
Invitation
setCallback
in interface Invitation
callback
- the callback handlerInvitationCallback
public java.lang.String toString()
toString
in class java.lang.Object