public abstract class TaskProvider
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TASK_ID_CONSENT
Task ID used by the framework for looking up the consent task
|
static java.lang.String |
TASK_ID_INITIAL
Task ID used by the framework for looking up the "initial" task
|
static java.lang.String |
TASK_ID_SIGN_IN
Task ID used by the framework for looking up the sign-in task
|
static java.lang.String |
TASK_ID_SIGN_UP
Task ID used by the framework for looking up the sign-up task
|
| Constructor and Description |
|---|
TaskProvider() |
| Modifier and Type | Method and Description |
|---|---|
abstract org.researchstack.backbone.task.Task |
get(java.lang.String taskId)
Used, in combination of
put(String, Task), for task lookup and resuse |
static TaskProvider |
getInstance()
Returns a singleton static instance of the this class
|
static void |
init(TaskProvider manager)
Initializes the TaskProvider singleton.
|
abstract void |
put(java.lang.String id,
org.researchstack.backbone.task.Task task)
Used to store a task object for reuse
|
public static final java.lang.String TASK_ID_INITIAL
public static final java.lang.String TASK_ID_CONSENT
public static final java.lang.String TASK_ID_SIGN_IN
public static final java.lang.String TASK_ID_SIGN_UP
public static void init(TaskProvider manager)
Application.onCreate() method.manager - an implementation of ResourcePathManagerpublic static TaskProvider getInstance()
public abstract org.researchstack.backbone.task.Task get(java.lang.String taskId)
put(String, Task), for task lookup and resusetaskId - the task idpublic abstract void put(java.lang.String id,
org.researchstack.backbone.task.Task task)
id - the task idtask - the task object