|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.task.MockTaskDescriptor<V>
public class MockTaskDescriptor<V>
| Constructor Summary | |
|---|---|
MockTaskDescriptor()
|
|
| Method Summary | |
|---|---|
void |
clear()
|
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. |
Date |
getFinishedTimestamp()
Return the date when the task was finished. |
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. |
Long |
getTaskId()
Reuturn the identifier for this task. |
TaskProgressIndicator |
getTaskProgressIndicator()
Return the TaskProgressIndicator associated with the task. |
com.atlassian.crowd.embedded.api.User |
getUser()
Return the user that started to task. |
boolean |
isFinished()
Tells if caller if the task has finished running or not. |
boolean |
isStarted()
True if the task has been started. |
void |
setDescription(String description)
|
void |
setElapsedRunTime(long elapsedRunTime)
|
void |
setFinishedTime(Date finishedTime)
|
void |
setResult(V result)
|
void |
setStartedTime(Date startedTime)
|
void |
setSubmittedTime(Date submittedTime)
|
void |
setTaskContext(TaskContext taskContext)
|
void |
setTaskId(Long taskId)
|
void |
setTaskProgressIndicator(TaskProgressIndicator taskProgressIndicator)
|
void |
setUser(com.atlassian.crowd.embedded.api.User user)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockTaskDescriptor()
| Method Detail |
|---|
public void clear()
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 Date getFinishedTimestamp()
TaskDescriptor
getFinishedTimestamp in interface TaskDescriptor<V>null will be returned if the task has not finished
executing.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 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 String getProgressURL()
TaskDescriptorTaskContext.
getProgressURL in interface TaskDescriptor<V>null cannot be returned.public TaskProgressIndicator getTaskProgressIndicator()
TaskDescriptorTaskProgressIndicator associated with the task. A task will only have an indictator if its
callable implements the ProvidesTaskProgress interface.
getTaskProgressIndicator in interface TaskDescriptor<V>TaskProgressIndicator associated with the task or null if there isn't one.public void setResult(V result)
public void setSubmittedTime(Date submittedTime)
public void setStartedTime(Date startedTime)
public void setFinishedTime(Date finishedTime)
public void setTaskProgressIndicator(TaskProgressIndicator taskProgressIndicator)
public void setDescription(String description)
public void setTaskId(Long taskId)
public void setElapsedRunTime(long elapsedRunTime)
public void setTaskContext(TaskContext taskContext)
public void setUser(com.atlassian.crowd.embedded.api.User user)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||