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:
Beanable, WebInterface, MessageHolderAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, Serializable

public class SearchSiteAction
extends ConfluenceActionSupport
implements Beanable

See Also:
Serialized Form

Nested Class Summary
 class SearchSiteAction.BackwardsCompatibility
          A class used to preserve compatibility with old style search URL's where search parameters were entered in the format: searchQuery.spaceKey=conf_all&searchQuery.queryString=hello.
static class SearchSiteAction.CriteriaParameters
          A Class used to represent the different criteria restriction links that are displayed along with the search results.
static class SearchSiteAction.UserDetails
           
 
Field Summary
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, 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
 String execute()
           
 List<com.atlassian.core.util.PairType> getAggregateOptions()
           
 List<SpacePickerHelper.SpaceDTO> getAvailableGlobalSpaces()
          Find all global spaces that user has permission to view, but that aren't favourites
 Object getBean()
           
 List<com.atlassian.core.util.PairType> getContentEntityTypes()
          Deprecated. duplicate of getTypeOptions()
 List getContentLabels(ContentEntityObject content, int amount)
           
 ContentTypeEnum getContentType()
           
 ContentTypesDisplayMapper getContentTypesDisplayMapper()
           
 String getContributor()
           
 String getContributorUsername()
           
 SearchSiteAction.CriteriaParameters getCurrentSearch()
           
 List<com.atlassian.core.util.PairType> getDateRanges()
           
 String getDecoratedQuerySuggestion()
           
 int getEndIndex()
           
 List<SpacePickerHelper.SpaceDTO> getFavouriteSpaces()
           
 String getKey()
           
 String getLabelNames(Labelable obj)
          Retrieve a comma separated string of label names.
 com.atlassian.bonnie.search.summary.Summary getLabelsSummaryForResult(SearchResult result)
           
 DateRangeEnum getLastModified()
           
 PaginationSupport getPaginationSupport()
           
 String getPlainQuerySuggestion()
           
 String getQueryString()
           
 List<Label> getRelatedLabels()
          Returns a list of related labels to the labels matching the search result
 List<SearchResult> getResults()
           
 SearchSiteAction.BackwardsCompatibility getSearchQuery()
           
 List<String> getSearchWords()
           
 Space getSpace(String spaceKey)
           
 int getStartIndex()
           
 String getSummaryForResult(SearchResult result)
           
 Timer getTimer()
           
 String getTitleForResult(SearchResult result)
           
 int getTotalSearchResults()
           
 String getType()
           
 String getTypeName(String type)
           
 List<com.atlassian.core.util.PairType> getTypeOptions()
           
 WebInterfaceContext getWebInterfaceContext(SearchResult result)
           
 String getWhere()
           
 boolean isIncludeArchivedSpaces()
           
 boolean isSuggestArchivedSpaces()
           
 String newSearchResult(SearchResult searchResult, String showExcerpts, String queryString)
           
 void setContentTypesDisplayMapper(ContentTypesDisplayMapper contentTypesDisplayMapper)
           
 void setContributor(String who)
           
 void setContributorUsername(String contributorUsername)
           
 void setDelegatedSearchResultRenderer(DelegatedSearchResultRenderer defaultRenderer)
           
 void setIncludeArchivedSpaces(boolean includeArchivedSpaces)
           
 void setKey(String key)
           
 void setLastModified(DateRangeEnum lastModified)
           
 void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 void setPredefinedSearchBuilder(PredefinedSearchBuilder predefinedSearchBuilder)
           
 void setQueryAnalyzer(org.apache.lucene.analysis.Analyzer queryAnalyzer)
           
 void setQueryString(String queryString)
           
 void setQuerySuggester(QuerySuggester querySuggester)
           
 void setSearchManager(SearchManager searchManager)
           
 void setSearchMapper(LuceneSearchMapper searchMapper)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 void setStartIndex(int startIndex)
           
 void setType(String type)
           
 void setTypes(String[] types)
           
 void setUserAccessor(UserAccessor userAccessor)
           
 void setWhere(String where)
           
 void validate()
           
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getActionName, getBootstrapManager, getCancel, getCancelResult, getContext, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDocLink, getEventManager, getFriendlyDateFormatter, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSystemInformationService, 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, isSharedMode, isUserStatusPluginEnabled, isUsingHSQL, setBootstrapManager, setCancel, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionCheck, setPermissionManager, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setSystemInformationService, 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

validate

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

execute

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

getBean

public Object getBean()
Specified by:
getBean in interface Beanable

newSearchResult

public String newSearchResult(SearchResult searchResult,
                              String showExcerpts,
                              String queryString)

