public abstract class BaseBackgroundTaskDisplay extends Object implements BackgroundTaskDisplay
| Modifier and Type | Field and Description |
|---|---|
protected BackgroundTask |
backgroundTask |
protected BackgroundTaskStatus |
backgroundTaskStatus |
protected static int |
PERCENTAGE_MAX |
protected static int |
PERCENTAGE_MIN |
protected static int |
PERCENTAGE_NONE |
| Constructor and Description |
|---|
BaseBackgroundTaskDisplay(BackgroundTask backgroundTask) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
getBackgroundTaskStatusAttributeLong(String attributeKey) |
protected String |
getBackgroundTaskStatusAttributeString(String attributeKey) |
abstract int |
getPercentage() |
int |
getStatus() |
String |
getStatusLabel() |
String |
getStatusLabel(Locale locale) |
protected JSONObject |
getStatusMessageJSONObject(Locale locale) |
protected abstract TemplateResource |
getTemplateResource() |
protected abstract Map<String,Object> |
getTemplateVars() |
protected boolean |
hasBackgroundTaskStatus() |
boolean |
hasPercentage() |
String |
renderDisplayTemplate() |
String |
renderDisplayTemplate(Locale locale) |
protected JSONArray |
translateJSON(JSONArray jsonArray,
Locale locale) |
protected JSONObject |
translateJSON(JSONObject jsonObject,
Locale locale) |
protected static final int PERCENTAGE_MAX
protected static final int PERCENTAGE_MIN
protected static final int PERCENTAGE_NONE
protected final BackgroundTask backgroundTask
protected final BackgroundTaskStatus backgroundTaskStatus
public BaseBackgroundTaskDisplay(BackgroundTask backgroundTask)
public abstract int getPercentage()
getPercentage in interface BackgroundTaskDisplaypublic int getStatus()
getStatus in interface BackgroundTaskDisplaypublic String getStatusLabel()
getStatusLabel in interface BackgroundTaskDisplaypublic String getStatusLabel(Locale locale)
getStatusLabel in interface BackgroundTaskDisplaypublic boolean hasPercentage()
hasPercentage in interface BackgroundTaskDisplaypublic String renderDisplayTemplate()
renderDisplayTemplate in interface BackgroundTaskDisplaypublic String renderDisplayTemplate(Locale locale)
renderDisplayTemplate in interface BackgroundTaskDisplayprotected long getBackgroundTaskStatusAttributeLong(String attributeKey)
protected String getBackgroundTaskStatusAttributeString(String attributeKey)
protected JSONObject getStatusMessageJSONObject(Locale locale)
protected abstract TemplateResource getTemplateResource()
protected boolean hasBackgroundTaskStatus()
protected JSONObject translateJSON(JSONObject jsonObject, Locale locale)