public class BoxEvent extends BoxResource
Modifier and Type | Class and Description |
---|---|
static class |
BoxEvent.Type
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 |
---|---|
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.
|
BoxEvent.Type |
getType()
Gets the type of this event.
|
equals, getAPI, getID, 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.Type getType()