Liferay 7.0-ce-b4

com.liferay.portal.kernel.backgroundtask.display
Class BaseBackgroundTaskDisplay

java.lang.Object
  extended by com.liferay.portal.kernel.backgroundtask.display.BaseBackgroundTaskDisplay
All Implemented Interfaces:
BackgroundTaskDisplay, Serializable

public abstract class BaseBackgroundTaskDisplay
extends Object
implements BackgroundTaskDisplay

See Also:
Serialized Form

Field Summary
protected  BackgroundTask backgroundTask
           
protected  BackgroundTaskStatus backgroundTaskStatus
           
protected static int PERCENTAGE_MAX
           
protected static int PERCENTAGE_MIN
           
protected static int PERCENTAGE_NONE
           
 
Constructor Summary
BaseBackgroundTaskDisplay(BackgroundTask backgroundTask)
           
 
Method Summary
protected  long getBackgroundTaskStatusAttributeLong(String attributeKey)
           
protected  String getBackgroundTaskStatusAttributeString(String attributeKey)
           
abstract  int getPercentage()
           
 int getStatus()
           
 String getStatusLabel()
           
 String getStatusLabel(Locale locale)
           
 String getStatusMessage()
           
 String getStatusMessage(Locale locale)
           
protected  JSONObject getStatusMessageJSONObject(Locale locale)
           
protected abstract  String getStatusMessageKey()
           
protected abstract  TemplateResource getTemplateResource()
           
protected abstract  Map<String,Object> getTemplateVars()
           
protected  boolean hasBackgroundTaskStatus()
           
 boolean hasPercentage()
           
protected  JSONArray translateJSON(JSONArray jsonArray, Locale locale)
           
protected  JSONObject translateJSON(JSONObject jsonObject, Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERCENTAGE_MAX

protected static final int PERCENTAGE_MAX
See Also:
Constant Field Values

PERCENTAGE_MIN

protected static final int PERCENTAGE_MIN
See Also:
Constant Field Values

PERCENTAGE_NONE

protected static final int PERCENTAGE_NONE
See Also:
Constant Field Values

backgroundTask

protected final BackgroundTask backgroundTask

backgroundTaskStatus

protected final BackgroundTaskStatus backgroundTaskStatus
Constructor Detail

BaseBackgroundTaskDisplay

public BaseBackgroundTaskDisplay(BackgroundTask backgroundTask)
Method Detail

getPercentage

public abstract int getPercentage()
Specified by:
getPercentage in interface BackgroundTaskDisplay

getStatus

public int getStatus()
Specified by:
getStatus in interface BackgroundTaskDisplay

getStatusLabel

public String getStatusLabel()
Specified by:
getStatusLabel in interface BackgroundTaskDisplay

getStatusLabel

public String getStatusLabel(Locale locale)
Specified by:
getStatusLabel in interface BackgroundTaskDisplay

getStatusMessage

public String getStatusMessage()
Specified by:
getStatusMessage in interface BackgroundTaskDisplay

getStatusMessage

public String getStatusMessage(Locale locale)
Specified by:
getStatusMessage in interface BackgroundTaskDisplay

hasPercentage

public boolean hasPercentage()
Specified by:
hasPercentage in interface BackgroundTaskDisplay

getBackgroundTaskStatusAttributeLong

protected long getBackgroundTaskStatusAttributeLong(String attributeKey)

getBackgroundTaskStatusAttributeString

protected String getBackgroundTaskStatusAttributeString(String attributeKey)

getStatusMessageJSONObject

protected JSONObject getStatusMessageJSONObject(Locale locale)

getStatusMessageKey

protected abstract String getStatusMessageKey()

getTemplateResource

protected abstract TemplateResource getTemplateResource()

getTemplateVars

protected abstract Map<String,Object> getTemplateVars()

hasBackgroundTaskStatus

protected boolean hasBackgroundTaskStatus()

translateJSON

protected JSONArray translateJSON(JSONArray jsonArray,
                                  Locale locale)

translateJSON

protected JSONObject translateJSON(JSONObject jsonObject,
                                   Locale locale)

Liferay 7.0-ce-b4