Package org.codelibs.fess.app.web.base
Class FessSearchAction
java.lang.Object
org.lastaflute.web.LastaAction
org.lastaflute.web.TypicalAction
org.codelibs.fess.app.web.base.FessBaseAction
org.codelibs.fess.app.web.base.FessSearchAction
- All Implemented Interfaces:
org.codelibs.fess.mylasta.action.FessHtmlPath,org.lastaflute.web.docs.LaActionDocs,org.lastaflute.web.hook.ActionHook,org.lastaflute.web.validation.LaValidatable<org.codelibs.fess.mylasta.action.FessMessages>
- Direct Known Subclasses:
CacheAction,ChatAction,ErrorAction,ErrorBadrequrestAction,ErrorBusyAction,ErrorNotfoundAction,ErrorSystemerrorAction,FessLoginAction,GoAction,HelpAction,LogoutAction,OsddAction,ProfileAction,RootAction,SearchAction,ThumbnailAction
Abstract base class for search-related actions in the Fess search application.
Provides common functionality for search operations, including search form handling,
label management, user authentication, and search result processing.
This class extends FessBaseAction and serves as the foundation for all search-related
web actions in the application.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChatClientClient for RAG chat functionality.protected booleanFlag indicating whether favorite functionality is enabled.protected static final StringThe field name used for label-based search filtering.protected LabelTypeHelperHelper for managing label types and label-based filtering.protected OsddHelperHelper for OpenSearch Description Document (OSDD) functionality.protected PopularWordHelperHelper for managing popular search words and suggestions.protected QueryFieldConfigConfiguration for query field mappings and processing.protected QueryHelperHelper for query processing and transformation.protected jakarta.servlet.http.HttpServletRequestThe HTTP servlet request object for the current request.protected RoleQueryHelperHelper for role-based query filtering and security.protected SearchHelperHelper for performing search operations and managing search requests.protected booleanFlag indicating whether search logging is enabled.protected ThumbnailManagerManager for handling thumbnail generation and display.protected booleanFlag indicating whether thumbnail generation is enabled.protected UserInfoHelperHelper for managing user information and authentication.Fields inherited from class org.codelibs.fess.app.web.base.FessBaseAction
accessTokenHelper, activityHelper, APP_TYPE, fessConfig, fessLoginAssist, requestManager, responseManager, sessionManager, systemHelper, timeManager, USER_TYPE, viewHelperFields inherited from class org.lastaflute.web.TypicalAction
GLOBALFields inherited from interface org.codelibs.fess.mylasta.action.FessHtmlPath
path_AdminAccesstoken_AdminAccesstokenDetailsJsp, path_AdminAccesstoken_AdminAccesstokenEditJsp, path_AdminAccesstoken_AdminAccesstokenJsp, path_AdminBackup_AdminBackupJsp, path_AdminBadword_AdminBadwordDetailsJsp, path_AdminBadword_AdminBadwordDownloadJsp, path_AdminBadword_AdminBadwordEditJsp, path_AdminBadword_AdminBadwordJsp, path_AdminBadword_AdminBadwordUploadJsp, path_AdminBoostdoc_AdminBoostdocDetailsJsp, path_AdminBoostdoc_AdminBoostdocEditJsp, path_AdminBoostdoc_AdminBoostdocJsp, path_AdminCrawlinginfo_AdminCrawlinginfoDetailsJsp, path_AdminCrawlinginfo_AdminCrawlinginfoJsp, path_AdminDashboard_AdminDashboardJsp, path_AdminDataconfig_AdminDataconfigDetailsJsp, path_AdminDataconfig_AdminDataconfigEditJsp, path_AdminDataconfig_AdminDataconfigJsp, path_AdminDesign_AdminDesignEditJsp, path_AdminDesign_AdminDesignJsp, path_AdminDict_AdminDictJsp, path_AdminDictKuromoji_AdminDictKuromojiDetailsJsp, path_AdminDictKuromoji_AdminDictKuromojiDownloadJsp, path_AdminDictKuromoji_AdminDictKuromojiEditJsp, path_AdminDictKuromoji_AdminDictKuromojiJsp, path_AdminDictKuromoji_AdminDictKuromojiUploadJsp, path_AdminDictMapping_AdminDictMappingDetailsJsp, path_AdminDictMapping_AdminDictMappingDownloadJsp, path_AdminDictMapping_AdminDictMappingEditJsp, path_AdminDictMapping_AdminDictMappingJsp, path_AdminDictMapping_AdminDictMappingUploadJsp, path_AdminDictProtwords_AdminDictProtwordsDetailsJsp, path_AdminDictProtwords_AdminDictProtwordsDownloadJsp, path_AdminDictProtwords_AdminDictProtwordsEditJsp, path_AdminDictProtwords_AdminDictProtwordsJsp, path_AdminDictProtwords_AdminDictProtwordsUploadJsp, path_AdminDictStemmeroverride_AdminDictStemmeroverrideDetailsJsp, path_AdminDictStemmeroverride_AdminDictStemmeroverrideDownloadJsp, path_AdminDictStemmeroverride_AdminDictStemmeroverrideEditJsp, path_AdminDictStemmeroverride_AdminDictStemmeroverrideJsp, path_AdminDictStemmeroverride_AdminDictStemmeroverrideUploadJsp, path_AdminDictStopwords_AdminDictStopwordsDetailsJsp, path_AdminDictStopwords_AdminDictStopwordsDownloadJsp, path_AdminDictStopwords_AdminDictStopwordsEditJsp, path_AdminDictStopwords_AdminDictStopwordsJsp, path_AdminDictStopwords_AdminDictStopwordsUploadJsp, path_AdminDictSynonym_AdminDictSynonymDetailsJsp, path_AdminDictSynonym_AdminDictSynonymDownloadJsp, path_AdminDictSynonym_AdminDictSynonymEditJsp, path_AdminDictSynonym_AdminDictSynonymJsp, path_AdminDictSynonym_AdminDictSynonymUploadJsp, path_AdminDuplicatehost_AdminDuplicatehostDetailsJsp, path_AdminDuplicatehost_AdminDuplicatehostEditJsp, path_AdminDuplicatehost_AdminDuplicatehostJsp, path_AdminElevateword_AdminElevatewordDetailsJsp, path_AdminElevateword_AdminElevatewordDownloadJsp, path_AdminElevateword_AdminElevatewordEditJsp, path_AdminElevateword_AdminElevatewordJsp, path_AdminElevateword_AdminElevatewordUploadJsp, path_AdminError_AdminErrorJsp, path_AdminFailureurl_AdminFailureurlDetailsJsp, path_AdminFailureurl_AdminFailureurlJsp, path_AdminFileauth_AdminFileauthDetailsJsp, path_AdminFileauth_AdminFileauthEditJsp, path_AdminFileauth_AdminFileauthJsp, path_AdminFileconfig_AdminFileconfigDetailsJsp, path_AdminFileconfig_AdminFileconfigEditJsp, path_AdminFileconfig_AdminFileconfigJsp, path_AdminGeneral_AdminGeneralJsp, path_AdminGroup_AdminGroupDetailsJsp, path_AdminGroup_AdminGroupEditJsp, path_AdminGroup_AdminGroupJsp, path_AdminJoblog_AdminJoblogDetailsJsp, path_AdminJoblog_AdminJoblogJsp, path_AdminKeymatch_AdminKeymatchDetailsJsp, path_AdminKeymatch_AdminKeymatchEditJsp, path_AdminKeymatch_AdminKeymatchJsp, path_AdminLabeltype_AdminLabeltypeDetailsJsp, path_AdminLabeltype_AdminLabeltypeEditJsp, path_AdminLabeltype_AdminLabeltypeJsp, path_AdminLog_AdminLogJsp, path_AdminMaintenance_AdminMaintenanceJsp, path_AdminPathmap_AdminPathmapDetailsJsp, path_AdminPathmap_AdminPathmapEditJsp, path_AdminPathmap_AdminPathmapJsp, path_AdminPlugin_AdminPluginInstallpluginJsp, path_AdminPlugin_AdminPluginJsp, path_AdminRelatedcontent_AdminRelatedcontentDetailsJsp, path_AdminRelatedcontent_AdminRelatedcontentEditJsp, path_AdminRelatedcontent_AdminRelatedcontentJsp, path_AdminRelatedquery_AdminRelatedqueryDetailsJsp, path_AdminRelatedquery_AdminRelatedqueryEditJsp, path_AdminRelatedquery_AdminRelatedqueryJsp, path_AdminReqheader_AdminReqheaderDetailsJsp, path_AdminReqheader_AdminReqheaderEditJsp, path_AdminReqheader_AdminReqheaderJsp, path_AdminRole_AdminRoleDetailsJsp, path_AdminRole_AdminRoleEditJsp, path_AdminRole_AdminRoleJsp, path_AdminScheduler_AdminSchedulerDetailsJsp, path_AdminScheduler_AdminSchedulerEditJsp, path_AdminScheduler_AdminSchedulerJsp, path_AdminSearchlist_AdminSearchlistEditJsp, path_AdminSearchlist_AdminSearchlistJsp, path_AdminSearchlog_AdminSearchlogDetailsJsp, path_AdminSearchlog_AdminSearchlogJsp, path_AdminSereq_AdminSereqJsp, path_AdminStorage_AdminStorageJsp, path_AdminStorage_AdminStorageTagEditJsp, path_AdminSuggest_AdminSuggestJsp, path_AdminSysteminfo_AdminSysteminfoJsp, path_AdminTheme_AdminThemeDetailsJsp, path_AdminTheme_AdminThemeJsp, path_AdminTheme_AdminThemeUploadJsp, path_AdminUser_AdminUserDetailsJsp, path_AdminUser_AdminUserEditJsp, path_AdminUser_AdminUserJsp, path_AdminWebauth_AdminWebauthDetailsJsp, path_AdminWebauth_AdminWebauthEditJsp, path_AdminWebauth_AdminWebauthJsp, path_AdminWebconfig_AdminWebconfigDetailsJsp, path_AdminWebconfig_AdminWebconfigEditJsp, path_AdminWebconfig_AdminWebconfigJsp, path_AdminWizard_AdminWizardConfigJsp, path_AdminWizard_AdminWizardJsp, path_AdminWizard_AdminWizardStartJsp, path_AdvanceJsp, path_Chat_ChatJsp, path_Error_BadRequestJsp, path_Error_BusyJsp, path_Error_ErrorJsp, path_Error_NotFoundJsp, path_Error_RedirectJsp, path_Error_SystemJsp, path_FooterJsp, path_HeaderJsp, path_HelpJsp, path_IndexJsp, path_Login_IndexJsp, path_Login_NewpasswordJsp, path_Profile_IndexJsp, path_SearchJsp, path_SearchNoResultJsp, path_SearchOptionsJsp, path_SearchResultsJsp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildFormParams(SearchForm form) Builds and populates search form parameters including results per page, label filtering, and sort order based on user preferences and configuration.protected voidBuilds parameter maps for search initialization, creating both query strings and form inputs for the given parameters.protected voidBuilds initial parameters for facet and geo search functionality by calling buildInitParamMap for both parameter types.org.lastaflute.web.response.ActionResponsehookBefore(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called before action execution.protected booleanChecks if login is required for the current request based on configuration and user authentication status.protected org.dbflute.optional.OptionalThing<org.lastaflute.web.login.LoginManager> Returns the login manager for this action.protected org.lastaflute.web.response.HtmlResponseRedirects the user to the login page after storing current search parameters for restoration after successful authentication.protected org.lastaflute.web.response.HtmlResponseRedirects the user to the root path of the application.protected voidsetupHtmlData(org.lastaflute.web.ruts.process.ActionRuntime runtime) Sets up HTML data for rendering search-related pages.protected org.lastaflute.web.response.next.HtmlNextvirtualHost(org.lastaflute.web.response.next.HtmlNext path) Processes the given path through the virtual host helper to handle virtual host configurations and path modifications.Methods inherited from class org.codelibs.fess.app.web.base.FessBaseAction
buildThrowableMessage, copyBeanToBean, copyBeanToNewBean, copyMapToBean, createMessages, createValidator, getUserBean, godHandEpilogue, godHandMonologue, godHandPrologue, hookFinally, isCheckboxEnabled, myAppType, myUserType, newAccessContextArranger, saveError, saveInfoMethods inherited from class org.lastaflute.web.TypicalAction
calculateSqlExecutionCountLimit, createGodHandEpilogue, createGodHandMonologue, createGodHandPrologue, createGodHandResource, createTooManySqlOption, defineSqlExecutionCountDefaultLimit, filterApplicationExceptionMessageValues, handleApplicationException, myTokenGroupType, newEmbeddedMessageKeySupplier, newGodHandEpilogue, newGodHandMonologue, newGodHandPrologue, saveToken, throwVerifiedClientError, throwVerifiedIllegalTransition, verifyOrClientError, verifyOrIllegalTransition, verifyToken, verifyTokenKeepMethods inherited from class org.lastaflute.web.LastaAction
asHtml, asJson, assertArgumentNotNull, asStream, asXml, doCreateValidator, doForward, doRedirect, forward, forwardById, forwardByParam, forwardWith, hash, moreUrl, movedPermanently, myValidationGroups, newActionValidator, newHtmlResponseAsForward, newHtmlResponseAsForward, newHtmlResponseAsRedirect, newJsonResponse, newStreamResponse, newUrlChain, newXmlResponse, params, redirect, redirectById, redirectByParam, redirectWith, toActionUrl, toActionUrlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lastaflute.web.docs.LaActionDocs
document0_Action, document1_CallableSuperMethod, document2_OverridableSuperMethod, document3_InjectableLastaComponent, document4_InjectableQuickComponent, document8_WordDictionaryMethods inherited from interface org.lastaflute.web.validation.LaValidatable
throwValidationError, throwValidationErrorApi, validate, validateApi
-
Field Details
-
LABEL_FIELD
The field name used for label-based search filtering.- See Also:
-
searchHelper
Helper for performing search operations and managing search requests. -
thumbnailManager
Manager for handling thumbnail generation and display. -
labelTypeHelper
Helper for managing label types and label-based filtering. -
queryHelper
Helper for query processing and transformation. -
queryFieldConfig
Configuration for query field mappings and processing. -
roleQueryHelper
Helper for role-based query filtering and security. -
userInfoHelper
Helper for managing user information and authentication. -
osddHelper
Helper for OpenSearch Description Document (OSDD) functionality. -
popularWordHelper
Helper for managing popular search words and suggestions. -
chatClient
Client for RAG chat functionality. -
request
protected jakarta.servlet.http.HttpServletRequest requestThe HTTP servlet request object for the current request. -
searchLogSupport
protected boolean searchLogSupportFlag indicating whether search logging is enabled. -
favoriteSupport
protected boolean favoriteSupportFlag indicating whether favorite functionality is enabled. -
thumbnailSupport
protected boolean thumbnailSupportFlag indicating whether thumbnail generation is enabled.
-
-
Constructor Details
-
FessSearchAction
public FessSearchAction()Default constructor.
-
-
Method Details
-
hookBefore
public org.lastaflute.web.response.ActionResponse hookBefore(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called before action execution. Sets up search-related flags and registers popular words if enabled.- Specified by:
hookBeforein interfaceorg.lastaflute.web.hook.ActionHook- Overrides:
hookBeforein classFessBaseAction- Parameters:
runtime- the action runtime context- Returns:
- the action response, or null to continue with normal processing
-
myLoginManager
protected org.dbflute.optional.OptionalThing<org.lastaflute.web.login.LoginManager> myLoginManager()Returns the login manager for this action. Search actions do not require a login manager as they handle authentication differently.- Specified by:
myLoginManagerin classorg.lastaflute.web.TypicalAction- Returns:
- an empty OptionalThing as search actions don't use login managers
-
setupHtmlData
protected void setupHtmlData(org.lastaflute.web.ruts.process.ActionRuntime runtime) Sets up HTML data for rendering search-related pages. This includes label types, language items, user information, and various UI flags.- Overrides:
setupHtmlDatain classorg.lastaflute.web.TypicalAction- Parameters:
runtime- the action runtime context
-
isLoginRequired
protected boolean isLoginRequired()Checks if login is required for the current request based on configuration and user authentication status.- Returns:
- true if login is required, false otherwise
-
buildFormParams
Builds and populates search form parameters including results per page, label filtering, and sort order based on user preferences and configuration.- Parameters:
form- the search form to populate with parameters
-
buildInitParams
protected void buildInitParams()Builds initial parameters for facet and geo search functionality by calling buildInitParamMap for both parameter types. -
buildInitParamMap
Builds parameter maps for search initialization, creating both query strings and form inputs for the given parameters.- Parameters:
paramMap- the parameter map to processqueryKey- the key for storing query string parametersformKey- the key for storing form input parameters
-
redirectToLogin
protected org.lastaflute.web.response.HtmlResponse redirectToLogin()Redirects the user to the login page after storing current search parameters for restoration after successful authentication.- Returns:
- HTML response that redirects to the login page
-
redirectToRoot
protected org.lastaflute.web.response.HtmlResponse redirectToRoot()Redirects the user to the root path of the application.- Returns:
- HTML response that redirects to the root page
-
virtualHost
protected org.lastaflute.web.response.next.HtmlNext virtualHost(org.lastaflute.web.response.next.HtmlNext path) Processes the given path through the virtual host helper to handle virtual host configurations and path modifications.- Parameters:
path- the HTML path to process- Returns:
- the processed path with virtual host handling applied
-