|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.web.action.util.sharing.SharedEntitySearchViewHelper<E>
public abstract class SharedEntitySearchViewHelper<E extends SharedEntity>
A class that makes searching for Shared Entities easier.
Nested Class Summary | |
---|---|
static class |
SharedEntitySearchViewHelper.SearchResult<E>
Represents a page of results of the search. |
static class |
SharedEntitySearchViewHelper.SortColumn
Container for sorting constants. |
Constructor Summary | |
---|---|
SharedEntitySearchViewHelper(ShareTypeFactory shareTypeFactory,
JiraAuthenticationContext authCtx,
String applicationContext,
String actionUrlPrefix,
String viewParameter,
String viewValue,
SharedEntity.TypeDescriptor entityType)
|
Method Summary | |
---|---|
protected StringBuffer |
addParameter(StringBuffer url,
String key,
Object value)
|
protected StringBuffer |
createBasicUrlSearchParams()
Creates the basic URL parameters needed to keep the current search state. |
protected abstract SharedEntitySearchResult<E> |
doExecuteSearch(JiraServiceContext ctx,
SharedEntitySearchParameters searchParameters,
int pageOffset,
int pageWidth)
Execute the search for the passed parameters. |
String |
generateSortCssClass(String sortColumnName)
Return the CSS class(es) to display the passed column's sort status. |
String |
generateSortIcon(String sortColumnName)
Return the HTML for the sort icon used to display the sort order for the passed column. |
String |
generateSortUrl(String sortColumnName)
Return the URL that can be used to sort by the passed column. |
abstract SharedEntitySearchContext |
getEntitySearchContext()
|
String |
getGroupShare()
|
Long |
getPagingOffset()
|
List<E> |
getPopularFilters(JiraServiceContext jiraServiceContext)
Gets the filters which have been made favourite by the most people. |
String |
getProjectShare()
|
String |
getRoleShare()
|
String |
getSearchName()
|
String |
getSearchOwnerUserName()
|
String |
getSearchShareType()
|
String |
getSearchShareTypeJSON()
Produces a JSON representation of the current form state. |
List<ShareTypeRendererBean> |
getShareTypeRendererBeans()
Returns the ShareTypeRendererBeans used by the front end to render each type of
sharing that a filter could have. |
String |
getSortColumn()
|
boolean |
isSortAscending()
|
SharedEntitySearchViewHelper.SearchResult<E> |
search(JiraServiceContext jiraServiceContext)
Performs the search for filters based on the configured state. |
void |
setGroupShare(String groupShare)
|
void |
setPagingOffset(Long pagingOffset)
|
void |
setProjectShare(String projectShare)
|
void |
setRoleShare(String roleShare)
|
void |
setSearchName(String searchName)
|
void |
setSearchOwnerUserName(String searchOwnerUserName)
|
void |
setSearchShareType(String searchShareType)
|
void |
setSortAscending(boolean sortAscending)
|
void |
setSortColumn(String sortColumn)
|
protected abstract boolean |
validateSearchParameters(JiraServiceContext ctx,
SharedEntitySearchParameters searchParameters,
int pageOffset,
int pageWidth)
Ensure that it is possible to execute a search with the passed parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SharedEntitySearchViewHelper(ShareTypeFactory shareTypeFactory, JiraAuthenticationContext authCtx, String applicationContext, String actionUrlPrefix, String viewParameter, String viewValue, SharedEntity.TypeDescriptor entityType)
Method Detail |
---|
public String getSearchName()
public void setSearchName(String searchName)
public String getSearchOwnerUserName()
public void setSearchOwnerUserName(String searchOwnerUserName)
public String getSearchShareType()
public void setSearchShareType(String searchShareType)
public void setGroupShare(String groupShare)
public String getGroupShare()
public Long getPagingOffset()
public void setProjectShare(String projectShare)
public String getProjectShare()
public void setRoleShare(String roleShare)
public String getRoleShare()
public void setPagingOffset(Long pagingOffset)
public String getSortColumn()
public void setSortColumn(String sortColumn)
public boolean isSortAscending()
public void setSortAscending(boolean sortAscending)
public abstract SharedEntitySearchContext getEntitySearchContext()
public List<ShareTypeRendererBean> getShareTypeRendererBeans()
ShareTypeRendererBeans
used by the front end to render each type of
sharing that a filter could have. Does lazy initialisation so it's performant to call multiple times in a view. Is only used by the search
form.
ShareTypes
.public String generateSortUrl(String sortColumnName)
sortColumnName
- the column to sort by.
public String generateSortIcon(String sortColumnName)
sortColumnName
- the name of the column
public String generateSortCssClass(String sortColumnName)
sortColumnName
- the column to get the classes for.
public SharedEntitySearchViewHelper.SearchResult<E> search(JiraServiceContext jiraServiceContext)
jiraServiceContext
- the service context to use for performing the search with the underlying service.
public List<E> getPopularFilters(JiraServiceContext jiraServiceContext)
jiraServiceContext
- the service context to use for performing the search.
SharedEntity
objects.public String getSearchShareTypeJSON()
protected StringBuffer createBasicUrlSearchParams()
protected StringBuffer addParameter(StringBuffer url, String key, Object value)
protected abstract SharedEntitySearchResult<E> doExecuteSearch(JiraServiceContext ctx, SharedEntitySearchParameters searchParameters, int pageOffset, int pageWidth)
ctx
- the context to execute the search under.searchParameters
- the parameters for the search.pageOffset
- the offset of the search result page to return.pageWidth
- the width of a search result page.
protected abstract boolean validateSearchParameters(JiraServiceContext ctx, SharedEntitySearchParameters searchParameters, int pageOffset, int pageWidth)
ctx
- the context to execute the search under.searchParameters
- the parameters for the search.pageOffset
- the offset of the search result page to return.pageWidth
- the width of a search result page.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |