Package org.codelibs.fess.app.web.base
Class FessBaseAction
java.lang.Object
org.lastaflute.web.LastaAction
org.lastaflute.web.TypicalAction
org.codelibs.fess.app.web.base.FessBaseAction
- 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:
FessAdminAction,FessApiAction,FessSearchAction
public abstract class FessBaseAction
extends org.lastaflute.web.TypicalAction
implements org.lastaflute.web.validation.LaValidatable<org.codelibs.fess.mylasta.action.FessMessages>, org.codelibs.fess.mylasta.action.FessHtmlPath
The base action class for Fess web application.
This abstract class provides common functionality for all Fess web actions,
including user authentication, validation, message handling, and access context management.
It extends LastaFlute's TypicalAction and implements validation and HTML path interfaces.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccessTokenHelperHelper for managing access tokens and API authentication.protected ActivityHelperHelper for managing user activity logging and tracking.protected static final StringThe application type for FESs, e.g.protected org.codelibs.fess.mylasta.direction.FessConfigConfiguration manager for Fess application settings.protected FessLoginAssistLogin assistance helper for managing user authentication and session.protected org.lastaflute.web.servlet.request.RequestManagerManager for handling HTTP request operations.protected org.lastaflute.web.servlet.request.ResponseManagerManager for handling HTTP response operations.protected org.lastaflute.web.servlet.session.SessionManagerSession manager for handling HTTP session operations.protected SystemHelperSystem helper for various system-level operations.protected org.lastaflute.core.time.TimeManagerTime manager for handling date and time operations.protected static final StringThe user type for Admin, e.g.protected ViewHelperHelper for view-related operations and rendering.Fields 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 StringBuilds a comprehensive error message from a throwable and its causes.protected static voidcopyBeanToBean(Object src, Object dest, Consumer<org.codelibs.core.beans.util.CopyOptions> option) Copies properties from source bean to destination bean.protected static <T> TcopyBeanToNewBean(Object src, Class<T> destClass) Copies properties from source bean to a new instance of the destination class.protected static voidcopyMapToBean(Map<String, ? extends Object> src, Object dest, Consumer<org.codelibs.core.beans.util.CopyOptions> option) Copies properties from a map to a bean object.org.codelibs.fess.mylasta.action.FessMessagesCreates a new messages instance for handling validation and user messages.org.lastaflute.web.validation.ActionValidator<org.codelibs.fess.mylasta.action.FessMessages> protected org.dbflute.optional.OptionalThing<org.codelibs.fess.mylasta.action.FessUserBean> Gets the current user bean from the session.final voidgodHandEpilogue(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called after action execution.final org.lastaflute.web.response.ActionResponsegodHandMonologue(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called during action execution.org.lastaflute.web.response.ActionResponsegodHandPrologue(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called before action execution.org.lastaflute.web.response.ActionResponsehookBefore(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called before action processing.voidhookFinally(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called in the finally block of action processing.static booleanisCheckboxEnabled(String value) Checks if a checkbox value represents an enabled state.protected StringReturns the application type identifier for this Fess application.protected org.dbflute.optional.OptionalThing<String> Returns the user type identifier for this application.protected org.lastaflute.db.dbflute.accesscontext.AccessContextArrangerCreates a new access context arranger for database operations.protected voidsaveError(org.lastaflute.web.validation.VaMessenger<org.codelibs.fess.mylasta.action.FessMessages> validationMessagesLambda) Saves error messages to the session.protected voidsaveInfo(org.lastaflute.web.validation.VaMessenger<org.codelibs.fess.mylasta.action.FessMessages> validationMessagesLambda) Saves informational messages to the session.Methods inherited from class org.lastaflute.web.TypicalAction
calculateSqlExecutionCountLimit, createGodHandEpilogue, createGodHandMonologue, createGodHandPrologue, createGodHandResource, createTooManySqlOption, defineSqlExecutionCountDefaultLimit, filterApplicationExceptionMessageValues, handleApplicationException, myLoginManager, myTokenGroupType, newEmbeddedMessageKeySupplier, newGodHandEpilogue, newGodHandMonologue, newGodHandPrologue, saveToken, setupHtmlData, 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
-
APP_TYPE
The application type for FESs, e.g. used by access context.- See Also:
-
USER_TYPE
The user type for Admin, e.g. used by access context.- See Also:
-
fessLoginAssist
Login assistance helper for managing user authentication and session. -
sessionManager
protected org.lastaflute.web.servlet.session.SessionManager sessionManagerSession manager for handling HTTP session operations. -
fessConfig
protected org.codelibs.fess.mylasta.direction.FessConfig fessConfigConfiguration manager for Fess application settings. -
activityHelper
Helper for managing user activity logging and tracking. -
responseManager
protected org.lastaflute.web.servlet.request.ResponseManager responseManagerManager for handling HTTP response operations. -
timeManager
protected org.lastaflute.core.time.TimeManager timeManagerTime manager for handling date and time operations. -
systemHelper
System helper for various system-level operations. -
accessTokenHelper
Helper for managing access tokens and API authentication. -
viewHelper
Helper for view-related operations and rendering. -
requestManager
protected org.lastaflute.web.servlet.request.RequestManager requestManagerManager for handling HTTP request operations.
-
-
Constructor Details
-
FessBaseAction
public FessBaseAction()Default constructor.
-
-
Method Details
-
godHandPrologue
public org.lastaflute.web.response.ActionResponse godHandPrologue(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called before action execution. This method refreshes the user information if a user is logged in and delegates to the view helper's action hook.- Specified by:
godHandProloguein interfaceorg.lastaflute.web.hook.ActionHook- Overrides:
godHandProloguein classorg.lastaflute.web.TypicalAction- Parameters:
runtime- the action runtime context- Returns:
- the action response, or null to continue with normal processing
-
godHandMonologue
public final org.lastaflute.web.response.ActionResponse godHandMonologue(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called during action execution. This method delegates to the view helper's action hook for processing.- Specified by:
godHandMonologuein interfaceorg.lastaflute.web.hook.ActionHook- Overrides:
godHandMonologuein classorg.lastaflute.web.TypicalAction- Parameters:
runtime- the action runtime context- Returns:
- the action response, or null to continue with normal processing
-
godHandEpilogue
public final void godHandEpilogue(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called after action execution. This method delegates to the view helper's action hook for cleanup.- Specified by:
godHandEpiloguein interfaceorg.lastaflute.web.hook.ActionHook- Overrides:
godHandEpiloguein classorg.lastaflute.web.TypicalAction- Parameters:
runtime- the action runtime context
-
hookBefore
public org.lastaflute.web.response.ActionResponse hookBefore(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called before action processing. This method can be overridden by subclasses to customize behavior.- Specified by:
hookBeforein interfaceorg.lastaflute.web.hook.ActionHook- Overrides:
hookBeforein classorg.lastaflute.web.TypicalAction- Parameters:
runtime- the action runtime context- Returns:
- the action response, or null to continue with normal processing
-
hookFinally
public void hookFinally(org.lastaflute.web.ruts.process.ActionRuntime runtime) Hook method called in the finally block of action processing. This method delegates to the view helper's action hook for final cleanup.- Specified by:
hookFinallyin interfaceorg.lastaflute.web.hook.ActionHook- Overrides:
hookFinallyin classorg.lastaflute.web.TypicalAction- Parameters:
runtime- the action runtime context
-
newAccessContextArranger
protected org.lastaflute.db.dbflute.accesscontext.AccessContextArranger newAccessContextArranger()Creates a new access context arranger for database operations. This method provides a dummy implementation as Fess does not use DBFlute extensively.- Specified by:
newAccessContextArrangerin classorg.lastaflute.web.TypicalAction- Returns:
- a new access context arranger
-
getUserBean
protected org.dbflute.optional.OptionalThing<org.codelibs.fess.mylasta.action.FessUserBean> getUserBean()Gets the current user bean from the session. This method returns the concrete FessUserBean class instead of the generic type.- Specified by:
getUserBeanin classorg.lastaflute.web.TypicalAction- Returns:
- an optional containing the current user bean, or empty if not logged in
-
myAppType
Returns the application type identifier for this Fess application.- Specified by:
myAppTypein classorg.lastaflute.web.TypicalAction- Returns:
- the application type string "FES"
-
myUserType
Returns the user type identifier for this application.- Specified by:
myUserTypein classorg.lastaflute.web.TypicalAction- Returns:
- an optional containing the user type string "A" for Admin
-
createValidator
public org.lastaflute.web.validation.ActionValidator<org.codelibs.fess.mylasta.action.FessMessages> createValidator()- Specified by:
createValidatorin interfaceorg.lastaflute.web.validation.LaValidatable<org.codelibs.fess.mylasta.action.FessMessages>- Overrides:
createValidatorin classorg.lastaflute.web.LastaAction
-
createMessages
public org.codelibs.fess.mylasta.action.FessMessages createMessages()Creates a new messages instance for handling validation and user messages. This method can be called by the application to create message containers.- Specified by:
createMessagesin interfaceorg.lastaflute.web.validation.LaValidatable<org.codelibs.fess.mylasta.action.FessMessages>- Overrides:
createMessagesin classorg.lastaflute.web.LastaAction- Returns:
- a new FessMessages instance
-
saveInfo
protected void saveInfo(org.lastaflute.web.validation.VaMessenger<org.codelibs.fess.mylasta.action.FessMessages> validationMessagesLambda) Saves informational messages to the session. The messages will be displayed to the user on the next page load.- Parameters:
validationMessagesLambda- a lambda function to configure the messages
-
saveError
protected void saveError(org.lastaflute.web.validation.VaMessenger<org.codelibs.fess.mylasta.action.FessMessages> validationMessagesLambda) Saves error messages to the session. The messages will be displayed to the user on the next page load.- Parameters:
validationMessagesLambda- a lambda function to configure the error messages
-
copyBeanToBean
protected static void copyBeanToBean(Object src, Object dest, Consumer<org.codelibs.core.beans.util.CopyOptions> option) Copies properties from source bean to destination bean. This is a utility method that wraps BeanUtil.copyBeanToBean with custom options.- Parameters:
src- the source bean objectdest- the destination bean objectoption- a consumer function to configure copy options
-
copyMapToBean
protected static void copyMapToBean(Map<String, ? extends Object> src, Object dest, Consumer<org.codelibs.core.beans.util.CopyOptions> option) Copies properties from a map to a bean object. This is a utility method that wraps BeanUtil.copyMapToBean with custom options.- Parameters:
src- the source map containing property valuesdest- the destination bean objectoption- a consumer function to configure copy options
-
copyBeanToNewBean
Copies properties from source bean to a new instance of the destination class. This is a utility method that wraps BeanUtil.copyBeanToNewBean.- Type Parameters:
T- the type of the destination class- Parameters:
src- the source bean objectdestClass- the class of the destination bean- Returns:
- a new instance of the destination class with copied properties
-
buildThrowableMessage
Builds a comprehensive error message from a throwable and its causes. This method traverses the cause chain and concatenates all error messages.- Parameters:
t- the throwable to build message from- Returns:
- a string containing all error messages in the cause chain
-
isCheckboxEnabled
Checks if a checkbox value represents an enabled state. This method considers "on" and "true" (case-insensitive) as enabled values.- Parameters:
value- the checkbox value to check- Returns:
- true if the value represents an enabled checkbox, false otherwise
-