@RestController @Generated(value="com.github.davidmoten:openapi-codegen-runtime:0.1.5") public class ServiceController extends Object implements ControllerExceptionHandler
| Constructor and Description |
|---|
ServiceController(Service service) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<?> |
cancelMsi(String id)
This is a logical delete of a broadcast in that it
prevents future broadcasts happening for this msiId
(be it a single or repeating broadcast).
|
org.springframework.http.ResponseEntity<?> |
createMsi(MsiContent requestBody)
Submits message content and returns a unique id (across all
users) that is to be used in the send method.
|
org.springframework.http.ResponseEntity<?> |
getMsi(String id)
Returns the details of an MSI broadcast using the unique MSI identifier.
|
org.springframework.http.ResponseEntity<?> |
getMsis(Optional<OffsetDateTime> startTimeMin,
boolean startTimeMinInclusive,
Optional<OffsetDateTime> startTimeMax,
boolean startTimeMaxInclusive,
Optional<OffsetDateTime> endTimeMin,
Optional<Boolean> endTimeMinInclusive,
Optional<OffsetDateTime> endTimeMax,
boolean endTimeMaxInclusive,
int limit,
Optional<List<String>> status,
Optional<String> broadcastType,
Optional<String> continuationToken)
Returns Maritime Safety Information broadcasts requested to
be sent by the user.
|
org.springframework.http.ResponseEntity<?> |
getMsiStatus(String id)
Returns the status of an MSI broadcast using the unique MSI identifier.
|
org.springframework.http.ResponseEntity<?> |
getToken(AuthenticationRequestBody requestBody)
Obtains a token that will be passed in a request header to calls
to other paths on this API for authentication and authorization
purposes.
|
org.springframework.http.ResponseEntity<?> |
sendMsi(String id)
Requests that an existing unsent MSI be sent.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleBadRequestExceptionpublic ServiceController(@Autowired(required=false)
Service service)
@RequestMapping(method=POST,
value="/authenticate",
consumes="application/json",
produces="application/json")
public org.springframework.http.ResponseEntity<?> getToken(@RequestBody
AuthenticationRequestBody requestBody)
Obtains a token that will be passed in a request header to calls to other paths on this API for authentication and authorization purposes.
[status=200, application/json] --> AuthenticationResponse
[status=400, application/json] --> Error
[status=401, application/json] --> Error
[status=500, application/json] --> Error
requestBody - requestBody@RequestMapping(method=GET,
value="/msi",
produces="application/json")
public org.springframework.http.ResponseEntity<?> getMsis(@RequestParam(name="startTimeMin",required=false)
Optional<OffsetDateTime> startTimeMin,
@RequestParam(name="startTimeMinInclusive",defaultValue="true",required=false)
boolean startTimeMinInclusive,
@RequestParam(name="startTimeMax",required=false)
Optional<OffsetDateTime> startTimeMax,
@RequestParam(name="startTimeMaxInclusive",defaultValue="true",required=false)
boolean startTimeMaxInclusive,
@RequestParam(name="endTimeMin",required=false)
Optional<OffsetDateTime> endTimeMin,
@RequestParam(name="endTimeMinInclusive",required=false)
Optional<Boolean> endTimeMinInclusive,
@RequestParam(name="endTimeMax",required=false)
Optional<OffsetDateTime> endTimeMax,
@RequestParam(name="endTimeMaxInclusive",defaultValue="true",required=false)
boolean endTimeMaxInclusive,
@RequestParam(name="limit",defaultValue="10",required=false)
int limit,
@RequestParam(name="status",required=false)
Optional<List<String>> status,
@RequestParam(name="broadcastType",required=false)
Optional<String> broadcastType,
@RequestParam(name="continuationToken",required=false)
Optional<String> continuationToken)
Returns Maritime Safety Information broadcasts requested to be sent by the user.
Note that none of the parameters are required. If no parameters are supplied then all MSIs for the current user will be returned (paged).
The limit field may not be honoured exactly by the server
side (in that it might exceed a maximum limit of the server).
The results of this query may return in any order and that order may vary in repeated calls (for example, the returned MSIs may not be ordered by timestamp). If the client requires an ordering by time then all pages should be requested and then sorted client-side. TODO confirm expectations
[status=200, application/json] --> GetMsis200Response
[status=400, application/json] --> Error
[status=401, application/json] --> Error
[status=403, application/json] --> Error
[status=500, application/json] --> Error
endTimeMaxInclusive - If endTimeMaxInclusive is true (the default value if not specified)
then filters MSIs on endTime <= endTimeMax.
If endTimeMaxInclusive is false then filters MSIs
on endTime < endTimeMax.
If endTimeMaxInclusive not specified then has no effect.endTimeMax - If endTimeMaxInclusive is true (the default value if not specified)
then filters MSIs on endTime <= endTimeMax.
If endTimeMaxInclusive is false then filters MSIs
on endTime < endTimeMax.endTimeMin - If endTimeMinInclusive is true (the default value if not specified)
then filters MSIs on startTime >= startTimeMin.
If startTimeMinInclusive is false then filters MSIs
on startTime > startTimeMin.limit - Requests that at most `limit` MSIs are returned in the call.
The server may cap the requested `limit` (fewer items may be
returned). To request the next page available include the
returned `continuationToken` in the next call. If there are
no more items available then the response will not contain
a `continuationToken`.startTimeMin - If startTimeMinInclusive is true (the default value if not specified)
then filters MSIs on startTime >= startTimeMin.
If startTimeMinInclusive is false then filters MSIs
on startTime > startTimeMin.startTimeMinInclusive - If startTimeMinInclusive is true (the default value if not specified)
then filters MSIs on startTime >= startTimeMin.
If startTimeMinInclusive is false then filters MSIs
on startTime > startTimeMin.
If startTimeMinInclusive not specified then has no effect.endTimeMinInclusive - If endTimeMinInclusive is true (the default value if not specified)
then filters MSIs on endTime >= endTimeMin.
If endTimeMinInclusive is false then filters MSIs
on endTime > endTimeMin.
If endTimeMinInclusive not specified then has no effect.broadcastType - the type of broadcaststartTimeMax - If startTimeMaxInclusive is true (the default value if not specified)
then filters MSIs on startTime <= startTimeMax.
If startTimeMaxInclusive is false then filters MSIs
on startTime < startTimeMax.continuationToken - Describes to the server the starting point of
the next page of results and is obtained from
the current page. May contain an offset if desired
but is at the discretion of implementer. Note that
it is possible that a call specifying a continuation
token may return en empty list (but an empty list return
should not have a continuation token on it so at
that point paging would stop).status - Only MSIs that have a status in the given list
are returned. If the list is empty (or the parameter
is not present) then no filtering on status occurs.
TODO** support multi-status filtering or just one?startTimeMaxInclusive - If startTimeMaxInclusive is true (the default value if not specified)
then filters MSIs on startTime <= startTimeMax.
If startTimeMaxInclusive is false then filters MSIs
on startTime < startTimeMax.
If startTimeMaxInclusive not specified then has no effect.@RequestMapping(method=POST,
value="/msi",
consumes="application/json",
produces="application/json")
public org.springframework.http.ResponseEntity<?> createMsi(@RequestBody
MsiContent requestBody)
Submits message content and returns a unique id (across all users) that is to be used in the send method. It is ok for a message to never be sent but the provider should have the freedom to clean up (delete) unsent messages after some reasonable period or after more than N unsent messages are created. (TODO ask providers what is reasonable minimum period and maximum number of unsent messages so it can be documented here).
[status=201, application/json] --> MsiId
[status=400, application/json] --> Error
[status=401, application/json] --> Error
[status=403, application/json] --> Error
[status=500, application/json] --> Error
requestBody - requestBody@RequestMapping(method=GET,
value="/msi/{id}",
produces="application/json")
public org.springframework.http.ResponseEntity<?> getMsi(@PathVariable(name="id",required=true)
String id)
Returns the details of an MSI broadcast using the unique MSI identifier.
[status=200, application/json] --> Msi
[status=400, application/json] --> Error
[status=401, application/json] --> Error
[status=403, application/json] --> Error
[status=404, application/json] --> Error
[status=500, application/json] --> Error
id - unique msi identifier@RequestMapping(method=PUT,
value="/msi/{id}")
public org.springframework.http.ResponseEntity<?> sendMsi(@PathVariable(name="id",required=true)
String id)
Requests that an existing unsent MSI be sent. If the MSI has already been sent or the MSI has been cancelled then nothing occurs (this method is idempotent).
[status=400, application/json] --> Error
[status=401, application/json] --> Error
[status=403, application/json] --> Error
[status=404, application/json] --> Error
[status=500, application/json] --> Error
id - unique msi identifier@RequestMapping(method=DELETE,
value="/msi/{id}")
public org.springframework.http.ResponseEntity<?> cancelMsi(@PathVariable(name="id",required=true)
String id)
This is a logical delete of a broadcast in that it prevents future broadcasts happening for this msiId (be it a single or repeating broadcast). Once cancelled an MSI cannot be resent. However, the broadcast details are still available to be queried.
[status=400, application/json] --> Error
[status=401, application/json] --> Error
[status=403, application/json] --> Error
[status=404, application/json] --> Error
[status=500, application/json] --> Error
id - unique msi identifier@RequestMapping(method=GET,
value="/msi/{id}/status",
produces="application/json")
public org.springframework.http.ResponseEntity<?> getMsiStatus(@PathVariable(name="id",required=true)
String id)
Returns the status of an MSI broadcast using the unique MSI identifier.
[status=200, application/json] --> Status
[status=400, application/json] --> Error
[status=401, application/json] --> Error
[status=403, application/json] --> Error
[status=404, application/json] --> Error
[status=500, application/json] --> Error
id - unique msi identifierCopyright © 2023. All rights reserved.