com.atlassian.confluence.search.actions
Class SearchQueryBean

java.lang.Object
  extended by com.atlassian.confluence.search.actions.SearchQueryBean

public class SearchQueryBean
extends java.lang.Object

Collects query parameters from the search panel (searchpanel.vm) and provides methods that build and return a Query object that lucene can then run


Field Summary
static java.lang.String CONTENT_ALL
           
 
Constructor Summary
SearchQueryBean()
           
SearchQueryBean(com.atlassian.bonnie.Searcher searcher, SpaceManager spaceManager, UserAccessor userAccessor, LabelManager labelManager, SettingsManager settingsManager)
           
SearchQueryBean(SearchQueryBean searchQueryBean)
          Copy constructor.
 
Method Summary
 void addClassSearchField(org.apache.lucene.search.BooleanQuery query, java.lang.String typeClass)
           
 org.apache.lucene.search.Query buildPeopleQuery(boolean onlyPeopleWithPersonalSpaces)
           
 org.apache.lucene.search.Query buildQuery()
           
 org.apache.lucene.search.Query buildQueryNoSpaceLimit()
           
 org.apache.lucene.search.Query buildSpaceQuery(java.lang.String spaceKey)
          builds a space query without changing the space key of this query bean typically this method will be called in a loop to create queries for a list of space keys
 org.apache.lucene.search.Query buildTypeQuery(java.lang.String type)
          builds a type based query without changing the type of this query bean typically this method will be called in a loop to create queries for a list of content types
 java.lang.String getGroupBy()
           
 java.lang.String getIgnoredSearchWords()
           
 java.lang.String getLastModified()
           
 java.lang.String getQueryString()
           
 java.lang.String getSearchWords()
           
 com.atlassian.bonnie.search.SearchWordsLister getSearchWordsLister()
           
 java.lang.String getSpaceKey()
           
 java.lang.String getType()
           
 java.lang.String getTypeClass()
           
static java.lang.String getTypeClass(java.lang.String contentType)
           
 boolean isMailIncluded()
           
 void setGroupBy(java.lang.String groupBy)
           
 void setLabelManager(LabelManager labelManager)
           
 void setLastModified(java.lang.String lastModified)
           
 void setQueryString(java.lang.String queryString)
          every time a new query is set we want to reset the search words lister which stores the searched terms and ignored terms.
 void setSearcher(com.atlassian.bonnie.Searcher searcher)
           
 void setSearchWordsLister(com.atlassian.bonnie.search.SearchWordsLister searchWordsLister)
           
 void setSettingsManager(SettingsManager settingsManager)
           
 void setSpaceKey(java.lang.String spaceKey)
           
 void setSpaceKeys(java.util.List<java.lang.String> spaceKeys)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 void setTimer(Timer timer)
           
 void setType(java.lang.String type)
           
 void setUserAccessor(UserAccessor userAccessor)
           
 java.lang.String toString()
           
 void unwire()
          Remove all Spring components from the bean, making it safe to transport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTENT_ALL

public static final java.lang.String CONTENT_ALL
See Also:
Constant Field Values
Constructor Detail

SearchQueryBean

public SearchQueryBean()

SearchQueryBean

public SearchQueryBean(SearchQueryBean searchQueryBean)
Copy constructor.

Parameters:
searchQueryBean -

SearchQueryBean

public SearchQueryBean(com.atlassian.bonnie.Searcher searcher,
                       SpaceManager spaceManager,
                       UserAccessor userAccessor,
                       LabelManager labelManager,
                       SettingsManager settingsManager)
Method Detail

unwire

public void unwire()
Remove all Spring components from the bean, making it safe to transport


getTypeClass

public static java.lang.String getTypeClass(java.lang.String contentType)

buildQuery

public org.apache.lucene.search.Query buildQuery()

buildQueryNoSpaceLimit

public org.apache.lucene.search.Query buildQueryNoSpaceLimit()

buildPeopleQuery

public org.apache.lucene.search.Query buildPeopleQuery(boolean onlyPeopleWithPersonalSpaces)

buildSpaceQuery

public org.apache.lucene.search.Query buildSpaceQuery(java.lang.String spaceKey)
builds a space query without changing the space key of this query bean typically this method will be called in a loop to create queries for a list of space keys

Parameters:
spaceKey -

addClassSearchField

public void addClassSearchField(org.apache.lucene.search.BooleanQuery query,
                                java.lang.String typeClass)

buildTypeQuery

public org.apache.lucene.search.Query buildTypeQuery(java.lang.String type)
builds a type based query without changing the type of this query bean typically this method will be called in a loop to create queries for a list of content types

Parameters:
type -

isMailIncluded

public boolean isMailIncluded()

getIgnoredSearchWords

public java.lang.String getIgnoredSearchWords()
Returns:
a comma separated list of words ignored in the query

getSearchWords

public java.lang.String getSearchWords()

getSearchWordsLister

public com.atlassian.bonnie.search.SearchWordsLister getSearchWordsLister()

setSearchWordsLister

public void setSearchWordsLister(com.atlassian.bonnie.search.SearchWordsLister searchWordsLister)

getQueryString

public java.lang.String getQueryString()

setQueryString

public void setQueryString(java.lang.String queryString)
                    throws java.io.IOException
every time a new query is set we want to reset the search words lister which stores the searched terms and ignored terms. if we don't the lister will accumulate ignored terms from previous searches

Parameters:
queryString -
Throws:
java.io.IOException

getSpaceKey

public java.lang.String getSpaceKey()

setSpaceKey

public void setSpaceKey(java.lang.String spaceKey)

getGroupBy

public java.lang.String getGroupBy()

setGroupBy

public void setGroupBy(java.lang.String groupBy)

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

getTypeClass

public java.lang.String getTypeClass()

getLastModified

public java.lang.String getLastModified()

setLastModified

public void setLastModified(java.lang.String lastModified)

setSearcher

public void setSearcher(com.atlassian.bonnie.Searcher searcher)

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)

setTimer

public void setTimer(Timer timer)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setLabelManager

public void setLabelManager(LabelManager labelManager)

setSpaceKeys

public void setSpaceKeys(java.util.List<java.lang.String> spaceKeys)

setSettingsManager

public void setSettingsManager(SettingsManager settingsManager)


Copyright © 2003-2010 Atlassian. All Rights Reserved.