com.atlassian.jira.web.action.util
Class SearchRequestDisplayBean

java.lang.Object
  extended by com.atlassian.jira.web.action.util.SearchRequestDisplayBean
All Implemented Interfaces:
SharesListHelper

public class SearchRequestDisplayBean
extends java.lang.Object
implements SharesListHelper

Utility class for displaying a search request. Does a lot of the calculations that need to be done. E.g. is it a favourite, how many issues it contains, how many subscriptions.

Since:
v3.13

Nested Class Summary
static class SearchRequestDisplayBean.Factory
           
 
Constructor Summary
SearchRequestDisplayBean(JiraAuthenticationContext authCtx, SearchRequest request, SearchProvider searchProvider, FavouritesService favouriteService, PermissionManager permissionManager, FilterSubscriptionService subscriptionService, ShareTypeFactory shareTypeFactory, UserFormatManager userFormatManager)
           
 
Method Summary
 boolean canEditColumns()
          Is it possible to edit columns in this version of JIRA
 boolean canShare()
          Is it possible to share filters
 long getAlternateFavouriteCount()
          How many times has this filter been favourited altered by by wether it will disabled or enabled
 java.lang.String getDescription()
           
 java.lang.Long getFavouriteCount()
          How many times has this filter been favourited
 java.lang.Long getId()
          Return the ID of the entity that owns the shares.
 long getIssueCount()
          How many user visible issues does this filter match?
 java.lang.String getName()
           
 java.lang.String getOwnerFullName()
           
 java.lang.String getOwnerUserName()
           
 java.util.Collection<SharePermission> getSharePermissions()
          Returns the share permissions associated with the entity.
 java.lang.String getShareView(SharePermission sharePermission)
          Return HTML view of the current sharing status of the filter.
 java.lang.String getSimpleDescription(SharePermission sharePermission)
          Return a simple description of the passed in permission.
 long getSubscriptionCount()
          How many subscriptions does this filter have? Only counts those subscriptions a user can see.
 boolean isCurrentOwner()
           
 boolean isFavourite()
          Is this filter a favourite of the current user
 boolean isPrivate()
          Is this filter privately shared?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchRequestDisplayBean

public SearchRequestDisplayBean(JiraAuthenticationContext authCtx,
                                SearchRequest request,
                                SearchProvider searchProvider,
                                FavouritesService favouriteService,
                                PermissionManager permissionManager,
                                FilterSubscriptionService subscriptionService,
                                ShareTypeFactory shareTypeFactory,
                                UserFormatManager userFormatManager)
Method Detail

getId

public java.lang.Long getId()
Description copied from interface: SharesListHelper
Return the ID of the entity that owns the shares. Needs to be unique on a page.

Specified by:
getId in interface SharesListHelper
Returns:
the ID of the entity that owns the shared. Needs to be unique on a page.

getOwnerUserName

public java.lang.String getOwnerUserName()

getOwnerFullName

public java.lang.String getOwnerFullName()

getName

public java.lang.String getName()

isCurrentOwner

public boolean isCurrentOwner()

getDescription

public java.lang.String getDescription()

getIssueCount

public long getIssueCount()
How many user visible issues does this filter match?

Returns:
the number of user visible issues that this filter matches

getSubscriptionCount

public long getSubscriptionCount()
How many subscriptions does this filter have? Only counts those subscriptions a user can see.

Returns:
The number of subscriptions for this filter

isPrivate

public boolean isPrivate()
Is this filter privately shared?

Specified by:
isPrivate in interface SharesListHelper
Returns:
true if the filter has privacy set to Private, else false

isFavourite

public boolean isFavourite()
Is this filter a favourite of the current user

Returns:
true if the user has favourited this filter, else false

getFavouriteCount

public java.lang.Long getFavouriteCount()
How many times has this filter been favourited

Returns:
the count of favourites of this issue

getAlternateFavouriteCount

public long getAlternateFavouriteCount()
How many times has this filter been favourited altered by by wether it will disabled or enabled

Returns:
the count of favourites of this issue ltered by by wether it will disabled or enabled

canShare

public boolean canShare()
Is it possible to share filters

Returns:
true if it is Enterprise or Professional and the current user has the Share permission

canEditColumns

public boolean canEditColumns()
Is it possible to edit columns in this version of JIRA

Returns:
true if it is possible (it is an Enterprise or Professional instance), else false

getSharePermissions

public java.util.Collection<SharePermission> getSharePermissions()
Description copied from interface: SharesListHelper
Returns the share permissions associated with the entity.

Specified by:
getSharePermissions in interface SharesListHelper
Returns:
a collection of shares associated with the entity.

getShareView

public java.lang.String getShareView(SharePermission sharePermission)
Return HTML view of the current sharing status of the filter.

Parameters:
sharePermission - the permision to generate HTML for.
Returns:
html view of the current sharing state.

getSimpleDescription

public java.lang.String getSimpleDescription(SharePermission sharePermission)
Return a simple description of the passed in permission.

Parameters:
sharePermission - The permission to describe.
Returns:
a simple description of the passed in permission.


Copyright © 2002-2011 Atlassian. All Rights Reserved.