getWebInterfaceContext

public WebInterfaceContext getWebInterfaceContext(SearchResult result)

getSummaryForResult

public String getSummaryForResult(SearchResult result)

getTitleForResult

public String getTitleForResult(SearchResult result)

getResults

public List<SearchResult> getResults()

getAvailableGlobalSpaces

public List<SpacePickerHelper.SpaceDTO> getAvailableGlobalSpaces()
Find all global spaces that user has permission to view, but that aren't favourites

Returns:
List

getAggregateOptions

public List<com.atlassian.core.util.PairType> getAggregateOptions()

getFavouriteSpaces

public List<SpacePickerHelper.SpaceDTO> getFavouriteSpaces()

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

getContentEntityTypes

public List<com.atlassian.core.util.PairType> getContentEntityTypes()
Deprecated. duplicate of getTypeOptions()


getRelatedLabels

public List<Label> getRelatedLabels()
Returns a list of related labels to the labels matching the search result

Returns:
List of related lables

getLabelNames

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

Returns:
a comma separated string

getContentLabels

public List getContentLabels(ContentEntityObject content,
                             int amount)

getSpace

public Space getSpace(String spaceKey)

getTypeName

public String getTypeName(String type)

getTypeOptions

public List<com.atlassian.core.util.PairType> getTypeOptions()
Returns:
a list of the type criteria that should be presented on the GUI.

getDateRanges

public List<com.atlassian.core.util.PairType> getDateRanges()
Returns:
a list of the date range criteria that should be presented on the GUI.

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)
Overrides:
setUserAccessor in class ConfluenceActionSupport

getCurrentSearch

public SearchSiteAction.CriteriaParameters getCurrentSearch()
Returns:
a criteria link that represents the current search state

setStartIndex

public void setStartIndex(int startIndex)

getStartIndex

public int getStartIndex()

getEndIndex

public int getEndIndex()

getTimer

public Timer getTimer()

getLabelsSummaryForResult

public com.atlassian.bonnie.search.summary.Summary getLabelsSummaryForResult(SearchResult result)

getQueryString

public String getQueryString()

setQueryString

public void setQueryString(String queryString)

getWhere

public String getWhere()

setWhere

public void setWhere(String where)

getKey

public String getKey()

setKey

public void setKey(String key)

getType

public String getType()

getContentType

public ContentTypeEnum getContentType()

setType

public void setType(String type)

setTypes

public void setTypes(String[] types)

getLastModified

public DateRangeEnum getLastModified()

setLastModified

public void setLastModified(DateRangeEnum lastModified)

getTotalSearchResults

public int getTotalSearchResults()

getPaginationSupport

public PaginationSupport getPaginationSupport()

setSearchMapper

public void setSearchMapper(LuceneSearchMapper searchMapper)

getContentTypesDisplayMapper

public ContentTypesDisplayMapper getContentTypesDisplayMapper()

setPluginAccessor

public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
Overrides:
setPluginAccessor in class ConfluenceActionSupport

setContentTypesDisplayMapper

public void setContentTypesDisplayMapper(ContentTypesDisplayMapper contentTypesDisplayMapper)

setQueryAnalyzer

public void setQueryAnalyzer(org.apache.lucene.analysis.Analyzer queryAnalyzer)

setSearchManager

public void setSearchManager(SearchManager searchManager)

getSearchWords

public List<String> getSearchWords()

getSearchQuery

public SearchSiteAction.BackwardsCompatibility getSearchQuery()

setContributor

public void setContributor(String who)

getContributor

public String getContributor()

getContributorUsername

public String getContributorUsername()

setContributorUsername

public void setContributorUsername(String contributorUsername)

setPredefinedSearchBuilder

public void setPredefinedSearchBuilder(PredefinedSearchBuilder predefinedSearchBuilder)

setQuerySuggester

public void setQuerySuggester(QuerySuggester querySuggester)

isIncludeArchivedSpaces

public boolean isIncludeArchivedSpaces()

setIncludeArchivedSpaces

public void setIncludeArchivedSpaces(boolean includeArchivedSpaces)

isSuggestArchivedSpaces

public boolean isSuggestArchivedSpaces()

getPlainQuerySuggestion

public String getPlainQuerySuggestion()

getDecoratedQuerySuggestion

public String getDecoratedQuerySuggestion()

setDelegatedSearchResultRenderer

public void setDelegatedSearchResultRenderer(DelegatedSearchResultRenderer defaultRenderer)
Parameters:
defaultRenderer - the defaultRenderer to set


Copyright © 2003-2013 Atlassian. All Rights Reserved.