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

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

@Service
public class QuickFilterServiceImpl
extends java.lang.Object
implements QuickFilterService

Provides quick filter configuration related functionality


Field Summary
 
Fields inherited from interface com.atlassian.greenhopper.service.rapid.view.QuickFilterService
QUICK_FILTER_DESCRIPTION_ERROR_CONTEXT, QUICK_FILTER_NAME_ERROR_CONTEXT, QUICK_FILTER_QUERY_ERROR_CONTEXT
 
Constructor Summary
QuickFilterServiceImpl()
           
 
Method Summary
 ServiceOutcome<QuickFilter> add(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, QuickFilter quickFilter)
          Adds a new quick filter
 java.util.List<QuickFilter> copy(java.util.List<QuickFilter> sourceQuickFilters)
          Copies the specified quick filters
 void delete(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, long quickFilterId, ErrorCollection errors)
          Delete a single quick filter
 void flushCache()
          Invoked when all caches in the plugin need to be cleared.
 QuickFilter get(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, long quickFilterId, ErrorCollection errors)
          gets the quick filter with id quickFilterId for rapid view with rapidViewId
 void invalidate(RapidView view)
          invalidates the cache entry for a given RV, should only be called by other services.
 java.util.List<QuickFilter> loadQuickFilters(RapidView rapidView)
           
 ServiceOutcome<java.lang.Void> moveAfter(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, long quickFilterId, java.lang.Long moveToQuickFilterId)
          Moves a quick filter after another one
 ServiceOutcome<java.util.List<QuickFilter>> set(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, java.util.List<QuickFilter> quickFilters)
          Replaces all quick filters for a given rapid view with the specified quick filters (keeping the order in the list)
 QuickFilter update(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, QuickFilter quickFilter, ErrorCollection errors)
          Updates a single quick filter for the given rapidview
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuickFilterServiceImpl

public QuickFilterServiceImpl()
Method Detail

copy

public java.util.List<QuickFilter> copy(java.util.List<QuickFilter> sourceQuickFilters)
Description copied from interface: QuickFilterService
Copies the specified quick filters

Specified by:
copy in interface QuickFilterService
Parameters:
sourceQuickFilters - the quick filters to copy
Returns:
the quick filters copied

loadQuickFilters

public java.util.List<QuickFilter> loadQuickFilters(RapidView rapidView)
Specified by:
loadQuickFilters in interface QuickFilterService

get

public QuickFilter get(com.atlassian.crowd.embedded.api.User user,
                       RapidView rapidView,
                       long quickFilterId,
                       ErrorCollection errors)
Description copied from interface: QuickFilterService
gets the quick filter with id quickFilterId for rapid view with rapidViewId

Specified by:
get in interface QuickFilterService

add

@NotNull
public ServiceOutcome<QuickFilter> add(com.atlassian.crowd.embedded.api.User user,
                                               RapidView rapidView,
                                               QuickFilter quickFilter)
Adds a new quick filter

Specified by:
add in interface QuickFilterService

update

public QuickFilter update(com.atlassian.crowd.embedded.api.User user,
                          RapidView rapidView,
                          QuickFilter quickFilter,
                          ErrorCollection errors)
Description copied from interface: QuickFilterService
Updates a single quick filter for the given rapidview

Specified by:
update in interface QuickFilterService

set

@NotNull
public ServiceOutcome<java.util.List<QuickFilter>> set(com.atlassian.crowd.embedded.api.User user,
                                                               RapidView rapidView,
                                                               java.util.List<QuickFilter> quickFilters)
Description copied from interface: QuickFilterService
Replaces all quick filters for a given rapid view with the specified quick filters (keeping the order in the list)

Specified by:
set in interface QuickFilterService

delete

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

Specified by:
delete in interface QuickFilterService

moveAfter

public ServiceOutcome<java.lang.Void> moveAfter(com.atlassian.crowd.embedded.api.User user,
                                                RapidView rapidView,
                                                long quickFilterId,
                                                java.lang.Long moveToQuickFilterId)
Description copied from interface: QuickFilterService
Moves a quick filter after another one

Specified by:
moveAfter in interface QuickFilterService
Parameters:
user - the user performing the move
rapidView - the quick filter is associated with
quickFilterId - the id of the quick filter being moved
moveToQuickFilterId - the id of the quick filter to insert the quick filter after. null to insert at the beginning

invalidate

public void invalidate(RapidView view)
Description copied from interface: QuickFilterService
invalidates the cache entry for a given RV, should only be called by other services. Ideally, the cache should be in a manager which lies between the service and dao

Specified by:
invalidate in interface QuickFilterService

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.