@HTTPService(name="arc") public class ClientService extends java.lang.Object
AlertService
Constructor and Description |
---|
ClientService() |
Modifier and Type | Method and Description |
---|---|
core.tut.pori.http.Response |
addAlert(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.LongParameter alertGroupId,
core.tut.pori.http.parameters.InputStreamParameter xml)
The request is to be sent in the body of POST method.
|
core.tut.pori.http.Response |
createFile(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.InputStreamParameter file)
The request is to be sent in the body of POST method.
|
core.tut.pori.http.Response |
getAlerts(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.LongParameter alertGroupIdFilter,
core.tut.pori.http.parameters.StringParameter alertTypeFilter,
core.tut.pori.http.parameters.DateIntervalParameter createdFilter,
core.tut.pori.http.parameters.DataGroups dataGroups,
LocationParameter location,
core.tut.pori.http.parameters.DoubleParameter range,
core.tut.pori.http.parameters.Limits limits)
This method can be used to retrieve alerts based on the given filters
|
public ClientService()
@HTTPServiceMethod(name="getAlerts", acceptedMethods="GET") public core.tut.pori.http.Response getAlerts(@HTTPAuthenticationParameter(required=false) core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="alert_group_id",required=false) core.tut.pori.http.parameters.LongParameter alertGroupIdFilter, @HTTPMethodParameter(name="alert_type",required=false) core.tut.pori.http.parameters.StringParameter alertTypeFilter, @HTTPMethodParameter(name="created",required=false) core.tut.pori.http.parameters.DateIntervalParameter createdFilter, @HTTPMethodParameter(name="data_groups",required=false) core.tut.pori.http.parameters.DataGroups dataGroups, @HTTPMethodParameter(name="location",required=false) LocationParameter location, @HTTPMethodParameter(name="range",required=false) core.tut.pori.http.parameters.DoubleParameter range, @HTTPMethodParameter(name="limits",required=false) core.tut.pori.http.parameters.Limits limits)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="getAlerts" service="arc"> <alertList> <alert> <alertId>378b0772-669b-4c08-b286-f657182c1dba</alertId> <alertType>oshwjsfrpqtcbxogpmhedfvquagxutxukthckjywahvgmfigqefeomjjseigklni</alertType> <createdTimestamp>2005-01-13T15:55:53Z</createdTimestamp> <description>ewwugcbgltinpkxqzwwnuybikvvrqcbbnyibfrkpvnlzzrqsjprapxgdvqqoimgt</description> <location> <latitude>-68.2445607113265</latitude> <longitude>-141.71581448416953</longitude> </location> <range>100</range> <userDetails> <userId>572246864936509794</userId> </userDetails> <validTimestamp>2018-07-13T10:36:15Z</validTimestamp> </alert> </alertList> <status>OK</status> </response>Either alertGroupIdFilter or location must be given. Range cannot be given without location.
authenticatedUser
- alertGroupIdFilter
- alertTypeFilter
- createdFilter
- dataGroups
- valid groups are (default) and . The basic group does not contain file details or other optional elements.location
- range
- in km, if not given, the default range is used (Definitions.DEFAULT_RANGE
)limits
- AlertList
@HTTPServiceMethod(name="addAlert", acceptedMethods="POST") public core.tut.pori.http.Response addAlert(@HTTPAuthenticationParameter(required=false) core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="alert_group_id") core.tut.pori.http.parameters.LongParameter alertGroupId, @HTTPMethodParameter(name="body",bodyParameter=true) core.tut.pori.http.parameters.InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <alert> <alertId>c4294d63-0e67-4215-a6d1-e61c0a163e5e</alertId> <alertType>qhhbewvmgfyyzfqmytggndqvzjxkhpvctecqhjgojfmnzoahawzpbvdlxbndsoik</alertType> <createdTimestamp>2010-09-07T15:28:59Z</createdTimestamp> <description>glupibtroeantfvfhnpmvpruiycrywsstauljetqjgkrijnjpifoeabzihthxbxf</description> <location> <latitude>-70.95959516020636</latitude> <longitude>75.06199012349992</longitude> </location> <range>100</range> <userDetails> <userId>5212399957979175871</userId> </userDetails> <validTimestamp>2018-07-13T10:36:15Z</validTimestamp> </alert>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="addAlert" service="arc"> <alertList> <alert> <alertId>bd72adfb-1901-480d-86bd-86d003d88d6d</alertId> </alert> </alertList> <status>OK</status> </response>
@HTTPServiceMethod(name="createFile", acceptedMethods="POST") public core.tut.pori.http.Response createFile(@HTTPAuthenticationParameter(required=false) core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="body",bodyParameter=true) core.tut.pori.http.parameters.InputStreamParameter file)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="createFile" service="arc"> <fileDetailsList> <fileDetails> <GUID>5211eafd-a64b-466f-8013-230333f4052f</GUID> </fileDetails> </fileDetailsList> <status>OK</status> </response>
authenticatedUser
- file
- only the file contents should be in the body.FileDetailsList
with identifier for the generated fileCopyright © 2015-2018 Tampere University of Technology, Pori Department.