public class EventTypeClient extends MindsphereAPIClient
| Modifier and Type | Class and Description |
|---|---|
static class |
EventTypeClient.ClientBuilder |
MindsphereAPIClient.Builder<T extends MindsphereAPIClient.Builder<T>>credentials, restClientConfig, restTemplate| Modifier | Constructor and Description |
|---|---|
protected |
EventTypeClient(EventTypeClient.ClientBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
EventType |
addNewFieldToEventType(String eventTypeId,
String ifMatch,
Field field)
Updates an Event type of specified ID by adding a new field
|
static EventTypeClient.ClientBuilder |
builder() |
EventType |
createEventType(EventType eventType)
Creates an Event Type with the provided content.
|
EventTypes |
getEventTypes()
Lists all Event types based on the request parameters
|
EventTypes |
getEventTypes(Integer page,
Integer size)
Lists all Event types based on the request parameters
|
EventTypes |
getEventTypes(Integer page,
Integer size,
String sort,
String filter,
String ifNoneMatch)
Lists all Event types based on the request parameters
|
EventTypes |
getEventTypes(String sort,
String filter)
Lists all Event types based on the request parameters
|
EventType |
getEventTypesById(String eventTypeId)
Get an Event Type of the requested ID
|
EventType |
getEventTypesById(String eventTypeId,
String ifNoneMatch)
Get an Event Type of the requested ID
|
EventType |
updateEventType(String eventTypeId,
String ifMatch,
EventTypePatch eventTypePatch)
Updates an Event type of specified ID by only sending the changed content
|
protected EventTypeClient(EventTypeClient.ClientBuilder builder)
public static EventTypeClient.ClientBuilder builder()
public EventTypes getEventTypes(Integer page, Integer size, String sort, String filter, String ifNoneMatch) throws MindsphereException
200 - A page of event types.
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. Event types can be
filtered by fields - id, name, owner, scopesort - Order in which event types are returned. Supported only on
filterable fields. Default is by name in ascending orderifNoneMatch - ETag hash of previous request to allow cachingMindsphereException - if an error occurs while attempting to invoke the APIpublic EventTypes getEventTypes() throws MindsphereException
200 - A page of event types.
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 EventTypes getEventTypes(Integer page, Integer size) throws MindsphereException
200 - A page of event types.
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 EventTypes getEventTypes(String sort, String filter) throws MindsphereException
200 - A page of event types.
304 - Not Modified
400 - The request will return 400 BAD REQUEST in following cases:
401 - Unauthorized
403 - Forbidden
500 - Internal Server Error
filter - Filter parameter (JSON) encoded format. Event types can be
filtered by fields - id, name, owner, scopesort - Order in which event types are returned. Supported only on
filterable fields. Default is by name in ascending orderMindsphereException - if an error occurs while attempting to invoke the APIpublic EventType getEventTypesById(String eventTypeId, String ifNoneMatch) throws MindsphereException
200 - OK
304 - Not Modified
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 BAD REQUEST in cases you can find below. - There is no event type stored in the database with the given event type ID
500 - Internal Server Error
eventTypeId - ID of an event typeifNoneMatch - ETag hash of previous request to allow cachingMindsphereException - if an error occurs while attempting to invoke the APIpublic EventType getEventTypesById(String eventTypeId) throws MindsphereException
200 - OK
304 - Not Modified
401 - Unauthorized
403 - Forbidden
404 - The request will return 404 BAD REQUEST in cases you can find below. - There is no event type stored in the database with the given event type ID
500 - Internal Server Error
eventTypeId - ID of an event typeMindsphereException - if an error occurs while attempting to invoke the APIpublic EventType createEventType(EventType eventType) throws MindsphereException
Default 'parentId' is 'BaseEvent'
Default 'ttl' value is 35
Default 'scope' is LOCAL
Default 'filterable' value for a field is false
Default 'required' value for a field is false
Default 'updatable' value for a field is true
201 - Created
400 - The request will return 400 BAD REQUEST in following cases
401 - Unauthorized
403 - Forbidden
409 - Conflict. An event type already exists with the given name
500 - Internal Server Error
eventType - Event type content to be createdMindsphereException - if an error occurs while attempting to invoke the APIpublic EventType updateEventType(String eventTypeId, String ifMatch, EventTypePatch eventTypePatch) throws MindsphereException
200 - OK
400 - The request will return 400 BAD REQUEST in cases you violate any of the below circumstances.
401 - Unauthorized
403 - The user does not have the right permission
404 - The request will return 404 BAD REQUEST if attempted to update non-existing event type
409 - The request will return 409 CONFLICT if there is Concurrent modification of the same event type
412 - Precondition Failed
500 - Internal Server Error
eventTypeId - ID of an event typeifMatch - Used for optimistic concurrency controleventTypePatch - New value for the given attribute or the field, that should be applied, depending on the *op* value.
Possible Structures:
MindsphereException - if an error occurs while attempting to invoke the APIpublic EventType addNewFieldToEventType(String eventTypeId, String ifMatch, Field field) throws MindsphereException
200 - OK
400 - The request will return 400 BAD REQUEST in cases you violate any of the below circumstances.
401 - Unauthorized
403 - The user does not have the right permission
404 - The request will return 404 BAD REQUEST if attempted to update non-existing event type
409 - The request will return 409 CONFLICT if there is Concurrent modification of the same event type
412 - Precondition Failed
500 - Internal Server Error
eventTypeId - ID of an event typeifMatch - Used for optimistic concurrency controlfield - New Field that has to be added to the Event TypeMindsphereException - if an error occurs while attempting to invoke the API