public abstract class Task
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Task[] |
EMPTY_ARRAY |
Constructor and Description |
---|
Task() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
protected static java.lang.String |
extractNumberFromId(java.lang.String id) |
protected static java.lang.String |
extractProjectFromId(java.lang.String id) |
abstract Comment [] |
getComments() |
abstract java.util.Date |
getCreated() |
java.lang.String |
getCustomIcon() |
abstract java.lang.String |
getDescription() |
abstract javax.swing.Icon |
getIcon() |
abstract java.lang.String |
getId()
Global unique task identifier, e.g.
|
abstract java.lang.String |
getIssueUrl() |
java.lang.String |
getNumber()
Per-project issue identifier.
|
java.lang.String |
getPresentableId() |
java.lang.String |
getPresentableName() |
java.lang.String |
getProject()
Name of the project task belongs to.
|
TaskRepository |
getRepository() |
TaskState |
getState() |
abstract java.lang.String |
getSummary()
Short task description.
|
abstract TaskType |
getType() |
abstract java.util.Date |
getUpdated() |
int |
hashCode() |
abstract boolean |
isClosed() |
abstract boolean |
isIssue() |
java.lang.String |
toString() |
public static final Task[] EMPTY_ARRAY
public abstract java.lang.String getId()
TaskRepository.extractId(String)
, because otherwise task won't be updated on its activation.
Note that this ID is used to find issues and to compare them, so (ideally) it has to be unique.
In some cases task server doesn't offer such global ID (but, for instance, pair (project-name, per-project-id) instead) or it's not
what users want to see in UI (e.g. notorious id and iid in Gitlab). In this case you should generate artificial ID
for internal usage and implement getPresentableId()
.getPresentableId()
,
TaskRepository.extractId(String)
,
TaskManager.activateTask(Task, boolean)
public java.lang.String getPresentableId()
public abstract java.lang.String getSummary()
public abstract java.lang.String getDescription()
public abstract Comment [] getComments()
public abstract javax.swing.Icon getIcon()
public abstract TaskType getType()
public abstract java.util.Date getUpdated()
public abstract java.util.Date getCreated()
public abstract boolean isClosed()
public java.lang.String getCustomIcon()
public abstract boolean isIssue()
public abstract java.lang.String getIssueUrl()
public TaskRepository getRepository()
isIssue()
public TaskState getState()
public final java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getPresentableName()
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getNumber()
getId()
,
TaskRepository.getCommitMessageFormat()
protected static java.lang.String extractNumberFromId(java.lang.String id)
public java.lang.String getProject()
getId()
,
TaskRepository.getCommitMessageFormat()
protected static java.lang.String extractProjectFromId(java.lang.String id)