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

Nested Class Summary
static class FilterResource.DefaultShareScope
           
 
Constructor Summary
FilterResource(JiraAuthenticationContext authenticationContext, SearchRequestService searchRequestService, VelocityRequestContextFactory velocityRequestContextFactory, UserUtil userUtil, FavouritesService favouritesService, SearchService searchService, BeanBuilderFactory beanBuilderFactory, UserSharingPreferencesUtil userSharingPreferencesUtil, PermissionManager permissionsManager, UserPreferencesManager userPreferencesManager, FilterSubscriptionService filterSubscriptionService)
           
 
Method Summary
 FilterBean createFilter(FilterBean bean, 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
 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.
 FilterResource.DefaultShareScope 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
 FilterResource.DefaultShareScope setDefaultShareScope(FilterResource.DefaultShareScope 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,
                      UserUtil userUtil,
                      FavouritesService favouritesService,
                      SearchService searchService,
                      BeanBuilderFactory beanBuilderFactory,
                      UserSharingPreferencesUtil userSharingPreferencesUtil,
                      PermissionManager permissionsManager,
                      UserPreferencesManager userPreferencesManager,
                      FilterSubscriptionService filterSubscriptionService)
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 FilterResource.DefaultShareScope getDefaultShareScope()
Returns the default share scope of the logged-in user.

Returns:
a FilterResource.DefaultShareScope

setDefaultShareScope

public FilterResource.DefaultShareScope setDefaultShareScope(FilterResource.DefaultShareScope shareScope)
Sets the default share scope of the logged-in user.

Returns:
a FilterResource.DefaultShareScope


Copyright © 2002-2013 Atlassian. All Rights Reserved.