com.atlassian.jira.issue.search
Class SearchContextImpl

java.lang.Object
  extended by com.atlassian.jira.issue.search.SearchContextImpl
All Implemented Interfaces:
SearchContext

public class SearchContextImpl
extends Object
implements SearchContext


Field Summary
protected  List issueTypeIds
           
protected  List projectCategoryIds
           
protected  List projectIds
           
 
Constructor Summary
SearchContextImpl()
           
SearchContextImpl(List projectCategoryIds, List projectIds, List issueTypeIds)
           
SearchContextImpl(SearchContext searchContext)
           
 
Method Summary
 boolean equals(Object o)
           
 List getAsIssueContexts()
          Gets the search context as a list of IssueContext objects
 List getIssueTypeIds()
          Issue ids as Strings
 org.ofbiz.core.entity.GenericValue getOnlyProject()
           
 List getProjectCategoryIds()
          Returns selected categories
 List getProjectIds()
          Project ids as Longs.
 int hashCode()
           
 boolean isForAnyIssueTypes()
          Returns true if no specific issue types have been selected
 boolean isForAnyProjects()
          Returns whether the context is global or not.
 boolean isSingleProjectContext()
           
 String toString()
           
 void verify()
          Verifies that all issue types and projects in the context actually still exists.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

projectCategoryIds

protected List projectCategoryIds

projectIds

protected List projectIds

issueTypeIds

protected List issueTypeIds
Constructor Detail

SearchContextImpl

public SearchContextImpl()

SearchContextImpl

public SearchContextImpl(List projectCategoryIds,
                         List projectIds,
                         List issueTypeIds)

SearchContextImpl

public SearchContextImpl(SearchContext searchContext)
Method Detail

isForAnyProjects

public boolean isForAnyProjects()
Description copied from interface: SearchContext
Returns whether the context is global or not. A context is global when there are no project restrictions and no project category restrictions.

Specified by:
isForAnyProjects in interface SearchContext
Returns:
boolean

isForAnyIssueTypes

public boolean isForAnyIssueTypes()
Description copied from interface: SearchContext
Returns true if no specific issue types have been selected

Specified by:
isForAnyIssueTypes in interface SearchContext
Returns:
boolean

isSingleProjectContext

public boolean isSingleProjectContext()
Specified by:
isSingleProjectContext in interface SearchContext

getProjectCategoryIds

public List getProjectCategoryIds()
Description copied from interface: SearchContext
Returns selected categories

Specified by:
getProjectCategoryIds in interface SearchContext
Returns:
Empty list if no categories were selected

getProjectIds

public List getProjectIds()
Description copied from interface: SearchContext
Project ids as Longs.

Specified by:
getProjectIds in interface SearchContext
Returns:
List of Long objects, possibly empty.

getOnlyProject

public org.ofbiz.core.entity.GenericValue getOnlyProject()
Specified by:
getOnlyProject in interface SearchContext

getIssueTypeIds

public List getIssueTypeIds()
Description copied from interface: SearchContext
Issue ids as Strings

Specified by:
getIssueTypeIds in interface SearchContext
Returns:
List of issue type ids possibly empty.

getAsIssueContexts

public List getAsIssueContexts()
Description copied from interface: SearchContext
Gets the search context as a list of IssueContext objects

Specified by:
getAsIssueContexts in interface SearchContext
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: SearchContext
Verifies that all issue types and projects in the context actually still exists. This might not be the case

Specified by:
verify in interface SearchContext

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2007 Atlassian. All Rights Reserved.