public class EventsClient extends MindsphereAPIClient
Modifier and Type | Class and Description |
---|---|
static class |
EventsClient.ClientBuilder |
MindsphereAPIClient.Builder<T extends MindsphereAPIClient.Builder<T>>
credentials, restClientConfig, restTemplate
Modifier | Constructor and Description |
---|---|
protected |
EventsClient(EventsClient.ClientBuilder builder) |
Modifier and Type | Method and Description |
---|---|
static EventsClient.ClientBuilder |
builder() |
CustomEvent |
createCustomEvent(CustomEvent customEvent)
Creates custom event with the provided content.
|
CustomEvent |
createCustomEvent(String customEventJson)
Creates custom event with the provided content.
|
BaseEvent |
createEvent(String eventJson)
Creates a MindSphere Standard event or Custom event depending on the provided
content.
|
MindSphereStandardEvent |
createStandardEvent(MindSphereStandardEvent standardEvent)
Creates a MindSphere Standard event with the provided.
|
MindSphereStandardEvent |
createStandardEvent(String standardEventJson)
Creates a MindSphere Standard Event with the provided.
|
CustomEvent |
getCustomEventById(String eventId) |
CustomEvent |
getCustomEventById(String eventId,
String ifNoneMatch) |
BaseEvent |
getEventById(String eventId)
Returns an Event with the specified ID
|
BaseEvent |
getEventById(String eventId,
String ifNoneMatch)
Returns an Event with the specified ID
|
Events |
getEvents()
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(Integer size)
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(Integer size,
boolean history)
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(Integer size,
Integer page)
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(Integer size,
Integer page,
boolean history)
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(Integer size,
Integer page,
String sort)
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(Integer size,
Integer page,
String sort,
boolean history)
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(Integer size,
Integer page,
String filter,
String sort,
String ifNoneMatch,
Boolean history)
Returns events based on the request parameters.
If no typeId is given in the filter expression then MindsphereStandardEvent typed events (and its descendants excluding descendant specific fields) will be returned. |
Events |
getEvents(String sort)
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(String sort,
boolean history)
Returns MindSphere Standard Events based on the request parameters.
|
Events |
getEvents(String sort,
String filter)
Returns MindSphere Standard Events based on the request parameters.
If no typeId is given in the filter expression then MindsphereStandardEvent typed events (and its descendants excluding descendant specific fields) will be returned. |
MindSphereStandardEvent |
getStandardEventById(String eventId) |
MindSphereStandardEvent |
getStandardEventById(String eventId,
String ifNoneMatch) |
CustomEvent |
updateCustomEvent(String eventId,
CustomEvent customEvent,
String ifMatch)
Update an existing custom event specified by ID.
|
CustomEvent |
updateCustomEvent(String eventId,
String customEventJson,
String ifMatch)
Update an existing custom event specified by ID.
|
BaseEvent |
updateEvents(String eventId,
String eventJson,
String ifMatch)
Update an existing event specified by ID.
|
MindSphereStandardEvent |
updateStandardEvent(String eventId,
MindSphereStandardEvent standardEvent,
String ifMatch)
Update an existing MindSphere Standard Event specified by ID.
|
MindSphereStandardEvent |
updateStandardEvent(String eventId,
String standardEventJson,
String ifMatch)
Update an existing MindSphere Standard Event specified by ID.
|
protected EventsClient(EventsClient.ClientBuilder builder)
public static EventsClient.ClientBuilder builder()
public Events getEvents(Integer size, Integer page, String filter, String sort, String ifNoneMatch, Boolean history) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
size
- Specifies the number of elements in a page. Default is 20page
- Specifies the requested page index. Default is 0filter
- Filter parameter (JSON) encoded format
sort
- Order in which events are returned. Supported only on
filterable fields. Default is timestamp in descending
orderifNoneMatch
- ETag hash of previous request to allow cachinghistory
- Optional parameter, if we want to retrieve the history of
an eventMindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents() throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(Integer size) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
size
- Specifies the number of elements in a page. Default is 20MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(Integer size, boolean history) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
size
- Specifies the number of elements in a page. Default is 20history
- Optional parameter, if we want to retrieve the history of an
eventMindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(Integer size, Integer page) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
size
- Specifies the number of elements in a page. Default is 20page
- Specifies the requested page index. Default is 0MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(Integer size, Integer page, boolean history) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
size
- Specifies the number of elements in a page. Default is 20page
- Specifies the requested page index. Default is 0history
- Optional parameter, if we want to retrieve the history of an
eventMindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(Integer size, Integer page, String sort) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
size
- Specifies the number of elements in a page. Default is 20page
- Specifies the requested page index. Default is 0sort
- Order in which events are returned. Supported only on filterable
fields. Default is timestamp in descending orderMindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(Integer size, Integer page, String sort, boolean history) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
size
- Specifies the number of elements in a page. Default is 20page
- Specifies the requested page index. Default is 0sort
- Order in which events are returned. Supported only on
filterable fields. Default is timestamp in descending orderhistory
- Optional parameter, if we want to retrieve the history of an
eventMindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(String sort) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
sort
- Order in which events are returned. Supported only on filterable
fields. Default is timestamp in descending orderMindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(String sort, String filter) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
sort
- Order in which events are returned. Supported only on
filterable fields. Default is timestamp in descending orderfilter
- Filter parameter (JSON) encoded format
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Events getEvents(String sort, boolean history) throws MindsphereException
200 - A page of events.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases :
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
sort
- Order in which events are returned. Supported only on
filterable fields. Default is timestamp in descending orderhistory
- Optional parameter, if we want to retrieve the history of an
eventMindsphereException
- if an error occurs while attempting to invoke the
APIpublic BaseEvent getEventById(String eventId, String ifNoneMatch) throws MindsphereException
200 - OK
304 - Not Modified
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 NOT FOUND if there is no event stored in the database with the given event ID
500 - Internal Server Error
eventId
- eventId of an eventifNoneMatch
- ETag hash of previous request to allow cachingMindsphereException
- if an error occurs while attempting to invoke the
APIpublic CustomEvent getCustomEventById(String eventId, String ifNoneMatch) throws MindsphereException
MindsphereException
public CustomEvent getCustomEventById(String eventId) throws MindsphereException
MindsphereException
public MindSphereStandardEvent getStandardEventById(String eventId, String ifNoneMatch) throws MindsphereException
MindsphereException
public MindSphereStandardEvent getStandardEventById(String eventId) throws MindsphereException
MindsphereException
public BaseEvent getEventById(String eventId) throws MindsphereException
200 - OK
304 - Not Modified
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 NOT FOUND if there is no event stored in the database with the given event ID
500 - Internal Server Error
eventId
- eventId of an eventMindsphereException
- if an error occurs while attempting to invoke the
APIpublic MindSphereStandardEvent createStandardEvent(MindSphereStandardEvent standardEvent) throws MindsphereException
201 - Created
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 NOT FOUND in case the given event type does not exist
500 - Internal Server Error
standardEvent
- StandardEvent object content to be createdMindsphereException
- If an error occurs while attempting to invoke the
APIpublic MindSphereStandardEvent createStandardEvent(String standardEventJson) throws MindsphereException
201 - Created
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 NOT FOUND in case the given event type does not exist
500 - Internal Server Error
standardEventJson
- Json string format of StandardEvent event to be
createdMindsphereException
- If an error occurs while attempting to invoke the
APIpublic CustomEvent createCustomEvent(CustomEvent customEvent) throws MindsphereException
201 - Created
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 NOT FOUND in cases you can find below. - The given event type does not exist
500 - Internal Server Error
customEvent
- CustomEvent to be createdMindsphereException
- if an error occurs while attempting to invoke the
APIpublic CustomEvent createCustomEvent(String customEventJson) throws MindsphereException
201 - Created
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 NOT FOUND in cases you can find below. - The given event type does not exist
500 - Internal Server Error
customEventJson
- Json string representing CustomEvent to be createdMindsphereException
- if an error occurs while attempting to invoke the
APIpublic BaseEvent createEvent(String eventJson) throws MindsphereException
201 - Created
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 NOT FOUND in cases you can find below. - The given event type does not exist
500 - Internal Server Error
eventJson
- Json string representing event to be createdMindsphereException
- if an error occurs while attempting to invoke the
APIpublic MindSphereStandardEvent updateStandardEvent(String eventId, String standardEventJson, String ifMatch) throws MindsphereException
200 - Updated
400 - The request will return 400 BAD REQUEST in following cases: you can find
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 BAD REQUEST on attempting to update a non-existing event
409 - Conflict
412 - Precondition Failed
500 - Internal Server Error
eventId
- ID of an eventifMatch
- Used for optimistic concurrency controlstandardEventJson
- Json string representing standard Event content to
be updatedMindsphereException
- if an error occurs while attempting to invoke the
APIpublic MindSphereStandardEvent updateStandardEvent(String eventId, MindSphereStandardEvent standardEvent, String ifMatch) throws MindsphereException
200 - Updated
400 - The request will return 400 BAD REQUEST in following cases: you can find
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 BAD REQUEST on attempting to update a non-existing event
409 - Conflict
412 - Precondition Failed
500 - Internal Server Error
eventId
- ID of an eventifMatch
- Used for optimistic concurrency controlstandardEvent
- JStandard Event content to be updatedMindsphereException
- if an error occurs while attempting to invoke the
APIpublic CustomEvent updateCustomEvent(String eventId, String customEventJson, String ifMatch) throws MindsphereException
200 - Updated
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 BAD REQUEST on attempting to update a non-existing event
409 - Conflict
412 - Precondition Failed
500 - Internal Server Error
eventId
- ID of an eventifMatch
- Used for optimistic concurrency controlcustomEventJson
- Json string representing custom Event content to be
updatedMindsphereException
- if an error occurs while attempting to invoke the
APIpublic CustomEvent updateCustomEvent(String eventId, CustomEvent customEvent, String ifMatch) throws MindsphereException
200 - Updated
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 BAD REQUEST on attempting to update a non-existing event
409 - Conflict
412 - Precondition Failed
500 - Internal Server Error
eventId
- ID of an eventifMatch
- Used for optimistic concurrency controlcustomEvent
- Custom Event content to be updatedMindsphereException
- if an error occurs while attempting to invoke the
APIpublic BaseEvent updateEvents(String eventId, String eventJson, String ifMatch) throws MindsphereException
200 - Updated
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 BAD REQUEST on attempting to update a non-existing event
409 - Conflict
412 - Precondition Failed
500 - Internal Server Error
eventId
- ID of an eventifMatch
- Used for optimistic concurrency controleventJson
- Json string repesenting the event content to be updatedMindsphereException
- if an error occurs while attempting to invoke the
API