public final class SensorsReferenceCore extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addTask(core.tut.pori.users.UserIdentity authenticatedUser,
SensorTask task)
reference implementation of the method for adding a task to a back end
Note: this will not call the callback URI with task finished
|
static java.lang.String |
createFile(core.tut.pori.users.UserIdentity authenticatedUser,
java.lang.Long backendId,
java.io.InputStream file) |
static java.lang.String |
createTask(core.tut.pori.users.UserIdentity authenticatedUser,
SensorTask task)
Note: this will not schedule back end calls even if the task contains back ends (is not virtual)
|
static SensorTask |
generateTaskDetails(core.tut.pori.users.UserIdentity authenticatedUser,
java.lang.Long backendId,
java.util.Collection<java.lang.String> taskIds,
java.lang.String taskType) |
static SensorTask |
generateTaskResults(core.tut.pori.users.UserIdentity authenticatedUser,
core.tut.pori.http.parameters.DataGroups dataGroups,
core.tut.pori.http.parameters.Limits limits,
java.lang.String taskId,
java.lang.String taskType) |
static MeasurementList |
generateTrafficData(core.tut.pori.http.parameters.Limits limits) |
static MeasurementList |
getMeasurements(core.tut.pori.users.UserIdentity authenticatedUser,
long[] backendIdFilter,
java.util.Set<core.tut.pori.http.parameters.DateIntervalParameter.Interval> createdFilter,
core.tut.pori.http.parameters.DataGroups dataGroups,
core.tut.pori.http.parameters.Limits limits,
java.util.List<java.lang.String> measurementIdFilter,
java.util.Collection<java.lang.String> taskIds) |
static java.lang.String |
modifyTask(core.tut.pori.users.UserIdentity authenticatedUser,
SensorTask task)
Note: this will not schedule back end calls even if the task contains back ends (is not virtual)
|
static SensorTask |
queryTaskDetails(core.tut.pori.users.UserIdentity authenticatedUser,
java.lang.Long backendId,
core.tut.pori.http.parameters.DataGroups dataGroups,
core.tut.pori.http.parameters.Limits limits,
java.util.List<java.lang.String> taskIds,
java.lang.String taskType) |
static void |
taskFinished(core.tut.pori.users.UserIdentity authenticatedUser,
SensorTask task) |
public static MeasurementList generateTrafficData(core.tut.pori.http.parameters.Limits limits)
limits
- public static SensorTask generateTaskDetails(core.tut.pori.users.UserIdentity authenticatedUser, java.lang.Long backendId, java.util.Collection<java.lang.String> taskIds, java.lang.String taskType)
authenticatedUser
- backendId
- if null, value is automatically generatedtaskIds
- optional ids, one random id will be generated if none is giventaskType
- public static SensorTask generateTaskResults(core.tut.pori.users.UserIdentity authenticatedUser, core.tut.pori.http.parameters.DataGroups dataGroups, core.tut.pori.http.parameters.Limits limits, java.lang.String taskId, java.lang.String taskType)
authenticatedUser
- dataGroups
- limits
- taskId
- taskType
- public static void addTask(core.tut.pori.users.UserIdentity authenticatedUser, SensorTask task) throws java.lang.IllegalArgumentException
authenticatedUser
- task
- java.lang.IllegalArgumentException
- on invalid taskpublic static void taskFinished(core.tut.pori.users.UserIdentity authenticatedUser, SensorTask task) throws java.lang.IllegalArgumentException
authenticatedUser
- task
- java.lang.IllegalArgumentException
- on invalid taskpublic static java.lang.String createTask(core.tut.pori.users.UserIdentity authenticatedUser, SensorTask task) throws java.lang.IllegalArgumentException
authenticatedUser
- task
- java.lang.IllegalArgumentException
- on invalid taskpublic static java.lang.String modifyTask(core.tut.pori.users.UserIdentity authenticatedUser, SensorTask task) throws java.lang.IllegalArgumentException
authenticatedUser
- task
- java.lang.IllegalArgumentException
- on invalid taskpublic static java.lang.String createFile(core.tut.pori.users.UserIdentity authenticatedUser, java.lang.Long backendId, java.io.InputStream file) throws java.lang.IllegalArgumentException
authenticatedUser
- backendId
- file
- the contents of the file are simply iterated as raw byte data (all content is discarded)java.lang.IllegalArgumentException
- on bad datapublic static MeasurementList getMeasurements(core.tut.pori.users.UserIdentity authenticatedUser, long[] backendIdFilter, java.util.Set<core.tut.pori.http.parameters.DateIntervalParameter.Interval> createdFilter, core.tut.pori.http.parameters.DataGroups dataGroups, core.tut.pori.http.parameters.Limits limits, java.util.List<java.lang.String> measurementIdFilter, java.util.Collection<java.lang.String> taskIds)
authenticatedUser
- backendIdFilter
- createdFilter
- dataGroups
- limits
- measurementIdFilter
- taskIds
- public static SensorTask queryTaskDetails(core.tut.pori.users.UserIdentity authenticatedUser, java.lang.Long backendId, core.tut.pori.http.parameters.DataGroups dataGroups, core.tut.pori.http.parameters.Limits limits, java.util.List<java.lang.String> taskIds, java.lang.String taskType)
authenticatedUser
- backendId
- dataGroups
- limits
- taskIds
- taskType
- Copyright © 2015-2018 Tampere University of Technology, Pori Department.