v24
COMPLIANCE
Elements Common API
All elements have the next common API.

Get Id

Returns element id (UUID value).
1
String getId();
Copied!

Get type

Returns element type.
1
String getType()
Copied!

Get content type

Returns element content type.
1
String getContentType()
Copied!

Get custom fields

Returns element custom fields as JsonObject.
1
JsonObject getCustomFields()
Copied!

Get duration

Returns element duration in seconds.
1
int getDuration();
Copied!

Get published time

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

Has fixed duration

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

Register callback

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

Get state

Returns current state of element.
1
State getState();
Copied!