Class AdminStorageAction
java.lang.Object
org.lastaflute.web.LastaAction
org.lastaflute.web.TypicalAction
org.codelibs.fess.app.web.base.FessBaseAction
org.codelibs.fess.app.web.base.FessAdminAction
org.codelibs.fess.app.web.admin.storage.AdminStorageAction
- 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>
Admin action for Storage management.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContainer class for path information containing separate path and name components. -
Field Summary
FieldsFields inherited from class org.codelibs.fess.app.web.base.FessAdminAction
crawlingConfigHelper, VIEWFields 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 TypeMethodDescriptionstatic AdminStorageAction.PathInfoconvertToItem(String id) Converts an encoded ID to a PathInfo object containing path and name.org.lastaflute.web.response.HtmlResponseCreates a new directory in the storage system.protected static StringcreateParentId(String prefix) Creates an encoded parent directory ID from a path prefix.createPathItems(String prefix) Creates a list of path navigation items for breadcrumb display.protected static StringDecodes a base64 encoded ID back to the original object name.static StringdecodePath(String id) Decodes an encoded path ID back to the original path.org.lastaflute.web.response.HtmlResponseDeletes a file from the storage system.static voiddeleteObject(String objectName) Deletes an object from the storage system.org.lastaflute.web.response.ActionResponseDownloads a file from the storage system.static voiddownloadObject(String objectName, org.lastaflute.web.servlet.request.stream.WrittenStreamOut out) Downloads an object from the storage system.org.lastaflute.web.response.HtmlResponseDisplays the form for editing object tags.protected static StringEncodes an object name to a URL-safe base64 string.protected StringGet the action role.getFileItems(String prefix) Retrieves a list of files and directories from the storage system.static StringgetObjectName(String path, String name) Combines path and name to create a full object name.getObjectTags(String objectName) Retrieves the tags for a storage object from the storage system.protected static StringgetPathPrefix(String path) Creates a path prefix with trailing slash if path is not empty.org.lastaflute.web.response.HtmlResponseindex()Displays the storage management index page.org.lastaflute.web.response.ActionResponseDisplays a list of files and directories in the specified path.protected voidsetupHtmlData(org.lastaflute.web.ruts.process.ActionRuntime runtime) Sets up HTML data for admin pages.static voidupdateObjectTags(String objectName, Map<String, String> tagItems) Updates the tags for a storage object in the storage system.org.lastaflute.web.response.HtmlResponseupdateTags(TagForm form) Updates the tags for a storage object.org.lastaflute.web.response.HtmlResponseUploads a file to the storage system.static voiduploadObject(String objectName, org.lastaflute.web.ruts.multipart.MultipartFormFile uploadFile) Uploads a file to the storage system.Methods inherited from class org.codelibs.fess.app.web.base.FessAdminAction
document1_CallableSuperMethod, encodePermissions, getServletContext, godHandPrologue, hookBefore, hookFinally, myLoginManager, superGodHandPrologue, validateFilePath, verifyCrudMode, writeMethods inherited from class org.codelibs.fess.app.web.base.FessBaseAction
buildThrowableMessage, copyBeanToBean, copyBeanToNewBean, copyMapToBean, createMessages, createValidator, getUserBean, godHandEpilogue, godHandMonologue, 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, document2_OverridableSuperMethod, document3_InjectableLastaComponent, document4_InjectableQuickComponent, document8_WordDictionaryMethods inherited from interface org.lastaflute.web.validation.LaValidatable
throwValidationError, throwValidationErrorApi, validate, validateApi
-
Field Details
-
ROLE
Role name for admin storage operations- See Also:
-
-
Constructor Details
-
AdminStorageAction
public AdminStorageAction()Default constructor.
-
-
Method Details
-
setupHtmlData
protected void setupHtmlData(org.lastaflute.web.ruts.process.ActionRuntime runtime) Description copied from class:FessAdminActionSets up HTML data for admin pages.This method configures common data needed for admin pages including editable flags, user roles, and forum links.
- Overrides:
setupHtmlDatain classFessAdminAction- Parameters:
runtime- the action runtime context
-
getActionRole
Description copied from class:FessAdminActionGet the action role.- Specified by:
getActionRolein classFessAdminAction- Returns:
- The action role.
-
index
@Execute @Secured({"admin-storage","admin-storage-view"}) public org.lastaflute.web.response.HtmlResponse index()Displays the storage management index page.- Returns:
- HTML response for the storage list page
-
list
@Execute @Secured({"admin-storage","admin-storage-view"}) public org.lastaflute.web.response.ActionResponse list(org.dbflute.optional.OptionalThing<String> id) Displays a list of files and directories in the specified path.- Parameters:
id- the encoded path ID to list (optional)- Returns:
- action response with the storage list or redirect
-
upload
@Execute @Secured("admin-storage") public org.lastaflute.web.response.HtmlResponse upload(ItemForm form) Uploads a file to the storage system.- Parameters:
form- the item form containing file and path information- Returns:
- HTML response redirecting to the storage list after upload
-
download
@Execute @Secured({"admin-storage","admin-storage-view"}) public org.lastaflute.web.response.ActionResponse download(String id) Downloads a file from the storage system.- Parameters:
id- the encoded ID of the file to download- Returns:
- action response with the file stream for download
-
delete
@Execute @Secured("admin-storage") public org.lastaflute.web.response.HtmlResponse delete(String id) Deletes a file from the storage system.- Parameters:
id- the encoded ID of the file to delete- Returns:
- HTML response redirecting to the storage list after deletion
-
createDir
@Execute @Secured("admin-storage") public org.lastaflute.web.response.HtmlResponse createDir(ItemForm form) Creates a new directory in the storage system.- Parameters:
form- the item form containing directory information- Returns:
- HTML response redirecting to the new directory
-
editTags
@Execute @Secured("admin-storage") public org.lastaflute.web.response.HtmlResponse editTags(TagForm form) Displays the form for editing object tags.- Parameters:
form- the tag form containing object information- Returns:
- HTML response for the tag editing form
-
updateTags
@Execute @Secured("admin-storage") public org.lastaflute.web.response.HtmlResponse updateTags(TagForm form) Updates the tags for a storage object.- Parameters:
form- the tag form containing updated tag information- Returns:
- HTML response redirecting to the storage list after update
-
updateObjectTags
Updates the tags for a storage object in the storage system.- Parameters:
objectName- the name of the object to update tags fortagItems- the map of tag items from the form- Throws:
StorageException- if the tag update fails
-
getObjectTags
Retrieves the tags for a storage object from the storage system.- Parameters:
objectName- the name of the object to get tags for- Returns:
- map of tag key-value pairs
- Throws:
StorageException- if retrieving tags fails
-
uploadObject
public static void uploadObject(String objectName, org.lastaflute.web.ruts.multipart.MultipartFormFile uploadFile) Uploads a file to the storage system.- Parameters:
objectName- the name for the object in storageuploadFile- the multipart file to upload- Throws:
StorageException- if the upload fails
-
downloadObject
public static void downloadObject(String objectName, org.lastaflute.web.servlet.request.stream.WrittenStreamOut out) Downloads an object from the storage system.- Parameters:
objectName- the name of the object to downloadout- the output stream to write the object data to- Throws:
StorageException- if the download fails
-
deleteObject
Deletes an object from the storage system.- Parameters:
objectName- the name of the object to delete- Throws:
StorageException- if the deletion fails
-
getFileItems
Retrieves a list of files and directories from the storage system.- Parameters:
prefix- the path prefix to list objects under- Returns:
- list of file and directory information maps
-
decodePath
Decodes an encoded path ID back to the original path.- Parameters:
id- the encoded path ID- Returns:
- the decoded path string
-
convertToItem
Converts an encoded ID to a PathInfo object containing path and name.- Parameters:
id- the encoded ID to convert- Returns:
- PathInfo object with separated path and name
-
createParentId
Creates an encoded parent directory ID from a path prefix.- Parameters:
prefix- the current path prefix- Returns:
- encoded parent directory ID, or empty string if at root
-
createPathItems
Creates a list of path navigation items for breadcrumb display.- Parameters:
prefix- the current path prefix- Returns:
- list of path item maps for navigation
-
getPathPrefix
Creates a path prefix with trailing slash if path is not empty.- Parameters:
path- the base path- Returns:
- path with trailing slash or empty string
-
getObjectName
Combines path and name to create a full object name.- Parameters:
path- the directory pathname- the file or directory name- Returns:
- the full object name
-
encodeId
Encodes an object name to a URL-safe base64 string.- Parameters:
objectName- the object name to encode- Returns:
- base64 encoded string
-
decodeId
Decodes a base64 encoded ID back to the original object name.- Parameters:
id- the encoded ID to decode- Returns:
- the decoded object name
-