|
||||||||||
| 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 extends Serializable>
| 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. |
String |
getUserName()
Return the user that started to task. |
boolean |
isCancellable()
Returns whether this supports requests to cancel it. |
boolean |
isCancelled()
Returns whether cancellation of task has been requested. |
boolean |
isFinished()
Tells if caller if the task has finished running or not. |
boolean |
isStarted()
True if the task has been started. |
void |
setCancelled(boolean cancelled)
Set flag to indicate this task has been cancelled; |
void |
setDescription(String description)
|
void |
setElapsedRunTime(long elapsedRunTime)
|
void |
setFinishedTime(Date finishedTime)
|
void |
setResult(V result)
Store the result in the descriptor. |
void |
setStartedTime(Date startedTime)
|
void |
setSubmittedTime(Date submittedTime)
|
void |
setTaskContext(TaskContext taskContext)
|
void |
setTaskId(Long taskId)
|
void |
setTaskProgressIndicator(TaskProgressIndicator taskProgressIndicator)
|
void |
setUserName(String userName)
|
| 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()
TaskDescriptor
getResult in interface TaskDescriptor<V extends Serializable>public boolean isStarted()
TaskDescriptor
isStarted in interface TaskDescriptor<V extends Serializable>public boolean isFinished()
TaskDescriptor
isFinished in interface TaskDescriptor<V extends Serializable>public Long getTaskId()
TaskDescriptor
getTaskId in interface TaskDescriptor<V extends Serializable>public Date getStartedTimestamp()
TaskDescriptor
getStartedTimestamp in interface TaskDescriptor<V extends Serializable>null will be returned if the task has not started executing.public Date getFinishedTimestamp()
TaskDescriptor
getFinishedTimestamp in interface TaskDescriptor<V extends Serializable>null will be returned if the task has not finished
executing.public Date getSubmittedTimestamp()
TaskDescriptor
getSubmittedTimestamp in interface TaskDescriptor<V extends Serializable>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 extends Serializable>public String getUserName()
TaskDescriptor
getUserName in interface TaskDescriptor<V extends Serializable>public String getDescription()
TaskDescriptor
getDescription in interface TaskDescriptor<V extends Serializable>public TaskContext getTaskContext()
TaskDescriptor
getTaskContext in interface TaskDescriptor<V extends Serializable>null as a task must always
have a context.public String getProgressURL()
TaskDescriptorTaskContext.
getProgressURL in interface TaskDescriptor<V extends Serializable>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 extends Serializable>TaskProgressIndicator associated with the task or null if there isn't one.public void setResult(V result)
TaskDescriptor
setResult in interface TaskDescriptor<V extends Serializable>result - The Resultpublic 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 setUserName(String userName)
public boolean isCancelled()
TaskDescriptor
isCancelled in interface TaskDescriptor<V extends Serializable>true if cancellation has been requested,
and false otherwisepublic void setCancelled(boolean cancelled)
TaskDescriptor
setCancelled in interface TaskDescriptor<V extends Serializable>cancelled - Cancelled flagpublic boolean isCancellable()
TaskDescriptor
isCancellable in interface TaskDescriptor<V extends Serializable>true if cancellation is supported,
and false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||