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

java.lang.Object
  extended by com.atlassian.greenhopper.service.rapid.view.SwimlaneServiceImpl
All Implemented Interfaces:
GreenHopperCache, SwimlaneService

@Service
public class SwimlaneServiceImpl
extends java.lang.Object
implements SwimlaneService

Provides swimlanes configuration related functionality


Field Summary
 
Fields inherited from interface com.atlassian.greenhopper.service.rapid.view.SwimlaneService
SWIMLANE_DEFAULT_LANE_ERROR_CONTEXT, SWIMLANE_DESCRIPTION_ERROR_CONTEXT, SWIMLANE_NAME_ERROR_CONTEXT, SWIMLANE_QUERY_ERROR_CONTEXT
 
Constructor Summary
SwimlaneServiceImpl()
           
 
Method Summary
 ServiceOutcome<Swimlane> add(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, Swimlane swimlane)
          Adds a new swimlane
 void delete(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, long swimlaneId, ErrorCollection errors)
          Delete a single swimlane
 void flushCache()
          Invoked when all caches in the plugin need to be cleared.
 Swimlane get(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, long swimlaneId, ErrorCollection errors)
          Get a swimlane given its id
 java.util.Set<SwimlaneStrategy> getValidStrategies()
          Get all valid strategies
 void invalidate(RapidView rapidView)
           
 java.util.List<Swimlane> loadSwimlanes(RapidView rapidView)
           
 ServiceOutcome<java.lang.Void> moveAfter(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, long swimlaneId, java.lang.Long moveToSwimlaneId)
          Moves a swimlane before another one
 ServiceOutcome<java.util.List<Swimlane>> replace(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, java.util.List<Swimlane> swimlanes)
          Replaces all swimlanes for a given rapid view with the specified swimlanes (keeping the order in the list).
 Swimlane update(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, Swimlane swimlane, ErrorCollection errors)
          Updates a single swimlane for a given rapidView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwimlaneServiceImpl

public SwimlaneServiceImpl()
Method Detail

getValidStrategies

public java.util.Set<SwimlaneStrategy> getValidStrategies()
Description copied from interface: SwimlaneService
Get all valid strategies

Specified by:
getValidStrategies in interface SwimlaneService

loadSwimlanes

public java.util.List<Swimlane> loadSwimlanes(RapidView rapidView)
Specified by:
loadSwimlanes in interface SwimlaneService

get

public Swimlane get(com.atlassian.crowd.embedded.api.User user,
                    RapidView rapidView,
                    long swimlaneId,
                    ErrorCollection errors)
Description copied from interface: SwimlaneService
Get a swimlane given its id

Specified by:
get in interface SwimlaneService

add

public ServiceOutcome<Swimlane> add(com.atlassian.crowd.embedded.api.User user,
                                    RapidView rapidView,
                                    Swimlane swimlane)
Adds a new swimlane

Specified by:
add in interface SwimlaneService

update

public Swimlane update(com.atlassian.crowd.embedded.api.User user,
                       RapidView rapidView,
                       Swimlane swimlane,
                       ErrorCollection errors)
Updates a single swimlane for a given rapidView

Specified by:
update in interface SwimlaneService

replace

@NotNull
public ServiceOutcome<java.util.List<Swimlane>> replace(com.atlassian.crowd.embedded.api.User user,
                                                                RapidView rapidView,
                                                                java.util.List<Swimlane> swimlanes)
Description copied from interface: SwimlaneService
Replaces all swimlanes for a given rapid view with the specified swimlanes (keeping the order in the list). The default swimlane must be contained in the list of swimlanes, otherwise an error is returned.

Specified by:
replace in interface SwimlaneService

delete

public void delete(com.atlassian.crowd.embedded.api.User user,
                   RapidView rapidView,
                   long swimlaneId,
                   ErrorCollection errors)
Delete a single swimlane

Specified by:
delete in interface SwimlaneService

moveAfter

public ServiceOutcome<java.lang.Void> moveAfter(com.atlassian.crowd.embedded.api.User user,
                                                RapidView rapidView,
                                                long swimlaneId,
                                                java.lang.Long moveToSwimlaneId)
Moves a swimlane before another one

Specified by:
moveAfter in interface SwimlaneService
Parameters:
user - the user doing the move
rapidView - the swimlane is associated with
swimlaneId - the id of the swimlane being moved
moveToSwimlaneId - the id of the swimlane to move the target swimlane after. If null moves the swimlane to the start
Returns:
whether or not the move was successful

invalidate

public void invalidate(RapidView rapidView)
Specified by:
invalidate in interface SwimlaneService

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-2013 Atlassian. All Rights Reserved.