com.veriplace.client
Class InvitationStatus

java.lang.Object
  extended by com.veriplace.client.AsyncRequestStatus
      extended by com.veriplace.client.InvitationStatus

public class InvitationStatus
extends AsyncRequestStatus

Holds information about the status of an InvitationAPI request.

Since:
2.3

Constructor Summary
InvitationStatus(java.lang.String id, java.lang.String mobileNumber)
           
InvitationStatus(java.lang.String id, java.lang.String mobileNumber, InvitationException exception)
           
InvitationStatus(java.lang.String id, java.lang.String mobileNumber, User user, Token accessToken)
           
InvitationStatus(java.lang.String id, User user)
           
InvitationStatus(User user)
           
 
Method Summary
 Token getAccessToken()
          The access token for the user who granted permission to the application, if the request was successfully completed.
 InvitationException getException()
          An InvitationDeclinedException or InvitationNotPermittedException indicating the reason that permission was not granted, if the request failed.
 java.lang.String getMobileNumber()
          The mobile number to which the invitation was sent.
 User getUser()
          The Veriplace user identifier for the user who granted permission to the application, if the request was successfully completed.
 boolean isCompleted()
          True if the application now has permission to locate the user, in which case getUser() will return a valid user identifier.
 
Methods inherited from class com.veriplace.client.AsyncRequestStatus
getId, isFailed, isReady
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvitationStatus

public InvitationStatus(java.lang.String id,
                        java.lang.String mobileNumber)

InvitationStatus

public InvitationStatus(User user)

InvitationStatus

public InvitationStatus(java.lang.String id,
                        User user)

InvitationStatus

public InvitationStatus(java.lang.String id,
                        java.lang.String mobileNumber,
                        User user,
                        Token accessToken)

InvitationStatus

public InvitationStatus(java.lang.String id,
                        java.lang.String mobileNumber,
                        InvitationException exception)
Method Detail

getUser

public User getUser()
The Veriplace user identifier for the user who granted permission to the application, if the request was successfully completed.


getException

public InvitationException getException()
An InvitationDeclinedException or InvitationNotPermittedException indicating the reason that permission was not granted, if the request failed.

Overrides:
getException in class AsyncRequestStatus

getAccessToken

public Token getAccessToken()
The access token for the user who granted permission to the application, if the request was successfully completed.

The access token is included if you queried the result with InvitationAPI.getResult(InvitationStatus), or if you used an extended callback - see CallbackOptions. If you used a summary callback (CallbackOptions.createSummaryCallback(String), then this property will be null and you will need to use GetLocationAPI.getLocationAccessToken(User) to get the token.

Since:
2.8

getMobileNumber

public java.lang.String getMobileNumber()
The mobile number to which the invitation was sent.

The mobile number is included in a callback result only if you used an extended callback - see CallbackOptions; if you used a summary callback (CallbackOptions.createSummaryCallback(String), then this property will be null.


isCompleted

public boolean isCompleted()
True if the application now has permission to locate the user, in which case getUser() will return a valid user identifier.