public class LocalTaskImpl extends LocalTask
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_TASK_ID |
EMPTY_ARRAY
Constructor and Description |
---|
LocalTaskImpl()
for serialization
|
LocalTaskImpl(java.lang.String id,
java.lang.String summary) |
LocalTaskImpl(Task origin) |
Modifier and Type | Method and Description |
---|---|
void |
addBranch(BranchInfo info) |
void |
addChangelist(ChangeListInfo info) |
void |
addWorkItem(WorkItem workItem) |
java.util.List<BranchInfo> |
getBranches()
For serialization only.
|
java.util.List<ChangeListInfo> |
getChangeLists() |
Comment [] |
getComments() |
java.util.Date |
getCreated() |
java.lang.String |
getCustomIcon() |
java.lang.String |
getDescription() |
javax.swing.Icon |
getIcon() |
static javax.swing.Icon |
getIconFromType(TaskType type,
boolean issue) |
java.lang.String |
getId()
Global unique task identifier, e.g.
|
java.lang.String |
getIssueUrl() |
java.util.Date |
getLastPost() |
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() |
java.lang.String |
getShelfName() |
java.lang.String |
getSummary()
Short task description.
|
long |
getTimeSpentFromLastPost() |
long |
getTotalTimeSpent() |
TaskType |
getType() |
java.util.Date |
getUpdated() |
java.util.List<WorkItem> |
getWorkItems() |
boolean |
isActive() |
boolean |
isClosed() |
boolean |
isDefault() |
boolean |
isIssue() |
boolean |
isRunning() |
void |
removeBranch(BranchInfo info) |
void |
removeChangelist(ChangeListInfo info) |
void |
setActive(boolean active) |
void |
setBranches(java.util.List<BranchInfo> branches) |
void |
setChangeLists(java.util.List<ChangeListInfo> changeLists) |
void |
setClosed(boolean closed) |
void |
setCreated(java.util.Date created) |
void |
setId(java.lang.String id) |
void |
setIssue(boolean issue) |
java.lang.String |
setIssueUrl(java.lang.String url) |
void |
setLastPost(java.util.Date date) |
void |
setNumber(java.lang.String number) |
void |
setPresentableId(java.lang.String presentableId) |
void |
setProject(java.lang.String project) |
void |
setRepository(TaskRepository repository) |
void |
setRunning(boolean running) |
void |
setShelfName(java.lang.String shelfName) |
void |
setSummary(java.lang.String summary) |
void |
setType(TaskType type) |
void |
setUpdated(java.util.Date updated) |
void |
setWorkItems(java.util.List<WorkItem> workItems) |
void |
updateFromIssue(Task issue) |
getBranches
equals, extractNumberFromId, extractProjectFromId, getState, hashCode, toString
public static final java.lang.String DEFAULT_TASK_ID
public LocalTaskImpl()
public LocalTaskImpl(java.lang.String id, java.lang.String summary)
public LocalTaskImpl(Task origin)
public java.lang.String getId()
Task
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 Task.getPresentableId()
.getId
in class Task
Task.getPresentableId()
,
TaskRepository.extractId(String)
,
TaskManager.activateTask(Task, boolean)
public java.lang.String getSummary()
Task
getSummary
in class Task
public java.lang.String getDescription()
getDescription
in class Task
public Comment [] getComments()
getComments
in class Task
public java.util.Date getUpdated()
getUpdated
in class Task
public java.util.Date getCreated()
getCreated
in class Task
public boolean isActive()
public void updateFromIssue(Task issue)
updateFromIssue
in class LocalTask
public void setId(java.lang.String id)
public void setSummary(java.lang.String summary)
public boolean isIssue()
public java.lang.String getIssueUrl()
getIssueUrl
in class Task
public java.lang.String setIssueUrl(java.lang.String url)
public void setIssue(boolean issue)
public TaskRepository getRepository()
getRepository
in class Task
Task.isIssue()
public void setRepository(TaskRepository repository)
public void setCreated(java.util.Date created)
public void setUpdated(java.util.Date updated)
setUpdated
in class LocalTask
public java.util.List<ChangeListInfo> getChangeLists()
getChangeLists
in class LocalTask
public void setChangeLists(java.util.List<ChangeListInfo> changeLists)
public void addChangelist(ChangeListInfo info)
addChangelist
in class LocalTask
public void removeChangelist(ChangeListInfo info)
removeChangelist
in class LocalTask
public java.util.List<BranchInfo> getBranches()
LocalTask
getBranches
in class LocalTask
LocalTask.getBranches(boolean)
public void setBranches(java.util.List<BranchInfo> branches)
public void addBranch(BranchInfo info)
public void removeBranch(BranchInfo info)
removeBranch
in class LocalTask
public java.lang.String getShelfName()
getShelfName
in class LocalTask
public void setShelfName(java.lang.String shelfName)
setShelfName
in class LocalTask
public void setClosed(boolean closed)
public static javax.swing.Icon getIconFromType(TaskType type, boolean issue)
public void setType(TaskType type)
public java.lang.String getPresentableName()
getPresentableName
in class Task
public java.lang.String getCustomIcon()
getCustomIcon
in class Task
public long getTotalTimeSpent()
getTotalTimeSpent
in class LocalTask
public void setRunning(boolean running)
setRunning
in class LocalTask
public void setWorkItems(java.util.List<WorkItem> workItems)
setWorkItems
in class LocalTask
public java.util.List<WorkItem> getWorkItems()
getWorkItems
in class LocalTask
public void addWorkItem(WorkItem workItem)
addWorkItem
in class LocalTask
public java.util.Date getLastPost()
getLastPost
in class LocalTask
public void setLastPost(java.util.Date date)
setLastPost
in class LocalTask
public long getTimeSpentFromLastPost()
getTimeSpentFromLastPost
in class LocalTask
public java.lang.String getNumber()
Task
getNumber
in class Task
Task.getId()
,
TaskRepository.getCommitMessageFormat()
public void setNumber(java.lang.String number)
public java.lang.String getProject()
Task
getProject
in class Task
Task.getId()
,
TaskRepository.getCommitMessageFormat()
public void setProject(java.lang.String project)
public void setPresentableId(java.lang.String presentableId)
public java.lang.String getPresentableId()
getPresentableId
in class Task