Elements Common API

All elements have the next common API.

Get Id

Returns element id (UUID value).
String getId();

Get type

Returns element type.
String getType()

Get content type

Returns element content type.
String getContentType()

Get custom fields

Returns element custom fields as JsonObject.
JsonObject getCustomFields()

Get duration

Returns element duration in seconds.
int getDuration();

Get published time

Returns time element was published as UNIX time in seconds.
long getPublishedAt();

Has fixed duration

Returns true if element has fixed duration.
boolean hasFixedDuration();

Register callback

Register callback to listen to element changes.
void registerCallback(Callback callback);

Get state

Returns current state of element.
State getState();