public class Event extends AbstractResource
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_HASH |
static String |
EVENT_KEY |
static String |
EVENT_METADATA |
static String |
EVENT_TIME |
static String |
EVENT_TYPE |
static String |
HASH_ALGORITHM |
protected static char[] |
hexArray |
static String |
RELATED_SIGNATURE_ID |
static String |
REPORTED_FOR_ACCOUNT_ID |
dataObj
Constructor and Description |
---|
Event(org.json.JSONObject json)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getAccountId()
Returns the account ID that this event is reporting for.
|
Date |
getEventDate()
Returns the event time as a Java Date object.
|
String |
getHash()
Returns the unique hash string identifying this event.
|
Signature |
getRelatedSignature()
Returns the associated Signature object with this event, if the
event is associated with a Signature Request.
|
String |
getRelatedSignatureId()
Returns the signature ID to which this event is associated.
|
SignatureRequest |
getSignatureRequest()
Returns a reference to the SignatureRequest that is attached to the
Event.
|
Template |
getTemplate()
Returns a reference to the Template that is attached to the Event.
|
EventType |
getType()
Returns the EventType for this event.
|
String |
getTypeString()
Returns the event type String.
|
boolean |
hasAccountId()
Returns true if this event has a "reported_for_account_id" field.
|
boolean |
hasRelatedSignatureId()
Utility method to determine if this event has a related signature ID.
|
boolean |
hasSignatureRequest()
Returns true if this Event is associated with a Signature Request.
|
boolean |
hasTemplate()
Returns true if this event is associated with a Template.
|
boolean |
isValid(String apiKey)
Returns true if the event hash matches the computed hash using the provided
API key.
|
String |
toString()
Displays the Signature Request in addition to the Event data.
|
add, addToList, clearList, get, getBoolean, getConstructor, getDate, getInteger, getJSONObject, getList, getList, getLong, getString, has, hasString, set
public static final String EVENT_KEY
public static final String EVENT_METADATA
public static final String REPORTED_FOR_ACCOUNT_ID
public static final String RELATED_SIGNATURE_ID
public static final String EVENT_TYPE
public static final String EVENT_TIME
public static final String EVENT_HASH
public static final String HASH_ALGORITHM
protected static final char[] hexArray
public Event(org.json.JSONObject json) throws HelloSignException
json
- JSONObjectHelloSignException
public String getAccountId() throws HelloSignException
HelloSignException
public boolean hasAccountId() throws HelloSignException
HelloSignException
public Date getEventDate()
public String getRelatedSignatureId() throws HelloSignException
HelloSignException
public boolean hasRelatedSignatureId()
public Signature getRelatedSignature() throws HelloSignException
HelloSignException
public SignatureRequest getSignatureRequest()
public boolean hasSignatureRequest()
public Template getTemplate()
public boolean hasTemplate()
public EventType getType()
public String getTypeString()
public String getHash()
public boolean isValid(String apiKey) throws HelloSignException
apiKey
- String api key.HelloSignException
public String toString()
toString
in class AbstractResource
Copyright © 2015 HelloSign. All rights reserved.