Class ColumnServiceImpl
java.lang.Object
com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl
- All Implemented Interfaces:
GreenHopperCache
,ColumnService
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.greenhopper.service.rapid.view.ColumnService
ColumnService.ColumnProgressMap
-
Field Summary
FieldsFields inherited from interface com.atlassian.greenhopper.service.rapid.view.ColumnService
KANBAN_BACKLOG_COLUMN_POSITION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a new column to the Rapid View.void
Invoked when all caches in the plugin need to be cleared.getAllColumns
(RapidView rapidView) Return all columns without filtering out any column (eg:KanbanBacklogColumn
still be returned when KanPlan lab is disabled)getColumnPositions
(RapidView rapidView) getColumnsByStatus
(RapidView view) List<com.atlassian.jira.issue.status.Status>
getDoneStatuses
(Column column, com.atlassian.jira.user.ApplicationUser user) Get all Done statuses from given Column and ApplicationUsergetKanbanBacklogColumn
(RapidView rapidView) Get backlog column of kanban boardSet<com.atlassian.jira.issue.status.Status>
getMappedStatuses
(RapidView view) List<com.atlassian.jira.issue.status.Status>
getOrderedStatuses
(RapidView view) Returns the statuses which are mapped to thisRapidView
in order of which they are mapped (left-most statuses are first.)getProgressStatuses
(RapidView view) Calculate the breakdown ofStatus
mapped in the view to their respectiveColumnProgress
.getValidColumns
(RapidView view) Get all columns with at least one status mapped to them.getVisibleColumns
(RapidView rapidView) Returns the visible columns, filtered out unnecessary columns (eg:KanbanBacklogColumn
when KanPlan lab is disabled)void
init()
void
invalidate
(RapidView view) boolean
isKanPlanEnabledForBoard
(RapidView rapidView) Check that the KanPlan feature is enabled, and thatRapidView
has a mapped Kanban backlog columnupdateColumns
(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, List<Column> newColumns) Update the rapid view columnsvoid
validateColumns
(RapidView rapidView, List<Column> columns, ErrorCollection errors) void
validateColumns
(List<Column> columns, ErrorCollection errors)
-
Field Details
-
log
-
-
Constructor Details
-
ColumnServiceImpl
public ColumnServiceImpl()
-
-
Method Details
-
init
@PostConstruct public void init() -
getColumn
- Specified by:
getColumn
in interfaceColumnService
-
getVisibleColumns
Description copied from interface:ColumnService
Returns the visible columns, filtered out unnecessary columns (eg:KanbanBacklogColumn
when KanPlan lab is disabled)- Specified by:
getVisibleColumns
in interfaceColumnService
- Parameters:
rapidView
- the rapid view- Returns:
- the columns
-
getAllColumns
Description copied from interface:ColumnService
Return all columns without filtering out any column (eg:KanbanBacklogColumn
still be returned when KanPlan lab is disabled)- Specified by:
getAllColumns
in interfaceColumnService
- Returns:
-
getProgressStatuses
Description copied from interface:ColumnService
Calculate the breakdown ofStatus
mapped in the view to their respectiveColumnProgress
.- Specified by:
getProgressStatuses
in interfaceColumnService
- Parameters:
view
- the view- Returns:
- the mapping of
ColumnProgress
to a set ofStatus
.
-
getMappedStatuses
- Specified by:
getMappedStatuses
in interfaceColumnService
-
getColumnsByStatus
- Specified by:
getColumnsByStatus
in interfaceColumnService
-
getDoneStatuses
@Nonnull public List<com.atlassian.jira.issue.status.Status> getDoneStatuses(Column column, com.atlassian.jira.user.ApplicationUser user) Description copied from interface:ColumnService
Get all Done statuses from given Column and ApplicationUser- Specified by:
getDoneStatuses
in interfaceColumnService
-
getValidColumns
Description copied from interface:ColumnService
Get all columns with at least one status mapped to them. The board, charts and kanban backlog should only show columns that are mapped.- Specified by:
getValidColumns
in interfaceColumnService
- Parameters:
view
- the board to get the columns from.- Returns:
- List of columns, in the order that they appear in the board.
-
isKanPlanEnabledForBoard
Description copied from interface:ColumnService
Check that the KanPlan feature is enabled, and thatRapidView
has a mapped Kanban backlog column- Specified by:
isKanPlanEnabledForBoard
in interfaceColumnService
-
getKanbanBacklogColumn
Description copied from interface:ColumnService
Get backlog column of kanban board- Specified by:
getKanbanBacklogColumn
in interfaceColumnService
-
getOrderedStatuses
Description copied from interface:ColumnService
Returns the statuses which are mapped to thisRapidView
in order of which they are mapped (left-most statuses are first.)- Specified by:
getOrderedStatuses
in interfaceColumnService
- Parameters:
view
- the rapid view- Returns:
- the statuses
-
addColumn
@Nonnull public ServiceOutcome<Column> addColumn(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, Column sourceColumn) Description copied from interface:ColumnService
Add a new column to the Rapid View. It will be added as the second-last column.- Specified by:
addColumn
in interfaceColumnService
- Parameters:
user
- the userrapidView
- the rapid viewsourceColumn
- a model of the new column- Returns:
- the newly added column
-
getColumnPositions
- Specified by:
getColumnPositions
in interfaceColumnService
-
updateColumns
public ServiceOutcome<List<Column>> updateColumns(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, List<Column> newColumns) Update the rapid view columnsneeds to be synchronized, because AO doesn't support transactions on JIRA, and this affects multiple rows / columns
- Specified by:
updateColumns
in interfaceColumnService
-
validateColumns
- Specified by:
validateColumns
in interfaceColumnService
-
validateColumns
- Specified by:
validateColumns
in interfaceColumnService
-
invalidate
- Specified by:
invalidate
in interfaceColumnService
-
flushCache
public void flushCache()Description copied from interface:GreenHopperCache
Invoked when all caches in the plugin need to be cleared.- Specified by:
flushCache
in interfaceGreenHopperCache
-