@HTTPService(name="csers") public class ServerService extends java.lang.Object
SensorService| Constructor and Description |
|---|
ServerService() |
| Modifier and Type | Method and Description |
|---|---|
core.tut.pori.http.Response |
createFile(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.LongParameter backendId,
core.tut.pori.http.parameters.InputStreamParameter file)
The request is to be sent in the body of POST method.
|
core.tut.pori.http.Response |
queryTaskDetails(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.LongParameter backendId,
core.tut.pori.http.parameters.StringParameter taskId,
core.tut.pori.http.parameters.DataGroups dataGroups,
core.tut.pori.http.parameters.Limits limits)
This method can be used to retrieve the up-to-date details and progress of a previously scheduled task.
|
void |
taskFinished(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.InputStreamParameter xml)
The request is to be sent in the body of POST method.
|
public ServerService()
@HTTPServiceMethod(name="taskFinished",
acceptedMethods="POST")
public void taskFinished(@HTTPAuthenticationParameter(required=false)
core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
@HTTPMethodParameter(name="body",bodyParameter=true)
core.tut.pori.http.parameters.InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
<dataVisibility>PRIVATE</dataVisibility>
<taskIdList>
<taskId>2efd9433-f88d-4c0b-9a75-8702951dddcf</taskId>
</taskIdList>
<taskTypeList>
<taskType>gather</taskType>
</taskTypeList>
<backendList>
<backend>
<backendId>7571842206656642167</backendId>
<message>unsppoacrbmqmqhgqqshyviyszrkstjvrsadanzuoseneuafqlsukxayzdbdptag</message>
<taskStatus>ERROR</taskStatus>
</backend>
</backendList>
<callbackUri>http://example.org:8080/ApiltaService/rest/sensors/taskFinished</callbackUri>
<measurementList>
<measurement>
<backendId>7571842206656642167</backendId>
<measurementId>c4887831-d778-4ba0-8c45-3fc7df0a30af</measurementId>
</measurement>
</measurementList>
</task>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="taskFinished" service="csers"> <status>OK</status> </response>
authenticatedUser - xml - Only the result data should be in the body. See SensorTask@HTTPServiceMethod(name="queryTaskDetails",
acceptedMethods="GET")
public core.tut.pori.http.Response queryTaskDetails(@HTTPAuthenticationParameter(required=false)
core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
@HTTPMethodParameter(name="backend_id")
core.tut.pori.http.parameters.LongParameter backendId,
@HTTPMethodParameter(name="task_id")
core.tut.pori.http.parameters.StringParameter taskId,
@HTTPMethodParameter(name="data_groups",required=false)
core.tut.pori.http.parameters.DataGroups dataGroups,
@HTTPMethodParameter(name="limits",required=false)
core.tut.pori.http.parameters.Limits limits)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response method="queryTaskDetails" service="csers">
<task>
<createdTimestamp>2017-10-23T06:19:25Z</createdTimestamp>
<description>diidqlkiizlozaohwiykktoygglblfumxrwdgzhnpiniosvunqsqyrydbpialcgp</description>
<dataVisibility>LIMITED</dataVisibility>
<name>efhpfrglzanfiphgdqsvugdtwcjsvcuptnsdglyekyqdhkcrsddnmcgvlwlyiexq</name>
<taskState>ARCHIVED</taskState>
<taskIdList>
<taskId>1</taskId>
</taskIdList>
<taskTypeList>
<taskType>gather</taskType>
</taskTypeList>
<updatedTimestamp>2018-04-06T15:12:16Z</updatedTimestamp>
<userDetails>
<userId>3696882103671603276</userId>
</userDetails>
<backendList>
<backend>
<backendId>1</backendId>
</backend>
</backendList>
<callbackUri>http://example.org:8080/ApiltaService/rest/sensors/taskFinished</callbackUri>
<when>
<condition>
<terms>
<entry>
<key>edqgn</key>
<value>jsggekvile</value>
</entry>
<entry>
<key>time/validFromToRange</key>
<value>2017-08-20T02:53:45.800Z/2018-12-05T15:41:59.801Z</value>
</entry>
<entry>
<key>wjjya</key>
<value>htfaxptstw</value>
</entry>
</terms>
</condition>
<condition>
<terms>
<entry>
<key>hxoja</key>
<value>ucquhlrxkv</value>
</entry>
<entry>
<key>ksekp</key>
<value>owgbtrouht</value>
</entry>
<entry>
<key>lgukh</key>
<value>yqxlvhyifb</value>
</entry>
<entry>
<key>mjtnv</key>
<value>dqrylinfgw</value>
</entry>
<entry>
<key>time/validFromToRange</key>
<value>2018-01-25T15:18:19.801Z/2019-02-17T08:14:45.801Z</value>
</entry>
<entry>
<key>vsbhy</key>
<value>nrfqtpjvgv</value>
</entry>
</terms>
</condition>
<condition>
<terms>
<entry>
<key>roclu</key>
<value>nnmoirtyjz</value>
</entry>
<entry>
<key>time/validFromToRange</key>
<value>2017-09-04T17:35:46.801Z/2019-06-13T00:06:04.801Z</value>
</entry>
</terms>
</condition>
</when>
<what>
<output>
<feature>dpqfa</feature>
</output>
<output>
<feature>ndace</feature>
</output>
<output>
<feature>kwzhp</feature>
</output>
<output>
<feature>vyemq</feature>
</output>
</what>
</task>
<status>OK</status>
</response>
authenticatedUser - taskId - backendId - dataGroups - limits - paging limitsSensorTask@HTTPServiceMethod(name="createFile",
acceptedMethods="POST")
public core.tut.pori.http.Response createFile(@HTTPAuthenticationParameter(required=false)
core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
@HTTPMethodParameter(name="backend_id")
core.tut.pori.http.parameters.LongParameter backendId,
@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="csers">
<fileDetailsList>
<fileDetails>
<GUID>6c33fa4e-6981-490a-8efe-f102effce932</GUID>
</fileDetails>
</fileDetailsList>
<status>OK</status>
</response>
authenticatedUser - backendId - 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.