|
| Task (Task.TYPE taskType, JSONObject target, JSONObject value, STATUS status, double startDate, double endDate, String description, Coach.TYPE coachType) |
|
| Task (TaskDescription taskD) |
|
void | setValue (JSONObject value) |
|
void | setTaskType (Task.TYPE taskType) |
|
void | setTarget (JSONObject target) |
|
void | setStatus (STATUS status) |
|
void | setStartDate (double startDate) |
|
void | setEndDate (double endDate) |
|
void | setDescription (String description) |
|
void | setCoachType (Coach.TYPE coachType) |
|
nl.sense_os.cortex.coaching.Task.Task |
( |
JSONObject |
task | ) |
|
Construct Message from JSONObject
This function constructs a Message from a JSONObject.
The JSONObject should contain the data members as key-value pair
- Parameters
-
task | The Message represented as a JSONObject |
Coach.TYPE nl.sense_os.cortex.coaching.Task.getCoachType |
( |
| ) |
|
Get Coach.Type of the Task
Get the Coach.Type of the Task
- Returns
- The end date in epoch seconds
String nl.sense_os.cortex.coaching.Task.getDescription |
( |
| ) |
|
static Task nl.sense_os.cortex.coaching.Task.getDummyTask |
( |
| ) |
|
|
static |
double nl.sense_os.cortex.coaching.Task.getEndDate |
( |
| ) |
|
Get the Task end date
Get the end date of the Task
- Returns
- The end date in epoch seconds
List<Message> nl.sense_os.cortex.coaching.Task.getMessages |
( |
| ) |
|
Get the Task Messages
Get all the Messages associated with this Task.
The list will contain the Messages from this Task.TYPE with a triggerTime which lies between the Task startDate and endDate.
- Returns
- A list with Messages
double nl.sense_os.cortex.coaching.Task.getStartDate |
( |
| ) |
|
Get the Task start date
Get the start date of the Task
- Returns
- The start date in epoch seconds
STATUS nl.sense_os.cortex.coaching.Task.getStatus |
( |
| ) |
|
Get the Task status
Get the current Task.STATUS value of the task.
The Task.STATUS can be:
UNKNOWN: status is not known
IN_PROGRESS: the Task is currently active
SUCCEEDED: the Task was succeeded
FAILED: the Task has failed
- Returns
- The status of the Task
JSONObject nl.sense_os.cortex.coaching.Task.getTarget |
( |
| ) |
|
Get Task target value
Get the target value of the Task.
The returning JSONObject has one key: "value".
value: can contain any of the possible JSON values, but is often a double.
The JSONObject will be null if there is no value.
@return The target value JSONObject
Task.TYPE nl.sense_os.cortex.coaching.Task.getTaskType |
( |
| ) |
|
JSONObject nl.sense_os.cortex.coaching.Task.getValue |
( |
| ) |
|
Get the Task value
Get the current value of the Task.
The returning JSONObject has two keys: "value" and "date".
value: can contain any of the possible JSON values, but is often a double.
date: the date of the value in epoch time seconds.
The JSONObject will be null if there is no current value.
- Returns
- The task value JSONObject
void nl.sense_os.cortex.coaching.Task.setValueManually |
( |
JSONObject |
value | ) |
|
Set the value manually
This will override the current value and finishes the task based on the input value to failed or succeeded.
- Parameters
-
value | The json structured value. Should contain the fields: value:json, date:double |
void nl.sense_os.cortex.coaching.Task.setValueManually |
( |
double |
value | ) |
|
Set the value manually
This will override the current value and finishes the task based on the input value to failed or succeeded.
- Parameters
-
value | The new double value of the task, The current time will be used for this value. |
JSONObject nl.sense_os.cortex.coaching.Task.toJSONObject |
( |
| ) |
|
Get the JSONObject representation
Converts the Task into a JSONObject
- Returns
- The JSONObject representation
String nl.sense_os.cortex.coaching.Task.toString |
( |
| ) |
|
The JSON String representation
Returns an indented JSON formated String representation of the Task
- Returns
- The JSON formated String representation
The documentation for this class was generated from the following file:
- android-sdk/src/nl/sense_os/cortex/coaching/Task.java