|
||||||||||
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.opensymphony.user.User currentUser)
|
Method Summary | |
---|---|
java.lang.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. |
java.lang.Throwable |
getExceptionCause()
|
java.util.Date |
getFinishedTimestamp()
Return the date when the task was finished. |
java.lang.String |
getFormattedElapsedRunTime()
|
java.lang.String |
getFormattedExceptionCause()
|
java.lang.String |
getFormattedFinishedTimestamp()
|
java.lang.String |
getFormattedProgress()
|
java.lang.String |
getFormattedStartedTimestamp()
|
java.lang.String |
getFormattedSubmittedTimestamp()
|
long |
getInverseProgressNumber()
|
TaskProgressEvent |
getLastProgressEvent()
|
long |
getProgressNumber()
Returns a number between 0 and 100 and caters for lack of progress and finished tasks. |
java.lang.String |
getProgressURL()
Returns the URL that displays progress on this task. |
V |
getResult()
This returns the result of the long running task. |
java.util.Date |
getStartedTimestamp()
Return the date when the task was started. |
java.util.Date |
getSubmittedTimestamp()
Return the date when the task was submitted. |
TaskContext |
getTaskContext()
Return he context of task. |
TaskDescriptor |
getTaskDescriptor()
|
java.lang.Long |
getTaskId()
Reuturn the identifier for this task. |
TaskProgressIndicator |
getTaskProgressIndicator()
We dont re-expose this. |
com.opensymphony.user.User |
getUser()
Return the user that started to task. |
java.lang.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(java.lang.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.opensymphony.user.User currentUser)
Method Detail |
---|
public TaskDescriptor getTaskDescriptor()
public java.lang.String getFormattedElapsedRunTime()
public V getResult() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
TaskDescriptor
getResult
in interface TaskDescriptor<V>
java.util.concurrent.ExecutionException
- if an uncaught exception is thrown from the task's callable.
java.lang.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 java.lang.Long getTaskId()
TaskDescriptor
getTaskId
in interface TaskDescriptor<V>
public java.util.Date getStartedTimestamp()
TaskDescriptor
getStartedTimestamp
in interface TaskDescriptor<V>
null
will be returned if the task has not started executing.public java.lang.String getFormattedStartedTimestamp()
public java.util.Date getFinishedTimestamp()
TaskDescriptor
getFinishedTimestamp
in interface TaskDescriptor<V>
null
will be returned if the task has not finished
executing.public java.lang.String getFormattedFinishedTimestamp()
public java.util.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 java.lang.String getFormattedSubmittedTimestamp()
public long getElapsedRunTime()
TaskDescriptor
getElapsedRunTime
in interface TaskDescriptor<V>
public com.opensymphony.user.User getUser()
TaskDescriptor
getUser
in interface TaskDescriptor<V>
public java.lang.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 java.lang.String getFormattedProgress()
public long getProgressNumber()
public long getInverseProgressNumber()
public void setExceptionCause(java.lang.Throwable cause)
public java.lang.Throwable getExceptionCause()
public java.lang.String getFormattedExceptionCause()
public boolean isUserWhoStartedTask()
public java.lang.String getProgressURL()
TaskDescriptor
TaskContext
.
getProgressURL
in interface TaskDescriptor<V>
null
cannot be returned.public java.lang.String getUserURL()
public TaskProgressEvent getLastProgressEvent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |