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

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, 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<com.atlassian.core.util.PairType> getContentEntityTypes()
           
 java.util.List getContentLabels(ContentEntityObject content, int amount)
           
 ContentTypeEnum getContentType()
          A convenience method to convert the type String received from the front end to a ContentTypeEnum.
 ContentTypesDisplayMapper getContentTypesDisplayMapper()
           
 java.lang.String getContributor()
           
 java.lang.String getContributorUsername()
           
 SearchSiteAction.CriteriaParameters getCurrentSearch()
           
 java.util.List<com.atlassian.core.util.PairType> getDateRanges()
           
 int getEndIndex()
           
 java.util.List getFavouriteSpaces()
           
 java.lang.String getLabelNames(Labelable obj)
          Retrieve a comma separated string of label names.
 com.atlassian.bonnie.search.summary.Summary getLabelsSummaryForResult(SearchResult result)
           
 DateRangeEnum getLastModified()
           
 bucket.core.actions.PaginationSupport getPaginationSupport()
           
 java.lang.String getQueryString()
           
 QuerySuggester.QuerySuggestion getQuerySuggestion()
           
 java.util.List getRelatedLabels()
          Returns a list of related labels to the labels matching the search result
 java.util.List<SearchResult> getResults()
           
 SearchBean getSearchBean()
           
 SearchSiteAction.BackwardsCompatibility getSearchQuery()
           
 java.util.List<java.lang.String> getSearchWords()
           
 Space getSpace(java.lang.String spaceKey)
           
 int getStartIndex()
           
 java.lang.String getSummaryForResult(SearchResult result)
           
 Timer getTimer()
           
 java.lang.String getTitleForResult(SearchResult result)
           
 int getTotalSearchResults()
           
 java.lang.String getType()
           
 java.lang.String getTypeName(java.lang.String type)
           
 java.util.List<com.atlassian.core.util.PairType> getTypes()
           
 WebInterfaceContext getWebInterfaceContext(SearchResult result)
           
 java.lang.String getWhere()
           
 void setContentTypesDisplayMapper(ContentTypesDisplayMapper contentTypesDisplayMapper)
           
 void setContributor(java.lang.String who)
           
 void setContributorUsername(java.lang.String contributorUsername)
           
 void setLastModified(DateRangeEnum lastModified)
           
 void setPredefinedSearchBuilder(PredefinedSearchBuilder predefinedSearchBuilder)
           
 void setQueryAnalyzer(org.apache.lucene.analysis.Analyzer queryAnalyzer)
           
 void setQueryString(java.lang.String queryString)
           
 void setQuerySuggester(QuerySuggester querySuggester)
           
 void setSearchBean(SearchBean searchBean)
           
 void setSearchManager(SearchManager searchManager)
           
 void setSearchMapper(LuceneSearchMapper searchMapper)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 void setStartIndex(int startIndex)
           
 void setType(java.lang.String type)
           
 void setUserAccessor(UserAccessor userAccessor)
           
 void setWhere(java.lang.String where)
           
 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, isSharedMode, isUsingHSQL, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setPermissionCheck, setPermissionManager, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, 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 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

getWebInterfaceContext

public WebInterfaceContext getWebInterfaceContext(SearchResult result)

getSummaryForResult

public java.lang.String getSummaryForResult(SearchResult result)

getTitleForResult

public java.lang.String getTitleForResult(SearchResult result)

getResults

public java.util.List<SearchResult> getResults()

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<com.atlassian.core.util.PairType> getContentEntityTypes()

getRelatedLabels

public java.util.List getRelatedLabels()
Returns a list of related labels to the labels matching the search result

Returns:
List of related lables

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)

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)

getTypes

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

getDateRanges

public java.util.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 java.lang.String getQueryString()

setQueryString

public void setQueryString(java.lang.String queryString)

getWhere

public java.lang.String getWhere()

setWhere

public void setWhere(java.lang.String where)

getType

public java.lang.String getType()

getContentType

public ContentTypeEnum getContentType()
A convenience method to convert the type String received from the front end to a ContentTypeEnum.

Returns:
the ContentTypeEnum represented by the type property or null if there is no mapping.

setType

public void setType(java.lang.String type)

getLastModified

public DateRangeEnum getLastModified()

setLastModified

public void setLastModified(DateRangeEnum lastModified)

getTotalSearchResults

public int getTotalSearchResults()

getPaginationSupport

public bucket.core.actions.PaginationSupport getPaginationSupport()

setSearchMapper

public void setSearchMapper(LuceneSearchMapper searchMapper)

getContentTypesDisplayMapper

public ContentTypesDisplayMapper getContentTypesDisplayMapper()

setContentTypesDisplayMapper

public void setContentTypesDisplayMapper(ContentTypesDisplayMapper contentTypesDisplayMapper)

setQueryAnalyzer

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

setSearchManager

public void setSearchManager(SearchManager searchManager)

getSearchWords

public java.util.List<java.lang.String> getSearchWords()

getSearchQuery

public SearchSiteAction.BackwardsCompatibility getSearchQuery()

setContributor

public void setContributor(java.lang.String who)

getContributor

public java.lang.String getContributor()

getContributorUsername

public java.lang.String getContributorUsername()

setContributorUsername

public void setContributorUsername(java.lang.String contributorUsername)

setPredefinedSearchBuilder

public void setPredefinedSearchBuilder(PredefinedSearchBuilder predefinedSearchBuilder)

setQuerySuggester

public void setQuerySuggester(QuerySuggester querySuggester)

getQuerySuggestion

public QuerySuggester.QuerySuggestion getQuerySuggestion()


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