com.atlassian.confluence.search.actions
Class SearchSiteAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.confluence.core.ConfluenceActionSupport
          extended by com.atlassian.confluence.search.actions.SearchSiteAction
All Implemented Interfaces:
WebInterface, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, java.io.Serializable

public class SearchSiteAction
extends ConfluenceActionSupport

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, permissionManager, permitted, PREVIEW, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
SearchSiteAction()
           
 
Method Summary
 java.lang.String execute()
           
 java.util.List getAggregateOptions()
           
 java.util.List getAvailableGlobalSpaces()
          Find all global spaces that user has permission to view, but that aren't favourites
 java.util.List getAvailableSpaces()
          Find all spaces that user has permission to view, but that aren't favourites
 java.util.List getContentEntityTypes()
           
 java.util.List getContentLabels(ContentEntityObject content, int amount)
           
 int getExcludedGlobalResult()
           
 int getExcludedMailCount()
           
 java.util.List getFavouriteSpaces()
           
 java.lang.String getLabelNames(Labelable obj)
          Retrieve a comma separated string of label names.
 java.util.List getMatchingLabels()
          Returns the labels matching the current search query.
 org.apache.lucene.search.Query getQuery()
           
 java.util.List getRelatedLabels()
          Deprecated. Use #getRelatedLabels(List) if possible to avoid multiple calls to getMatchingLabels
 java.util.List getRelatedLabels(java.util.List srcLabels)
          Returns a list of related labels to the passed list of labels.
 java.lang.String getReset()
           
 java.util.List getResults()
          returns paginated results
 java.util.List getResultsForSpace(java.lang.String spaceKey)
           
 java.util.List getResultsForType(java.lang.String type)
           
 SearchBean getSearchBean()
           
 com.atlassian.bonnie.Searcher getSearcher()
           
 SearchQueryBean getSearchQuery()
           
 Space getSpace(java.lang.String spaceKey)
           
 Timer getTimer()
           
 java.lang.String getTypeName(java.lang.String type)
           
 boolean isExplain()
           
 boolean isQuickSearch()
           
 boolean isSpaceSearch()
           
protected  void resetSearchQueryBean()
           
 void setExplain(boolean explain)
           
 void setQuickSearch(boolean quickSearch)
           
 void setReset(java.lang.String reset)
           
 void setSearchBean(SearchBean searchBean)
           
 void setSearcher(com.atlassian.bonnie.Searcher searcher)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 void setStartIndex(int startIndex)
           
 void validate()
           
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getBootstrapManager, getCancelResult, getDateFormatter, getDefaultResourceBundle, getEventManager, getFriendlyDateFormatter, getGlobalHelper, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSpaceHelper, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermitted, isPermittedAsString, isPrintableVersion, isUsingHSQL, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setPermissionCheck, setPermissionManager, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setUserAccessor, setWebInterfaceManager
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchSiteAction

public SearchSiteAction()
Method Detail

setSearcher

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

validate

public void validate()
Specified by:
validate in interface com.opensymphony.xwork.Validateable
Overrides:
validate in class com.opensymphony.xwork.ActionSupport

execute

public java.lang.String execute()
                         throws java.lang.Exception
Specified by:
execute in interface com.opensymphony.xwork.Action
Overrides:
execute in class com.opensymphony.xwork.ActionSupport
Throws:
java.lang.Exception

getResults

public java.util.List getResults()
returns paginated results


getExcludedMailCount

public int getExcludedMailCount()

getExcludedGlobalResult

public int getExcludedGlobalResult()

getResultsForSpace

public java.util.List getResultsForSpace(java.lang.String spaceKey)

getResultsForType

public java.util.List getResultsForType(java.lang.String type)

getSearchQuery

public SearchQueryBean getSearchQuery()

resetSearchQueryBean

protected void resetSearchQueryBean()

getAvailableSpaces

public java.util.List getAvailableSpaces()
Find all spaces that user has permission to view, but that aren't favourites

Returns:
List

getAvailableGlobalSpaces

public java.util.List getAvailableGlobalSpaces()
Find all global spaces that user has permission to view, but that aren't favourites

Returns:
List

getAggregateOptions

public java.util.List getAggregateOptions()

getFavouriteSpaces

public java.util.List getFavouriteSpaces()

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

getContentEntityTypes

public java.util.List getContentEntityTypes()

getMatchingLabels

public java.util.List getMatchingLabels()
Returns the labels matching the current search query. Only if a term of the query matches exactly the labelname, the label will be added to the list. To search for personal labels the query string has to contain a term like my:labelname.

Returns:
List of matching labels

getRelatedLabels

public java.util.List getRelatedLabels()
Deprecated. Use #getRelatedLabels(List) if possible to avoid multiple calls to getMatchingLabels

Returns a list of related labels to the labels matching the search result Currently it takes the 5 most related labels

Returns:
List of related lables

getRelatedLabels

public java.util.List getRelatedLabels(java.util.List srcLabels)
Returns a list of related labels to the passed list of labels. Currently it returns the 5 most related labels for each label in the list. Note that if a source label appears in the related list for another source label, it will be ignored.

Parameters:
srcLabels - list of labels to find related labels for
Returns:
List of related labels

getLabelNames

public java.lang.String getLabelNames(Labelable obj)
Retrieve a comma separated string of label names.

Returns:
a comma separated string

getContentLabels

public java.util.List getContentLabels(ContentEntityObject content,
                                       int amount)

getReset

public java.lang.String getReset()

setReset

public void setReset(java.lang.String reset)

getSpace

public Space getSpace(java.lang.String spaceKey)

getSearchBean

public SearchBean getSearchBean()

setSearchBean

public void setSearchBean(SearchBean searchBean)

getTypeName

public java.lang.String getTypeName(java.lang.String type)

setStartIndex

public void setStartIndex(int startIndex)

isQuickSearch

public boolean isQuickSearch()

setQuickSearch

public void setQuickSearch(boolean quickSearch)

isSpaceSearch

public boolean isSpaceSearch()

getQuery

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

getSearcher

public com.atlassian.bonnie.Searcher getSearcher()

isExplain

public boolean isExplain()

setExplain

public void setExplain(boolean explain)

getTimer

public Timer getTimer()


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.