com.atlassian.greenhopper.service.rapid.view
Class ColumnServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.global.AbstractLoggable
      extended by com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl
All Implemented Interfaces:
GreenHopperCache, ColumnService

@Service
public class ColumnServiceImpl
extends AbstractLoggable
implements ColumnService


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.greenhopper.service.rapid.view.ColumnService
ColumnService.ColumnProgressMap
 
Field Summary
 
Fields inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logger
 
Constructor Summary
ColumnServiceImpl()
           
 
Method Summary
 ServiceOutcome<Column> addColumn(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, Column sourceColumn)
          Add a new column to the Rapid View.
 void flushCache()
          Invoked when all caches in the plugin need to be cleared.
 ServiceOutcome<Column> getColumn(java.lang.Long id)
           
 java.util.Map<Column,java.lang.Integer> getColumnPositions(RapidView rapidView)
           
 java.util.List<Column> getColumns(RapidView rapidView)
          Returns the columns, in order, of this RapidView.
 java.util.Map<com.atlassian.jira.issue.status.Status,Column> getColumnsByStatus(RapidView view)
           
 java.util.Set<com.atlassian.jira.issue.status.Status> getMappedStatuses(RapidView view)
           
 java.util.List<com.atlassian.jira.issue.status.Status> getOrderedStatuses(RapidView view)
          Returns the statuses which are mapped to this RapidView in order of which they are mapped (left-most statuses are first.)
 ColumnService.ColumnProgressMap getProgressStatuses(RapidView view)
          Calculate the breakdown of Status mapped in the view to their respective ColumnProgress.
 java.util.List<Column> getValidColumns(RapidView view)
           
 void invalidate(RapidView view)
           
 ServiceOutcome<java.util.List<Column>> updateColumns(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, java.util.List<Column> newColumns)
          Update the rapid view columns needs to be synchronized, because AO doesn't support transactions on JIRA, and this affects multiple rows / columns
 void validateColumns(java.util.List<Column> columns, ErrorCollection errors)
           
 
Methods inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logDebug, logError, logException, logInfo, logTrace, logWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnServiceImpl

public ColumnServiceImpl()
Method Detail

getColumn

public ServiceOutcome<Column> getColumn(java.lang.Long id)
Specified by:
getColumn in interface ColumnService

getColumns

public java.util.List<Column> getColumns(RapidView rapidView)
Description copied from interface: ColumnService
Returns the columns, in order, of this RapidView.

Specified by:
getColumns in interface ColumnService
Parameters:
rapidView - the rapid view
Returns:
the columns

getProgressStatuses

public ColumnService.ColumnProgressMap getProgressStatuses(RapidView view)
Description copied from interface: ColumnService
Calculate the breakdown of Status mapped in the view to their respective ColumnProgress.

Specified by:
getProgressStatuses in interface ColumnService
Parameters:
view - the view
Returns:
the mapping of ColumnProgress to a set of Status.

getMappedStatuses

public java.util.Set<com.atlassian.jira.issue.status.Status> getMappedStatuses(RapidView view)
Specified by:
getMappedStatuses in interface ColumnService

getColumnsByStatus

public java.util.Map<com.atlassian.jira.issue.status.Status,Column> getColumnsByStatus(RapidView view)
Specified by:
getColumnsByStatus in interface ColumnService

getValidColumns

public java.util.List<Column> getValidColumns(RapidView view)
Specified by:
getValidColumns in interface ColumnService

getOrderedStatuses

public java.util.List<com.atlassian.jira.issue.status.Status> getOrderedStatuses(RapidView view)
Description copied from interface: ColumnService
Returns the statuses which are mapped to this RapidView in order of which they are mapped (left-most statuses are first.)

Specified by:
getOrderedStatuses in interface ColumnService
Parameters:
view - the rapid view
Returns:
the statuses

addColumn

public ServiceOutcome<Column> addColumn(com.atlassian.crowd.embedded.api.User 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 interface ColumnService
Parameters:
user - the user
rapidView - the rapid view
sourceColumn - a model of the new column
Returns:
the newly added column

getColumnPositions

public java.util.Map<Column,java.lang.Integer> getColumnPositions(RapidView rapidView)
Specified by:
getColumnPositions in interface ColumnService

updateColumns

public ServiceOutcome<java.util.List<Column>> updateColumns(com.atlassian.crowd.embedded.api.User user,
                                                            RapidView rapidView,
                                                            java.util.List<Column> newColumns)
Update the rapid view columns needs to be synchronized, because AO doesn't support transactions on JIRA, and this affects multiple rows / columns

Specified by:
updateColumns in interface ColumnService

validateColumns

public void validateColumns(java.util.List<Column> columns,
                            ErrorCollection errors)
Specified by:
validateColumns in interface ColumnService

invalidate

public void invalidate(RapidView view)
Specified by:
invalidate in interface ColumnService

flushCache

public void flushCache()
Description copied from interface: GreenHopperCache
Invoked when all caches in the plugin need to be cleared.

Specified by:
flushCache in interface GreenHopperCache


Copyright © 2007-2012 Atlassian. All Rights Reserved.