public class

FilterResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.search.FilterResource

Class Overview

Resource for searches.

Summary

Public Constructors
FilterResource(JiraAuthenticationContext authenticationContext, SearchRequestService searchRequestService, VelocityRequestContextFactory velocityRequestContextFactory, FavouritesService favouritesService, SearchService searchService, BeanBuilderFactory beanBuilderFactory, UserSharingPreferencesUtil userSharingPreferencesUtil, PermissionManager permissionsManager, UserPreferencesManager userPreferencesManager, ColumnLayoutManager columnLayoutManager, ColumnService columnService)
Public Methods
FilterBean createFilter(FilterBean bean, UriInfo uriInfo, StringList expand)
Creates a new filter, and returns newly created filter.
Response defaultColumns(Long filterId)
Returns the default columns for the given filter.
Response deleteFilter(Long id)
Delete a filter.
FilterBean editFilter(Long filterId, FilterBean bean, 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(UriInfo uriInfo, StringList expand)
Returns the favourite filters of the logged-in user.
FilterBean getFilter(Long id, UriInfo uriInfo, StringList expand)
Returns a filter given an id
Response resetColumns(Long filterId)
Resets the columns for the given filter such that the filter no longer has its own column config.
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

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

Public Methods

public FilterBean createFilter (FilterBean bean, 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

public 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

public 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

public FilterBean editFilter (Long filterId, FilterBean bean, 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

public DefaultShareScopeBean getDefaultShareScope ()

Returns the default share scope of the logged-in user.

public List<FilterBean> getFavouriteFilters (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

public FilterBean getFilter (Long id, 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

public 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

public 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

public DefaultShareScopeBean setDefaultShareScope (DefaultShareScopeBean shareScope)

Sets the default share scope of the logged-in user. Available values are GLOBAL and PRIVATE.