Package com.atlassian.jira.issue.search
Class SearchContextImpl
java.lang.Object
com.atlassian.jira.issue.search.SearchContextImpl
- All Implemented Interfaces:
SearchContext
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanGets the search context as a list ofIssueContextobjectsIssue ids as StringsReturns issue types objects in this SearchContextReturns selected category IDs.Project ids as Longs.Returns project objects in this SearchContextReturns the single Project for this SearchContext.inthashCode()booleanReturns true if no specific issue types have been selectedbooleanReturns whether the context is global or not.booleanReturns true if there is exactly one Project in this SearchContext.toString()voidverify()Verifies that all issue types and projects in the context actually still exists.
-
Constructor Details
-
SearchContextImpl
public SearchContextImpl() -
SearchContextImpl
-
SearchContextImpl
-
-
Method Details
-
isForAnyProjects
public boolean isForAnyProjects()Description copied from interface:SearchContextReturns whether the context is global or not. A context is global when there are no project restrictions and no project category restrictions.- Specified by:
isForAnyProjectsin interfaceSearchContext- Returns:
- boolean
-
isForAnyIssueTypes
public boolean isForAnyIssueTypes()Description copied from interface:SearchContextReturns true if no specific issue types have been selected- Specified by:
isForAnyIssueTypesin interfaceSearchContext- Returns:
- boolean
-
isSingleProjectContext
public boolean isSingleProjectContext()Description copied from interface:SearchContextReturns true if there is exactly one Project in this SearchContext.- Specified by:
isSingleProjectContextin interfaceSearchContext- Returns:
- true if there is exactly one Project in this SearchContext.
-
getSingleProject
Description copied from interface:SearchContextReturns the single Project for this SearchContext.You should first call
SearchContext.isSingleProjectContext()to check if this is valid.- Specified by:
getSingleProjectin interfaceSearchContext- Returns:
- the single Project for this SearchContext.
- See Also:
-
getProjectCategoryIds
Description copied from interface:SearchContextReturns selected category IDs.- Specified by:
getProjectCategoryIdsin interfaceSearchContext- Returns:
- Empty list if no categories were selected
-
getProjectIds
Description copied from interface:SearchContextProject ids as Longs.- Specified by:
getProjectIdsin interfaceSearchContext- Returns:
- List of Long objects, possibly empty.
-
getIssueTypeIds
Description copied from interface:SearchContextIssue ids as Strings- Specified by:
getIssueTypeIdsin interfaceSearchContext- Returns:
- List of issue type ids possibly empty.
-
getAsIssueContexts
Description copied from interface:SearchContextGets the search context as a list ofIssueContextobjects- Specified by:
getAsIssueContextsin interfaceSearchContext- Returns:
- List of
IssueContext. If no issue types or projects selected. A blank issue context is returned. Never null.
-
verify
public void verify()Description copied from interface:SearchContextVerifies that all issue types and projects in the context actually still exists. This might not be the case. Also removes any projects or issue types from this SearchContext that do not (any longer) exist in the backing store.- Specified by:
verifyin interfaceSearchContext
-
toString
-
equals
-
hashCode
public int hashCode() -
getProjects
Description copied from interface:SearchContextReturns project objects in this SearchContext- Specified by:
getProjectsin interfaceSearchContext- Returns:
- List of
Project. If no projects are selected, returns an empty list.
-
getIssueTypes
Description copied from interface:SearchContextReturns issue types objects in this SearchContext- Specified by:
getIssueTypesin interfaceSearchContext- Returns:
- List of
IssueType. If no issue types are selected, returns an empty list
-
builder
-