|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.web.bean.TaskDescriptorBean<V>
public class TaskDescriptorBean<V>
A UI styler bean to help format up a TaskDescriptor
.
Constructor Summary | |
---|---|
TaskDescriptorBean(TaskDescriptor<V> taskDescriptor,
I18nHelper i18nHelper,
OutlookDateManager outlookDateManager,
com.atlassian.crowd.embedded.api.User currentUser)
|
Method Summary | |
---|---|
String |
getDescription()
Return the description of the task passed when it was created. |
long |
getElapsedRunTime()
This returns number of milliseconds the task has been running for. |
Throwable |
getExceptionCause()
|
Date |
getFinishedTimestamp()
Return the date when the task was finished. |
String |
getFormattedElapsedRunTime()
|
String |
getFormattedExceptionCause()
|
String |
getFormattedFinishedTimestamp()
|
String |
getFormattedProgress()
|
String |
getFormattedStartedTimestamp()
|
String |
getFormattedSubmittedTimestamp()
|
long |
getInverseProgressNumber()
|
TaskProgressEvent |
getLastProgressEvent()
|
long |
getProgressNumber()
Returns a number between 0 and 100 and caters for lack of progress and finished tasks. |
String |
getProgressURL()
Returns the URL that displays progress on this task. |
V |
getResult()
This returns the result of the long running task. |
Date |
getStartedTimestamp()
Return the date when the task was started. |
Date |
getSubmittedTimestamp()
Return the date when the task was submitted. |
TaskContext |
getTaskContext()
Return he context of task. |
TaskDescriptor |
getTaskDescriptor()
|
Long |
getTaskId()
Reuturn the identifier for this task. |
TaskProgressIndicator |
getTaskProgressIndicator()
We dont re-expose this. |
com.atlassian.crowd.embedded.api.User |
getUser()
Return the user that started to task. |
String |
getUserURL()
|
boolean |
isFinished()
Tells if caller if the task has finished running or not. |
boolean |
isStarted()
True if the task has been started. |
boolean |
isUserWhoStartedTask()
|
void |
setExceptionCause(Throwable cause)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskDescriptorBean(TaskDescriptor<V> taskDescriptor, I18nHelper i18nHelper, OutlookDateManager outlookDateManager, com.atlassian.crowd.embedded.api.User currentUser)
Method Detail |
---|
public TaskDescriptor getTaskDescriptor()
public String getFormattedElapsedRunTime()
public V getResult() throws ExecutionException, InterruptedException
TaskDescriptor
getResult
in interface TaskDescriptor<V>
ExecutionException
- if an uncaught exception is thrown from the task's callable.
InterruptedException
- if the calling thread is interrupted while waiting for the result.public boolean isStarted()
TaskDescriptor
isStarted
in interface TaskDescriptor<V>
public boolean isFinished()
TaskDescriptor
isFinished
in interface TaskDescriptor<V>
public Long getTaskId()
TaskDescriptor
getTaskId
in interface TaskDescriptor<V>
public Date getStartedTimestamp()
TaskDescriptor
getStartedTimestamp
in interface TaskDescriptor<V>
null
will be returned if the task has not started executing.public String getFormattedStartedTimestamp()
public Date getFinishedTimestamp()
TaskDescriptor
getFinishedTimestamp
in interface TaskDescriptor<V>
null
will be returned if the task has not finished
executing.public String getFormattedFinishedTimestamp()
public Date getSubmittedTimestamp()
TaskDescriptor
getSubmittedTimestamp
in interface TaskDescriptor<V>
TaskManager
. A null
value will never be returned as the task will always have a submission time.public String getFormattedSubmittedTimestamp()
public long getElapsedRunTime()
TaskDescriptor
getElapsedRunTime
in interface TaskDescriptor<V>
public com.atlassian.crowd.embedded.api.User getUser()
TaskDescriptor
getUser
in interface TaskDescriptor<V>
public String getDescription()
TaskDescriptor
getDescription
in interface TaskDescriptor<V>
public TaskContext getTaskContext()
TaskDescriptor
getTaskContext
in interface TaskDescriptor<V>
null
as a task must always
have a context.public TaskProgressIndicator getTaskProgressIndicator()
getTaskProgressIndicator
in interface TaskDescriptor<V>
public String getFormattedProgress()
public long getProgressNumber()
public long getInverseProgressNumber()
public void setExceptionCause(Throwable cause)
public Throwable getExceptionCause()
public String getFormattedExceptionCause()
public boolean isUserWhoStartedTask()
public String getProgressURL()
TaskDescriptor
TaskContext
.
getProgressURL
in interface TaskDescriptor<V>
null
cannot be returned.public String getUserURL()
public TaskProgressEvent getLastProgressEvent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |