com.atlassian.jira.rest.v2.search
Class FilterResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.search.FilterResource

public class FilterResource
extends Object

Resource for searches.

Since:
v5.0

Constructor Summary
FilterResource(JiraAuthenticationContext authenticationContext, SearchRequestService searchRequestService, VelocityRequestContextFactory velocityRequestContextFactory, FavouritesService favouritesService, SearchService searchService, BeanBuilderFactory beanBuilderFactory, UserSharingPreferencesUtil userSharingPreferencesUtil, PermissionManager permissionsManager, UserPreferencesManager userPreferencesManager, ColumnLayoutManager columnLayoutManager, ColumnService columnService)
           
 
Method Summary
 FilterBean createFilter(FilterBean bean, javax.ws.rs.core.UriInfo uriInfo, StringList expand)
          Creates a new filter, and returns newly created filter.
 javax.ws.rs.core.Response defaultColumns(Long filterId)
          Returns the default columns for the given filter.
 javax.ws.rs.core.Response deleteFilter(Long id)
          Delete a filter.
 FilterBean editFilter(Long filterId, FilterBean bean, javax.ws.rs.core.UriInfo uriInfo, StringList expand)
          Updates an existing filter, and returns its new value.
 DefaultShareScopeBean getDefaultShareScope()
          Returns the default share scope of the logged-in user.
 List<FilterBean> getFavouriteFilters(javax.ws.rs.core.UriInfo uriInfo, StringList expand)
          Returns the favourite filters of the logged-in user.
 FilterBean getFilter(Long id, javax.ws.rs.core.UriInfo uriInfo, StringList expand)
          Returns a filter given an id
 javax.ws.rs.core.Response resetColumns(Long filterId)
          Resets the columns for the given filter such that the filter no longer has its own column config.
 javax.ws.rs.core.Response setColumns(Long filterId, List<String> fields)
          Sets the default columns for the given filter.
 DefaultShareScopeBean setDefaultShareScope(DefaultShareScopeBean shareScope)
          Sets the default share scope of the logged-in user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterResource

public FilterResource(JiraAuthenticationContext authenticationContext,
                      SearchRequestService searchRequestService,
                      VelocityRequestContextFactory velocityRequestContextFactory,
                      FavouritesService favouritesService,
                      SearchService searchService,
                      BeanBuilderFactory beanBuilderFactory,
                      UserSharingPreferencesUtil userSharingPreferencesUtil,
                      PermissionManager permissionsManager,
                      UserPreferencesManager userPreferencesManager,
                      ColumnLayoutManager columnLayoutManager,
                      ColumnService columnService)
Method Detail

getFilter

public FilterBean getFilter(Long id,
                            @Context
                            javax.ws.rs.core.UriInfo uriInfo,
                            StringList expand)
Returns a filter given an id

Parameters:
id - the id of the filter being looked up
uriInfo - info needed to construct URLs.
expand - the parameters to expand
Returns:
a FilterBean

createFilter

public FilterBean createFilter(FilterBean bean,
                               @Context
                               javax.ws.rs.core.UriInfo uriInfo,
                               StringList expand)
Creates a new filter, and returns newly created filter. Currently sets permissions just using the users default sharing permissions

Parameters:
bean - the filter being created
uriInfo - info needed to construct URLs.
expand - the parameters to expand
Returns:
a FilterBean

editFilter

public FilterBean editFilter(Long filterId,
                             FilterBean bean,
                             @Context
                             javax.ws.rs.core.UriInfo uriInfo,
                             StringList expand)
Updates an existing filter, and returns its new value.

Parameters:
filterId - the id of the filter to update
bean - the filter being created
uriInfo - info needed to construct URLs.
expand - the parameters to expand
Returns:
a FilterBean

deleteFilter

public javax.ws.rs.core.Response deleteFilter(Long id)
Delete a filter.

Parameters:
id - The ID of the filter to delete.
Returns:
a 204 HTTP status if everything goes well

getFavouriteFilters

public List<FilterBean> getFavouriteFilters(@Context
                                            javax.ws.rs.core.UriInfo uriInfo,
                                            StringList expand)
Returns the favourite filters of the logged-in user.

Parameters:
uriInfo - info needed to construct URLs.
expand - the parameters to expand
Returns:
a List of FilterBean

getDefaultShareScope

public DefaultShareScopeBean getDefaultShareScope()
Returns the default share scope of the logged-in user.

Returns:
a DefaultShareScopeBean

setDefaultShareScope

public DefaultShareScopeBean setDefaultShareScope(DefaultShareScopeBean shareScope)
Sets the default share scope of the logged-in user. Available values are GLOBAL and PRIVATE.

Returns:
a DefaultShareScopeBean

defaultColumns

public javax.ws.rs.core.Response defaultColumns(Long filterId)
Returns the default columns for the given filter. Currently logged in user will be used as the user making such request.

Parameters:
filterId - id of the filter
Returns:
column configuration
Since:
v6.1

setColumns

public javax.ws.rs.core.Response setColumns(Long filterId,
                                            List<String> fields)
Sets the default columns for the given filter.

Parameters:
filterId - id of the filter
fields - list of column ids
Returns:
javax.ws.rs.core.Response containing basic message and http return code
Since:
v6.1

resetColumns

public javax.ws.rs.core.Response resetColumns(Long filterId)
Resets the columns for the given filter such that the filter no longer has its own column config.

Parameters:
filterId - id of the filter
Returns:
javax.ws.rs.core.Response containing basic message and http return code
Since:
v6.1


Copyright © 2002-2014 Atlassian. All Rights Reserved.