Class WorkItem
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
Describes an issue, a ticket, work package or some item coming from a project management tool.
- Since:
- 1.0
- Version:
- $Id$
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key identifying the assignees property of the work item.static final StringThe key identifying the closeDate property of the work item.static final StringThe key identifying the closedBy property of the work item.static final StringThe key identifying the creationDate property of the work item.static final StringThe key identifying the creator property of the work item.static final StringThe key identifying the description property of the work item.static final StringThe key identifying the dueDate property of the work item.static final StringThe key identifying the identifier property of the work item.static final StringThe key identifying the labels property of the work item.static final StringThe key identifying the milestones property of the work item.static final StringThe key identifying the priority property of the work item.static final StringThe key identifying the progress property of the work item.static final StringThe key identifying the project property of the work item.static final StringThe key identifying the reporter property of the work item.static final StringThe key identifying the resolution property of the work item.static final StringThe key identifying the resolved property of the work item.static final StringThe key identifying the startDate property of the work item.static final StringThe key identifying the status property of the work item.static final StringThe key identifying the summary property of the work item.static final StringThe key identifying the type property of the work item.static final StringThe key identifying the updateDate property of the work item. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLinkable(String key) Utility method that retrieves a linkable property.Utility method that retrieves the location of a linkable property.getLinkableValue(String key) Utility method that retrieves the value of a linkable property.getType()booleanvoidvoidsetAssignees(List<Linkable> assignees) voidsetCloseDate(Date closeDate) voidsetClosedBy(Linkable closedBy) voidsetCreationDate(Date creationDate) voidsetCreator(Linkable creator) voidsetDescription(String description) voidsetDueDate(Date dueDate) voidsetIdentifier(Linkable identifier) voidvoidsetMilestones(Linkable milestones) voidsetPriority(String priority) voidsetProgress(Integer progress) voidsetProject(Linkable project) voidsetReporter(Linkable reporter) voidsetResolution(String resolution) voidsetResolved(boolean resolved) voidsetStartDate(Date startDate) voidvoidsetSummary(Linkable summary) voidvoidsetUpdateDate(Date updateDate) Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
KEY_TYPE
The key identifying the type property of the work item.- See Also:
-
KEY_IDENTIFIER
The key identifying the identifier property of the work item.- See Also:
-
KEY_SUMMARY
The key identifying the summary property of the work item.- See Also:
-
KEY_DESCRIPTION
The key identifying the description property of the work item.- See Also:
-
KEY_START_DATE
The key identifying the startDate property of the work item.- See Also:
-
KEY_DUE_DATE
The key identifying the dueDate property of the work item.- See Also:
-
KEY_PROGRESS
The key identifying the progress property of the work item.- See Also:
-
KEY_CREATION_DATE
The key identifying the creationDate property of the work item.- See Also:
-
KEY_UPDATE_DATE
The key identifying the updateDate property of the work item.- See Also:
-
KEY_CREATOR
The key identifying the creator property of the work item.- See Also:
-
KEY_ASSIGNEES
The key identifying the assignees property of the work item.- See Also:
-
KEY_PRIORITY
The key identifying the priority property of the work item.- See Also:
-
KEY_PROJECT
The key identifying the project property of the work item.- See Also:
-
KEY_STATUS
The key identifying the status property of the work item.- See Also:
-
KEY_REPORTER
The key identifying the reporter property of the work item.- See Also:
-
KEY_RESOLUTION
The key identifying the resolution property of the work item.- See Also:
-
KEY_RESOLVED
The key identifying the resolved property of the work item.- See Also:
-
KEY_LABELS
The key identifying the labels property of the work item.- See Also:
-
KEY_CLOSE_DATE
The key identifying the closeDate property of the work item.- See Also:
-
KEY_MILESTONES
The key identifying the milestones property of the work item.- See Also:
-
KEY_CLOSED_BY
The key identifying the closedBy property of the work item.- See Also:
-
-
Constructor Details
-
WorkItem
public WorkItem()
-
-
Method Details
-
getType
- Returns:
- the type of the work item. i.e. task, bug, epic, etc.
-
setType
- Parameters:
type- seegetType().
-
getIdentifier
- Returns:
- the identifier for this work item together with a link to its location. For example, Open project and GitHub identify work packages numerically: '1001', Jira using a key: 'XWIKI-1001'.
-
setIdentifier
- Parameters:
identifier- seegetIdentifier().
-
getSummary
- Returns:
- a text summarizing this work item together with a link to its location. On some platform, this property translates to the issue title.
-
setSummary
- Parameters:
summary- seegetSummary().
-
getDescription
- Returns:
- a text that describes this work item.
-
setDescription
- Parameters:
description- seegetDescription().
-
getStartDate
- Returns:
- the date when this work item was marked, by some user/entity, as started.
-
setStartDate
- Parameters:
startDate- seegetStartDate().
-
getDueDate
- Returns:
- the date when this work item is expected to be finished, set as resolved.
-
setDueDate
- Parameters:
dueDate- seegetDueDate().
-
getProgress
- Returns:
- the progress, as a percentage, that has been done for this work item.
-
setProgress
- Parameters:
progress- seegetProgress().
-
getCreationDate
- Returns:
- the date when this work item was created.
-
setCreationDate
- Parameters:
creationDate- seegetCreationDate().
-
getUpdateDate
- Returns:
- the last date when this work item was updated or modified.
-
setUpdateDate
- Parameters:
updateDate- seegetUpdateDate().
-
getCreator
- Returns:
- a tuple identifying the creator of this work item. The tuple contains the display name of the user and a link to their profile location.
-
setCreator
- Parameters:
creator- seegetCreator().
-
getAssignees
- Returns:
- a list of users assigned to this work item. Each user is a tuple containing the display name and the location to their profile location.
-
setAssignees
- Parameters:
assignees- seegetAssignees().
-
getPriority
- Returns:
- the priority that was assigned to this work item. i.e. "minor", "critical", "major", etc.
-
setPriority
- Parameters:
priority- seegetPriority().
-
getProject
- Returns:
- a tuple identifying the project where this work item belongs. The tuple contains the display name of the project and a link to its location.
-
setProject
- Parameters:
project- seegetProject().
-
getStatus
- Returns:
- the current status of this work item.
-
setStatus
- Parameters:
status- seegetStatus().
-
getReporter
- Returns:
- a tuple representing the user thanks to whom this work item was created. If this work item represents a bug, it could be that somebody reported it and someone else created the ticket.
-
setReporter
- Parameters:
reporter- seegetReporter().
-
getResolution
- Returns:
- the resolution for this work item. A work item can be marked as resolved but it might need additional information on how it was closed. i.e. "duplicate", "won't resolve", "canceled" etc.
-
setResolution
- Parameters:
resolution- seegetResolution().
-
isResolved
public boolean isResolved()- Returns:
- denotes whether this work item is closed/resolved or not.
-
setResolved
public void setResolved(boolean resolved) - Parameters:
resolved- seeisResolved().
-
getLabels
- Returns:
- a list of labels that were assigned to this work item.
-
setLabels
- Parameters:
labels- seegetLabels().
-
getCloseDate
- Returns:
- the date when this work item was marked as closed.
-
setCloseDate
- Parameters:
closeDate- seegetCloseDate().
-
getMilestones
- Returns:
- a tuple identifying the milestone that was associated to this work item. i.e. on Github one can associate a closed issue to a software milestone, in the case of Jira, an issue can have a 'fix version'.
-
setMilestones
- Parameters:
milestones- seegetMilestones().
-
getClosedBy
- Returns:
- a tuple that identifies the user that closed this work item. The user is identified through their display name and a link to the location of their profile.
-
setClosedBy
- Parameters:
closedBy- seegetClosedBy().
-
getMapEntries
- Returns:
- the map.
-
putEntry
- Parameters:
key- the key.value- the value.
-
getLinkable
Utility method that retrieves a linkable property.- Parameters:
key- the key of the linkable property. i.e. identifier, summary.- Returns:
- the linkable property as a map or an empty map if nothing was found.
-
getLinkableValue
Utility method that retrieves the value of a linkable property.- Parameters:
key- the key of the linkable property. i.e. identifier, summary.- Returns:
- the value of the linkable property or null if the linkable property does not exist.
-
getLinkableLocation
Utility method that retrieves the location of a linkable property.- Parameters:
key- the key of the linkable property. i.e. identifier, summary.- Returns:
- the location of the linkable property or null if the linkable property does not exist.
-