@BoxResourceType(value="event") public class BoxEvent extends BoxResource
Modifier and Type | Class and Description |
---|---|
static class |
BoxEvent.EventType
Enumerates the possible types for an event.
|
BoxResource.Info
Constructor and Description |
---|
BoxEvent(BoxAPIConnection api,
String json)
Constructs a BoxEvent from a JSON string.
|
Modifier and Type | Method and Description |
---|---|
BoxCollaborator.Info |
getAccessibleBy()
Gets info about the collaborator who was given access to a folder within the current enterprise.
|
BoxUser.Info |
getActionBy()
Gets the user that performed the action for this event.
|
JsonObject |
getAdditionalDetails()
Gets a JSON object containing additional details about this event.
|
Date |
getCreatedAt()
Gets the time that this event was created.
|
BoxUser.Info |
getCreatedBy()
Gets info about the user that triggered this event.
|
BoxEvent.EventType |
getEventType()
Gets the type of this event.
|
String |
getIPAddress()
Gets the IP address of the user that triggered this event.
|
String |
getSessionID()
Gets the session ID of the user that triggered this event.
|
BoxResource.Info |
getSourceInfo()
Gets info about the source of this event.
|
JsonObject |
getSourceJSON()
Gets the raw JSON object containing information about the source of this event.
|
String |
getTypeName()
Gets the type name as String.
|
equals, getAPI, getID, getResourceType, hashCode
public BoxEvent(BoxAPIConnection api, String json)
api
- the API connection to be used by the file.json
- the JSON encoded event.public BoxResource.Info getSourceInfo()
Note that there is a bug in the enterprise event stream where certain event sources don't correctly map to a
BoxResource.Info. In the case where the event source JSON cannot be mapped to a BoxResource.Info, you can use the
getSourceJSON()
method to access the raw JSON representation of the event source.
public JsonObject getSourceJSON()
This method can be used to work around bugs in the enterprise events API where some enterprise event sources don't correctly map to a BoxResource.Info. In this case, this method can be used to access the raw JSON directly.
public BoxEvent.EventType getEventType()
public String getTypeName()
public Date getCreatedAt()
public String getIPAddress()
public JsonObject getAdditionalDetails()
The fields and data within the returned JSON object will vary depending on the type of the event.
public BoxCollaborator.Info getAccessibleBy()
This field is only populated when the event is related to a collaboration that occurred within an enterprise.
public BoxUser.Info getCreatedBy()
public String getSessionID()
public BoxUser.Info getActionBy()