Class FileBrowseController

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

    public abstract class FileBrowseController
    extends MultipartFormController
    Since:
    7.0
    Author:
    Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
    • Method Detail

      • getPermission

        @NotNull
        protected abstract Permission getPermission()
      • checkPermissions

        protected boolean checkPermissions​(AuthorityHolder authorityHolder)
      • getTreeName

        @NotNull
        protected abstract java.lang.String getTreeName()
      • getRootDirectoryDescription

        @NotNull
        protected abstract java.lang.String getRootDirectoryDescription()
      • getWebAccessHelper

        @NotNull
        protected abstract WebAccessHelper getWebAccessHelper()
      • isUploadSupported

        protected boolean isUploadSupported()
      • isUploadToAnySubdirectory

        protected boolean isUploadToAnySubdirectory()
      • getUploadResponseJsBase

        @NotNull
        protected abstract java.lang.String getUploadResponseJsBase()
      • isDeleteSupported

        protected boolean isDeleteSupported()
      • deleteFile

        protected void deleteFile​(@NotNull
                                  java.lang.String fileName)
      • isEditSupported

        protected boolean isEditSupported()
      • getFileFromRequest

        @Nullable
        protected java.io.File getFileFromRequest​(@NotNull
                                                  javax.servlet.http.HttpServletRequest request)
      • checkAndGetFile

        @NotNull
        protected java.io.File checkAndGetFile​(java.lang.String path)
      • doGet

        protected org.springframework.web.servlet.ModelAndView doGet​(@NotNull
                                                                     javax.servlet.http.HttpServletRequest request,
                                                                     @NotNull
                                                                     javax.servlet.http.HttpServletResponse response)
        Description copied from class: BaseFormXmlController
        Implement this method to process GET requests. Usually on GET request a form bean is created and a page is shown.
        Overrides:
        doGet in class MultipartFormController
        Parameters:
        request - HTTP request
        response - HTTP response
        Returns:
        model and view components
      • doPost

        protected org.springframework.web.servlet.ModelAndView doPost​(@NotNull
                                                                      javax.servlet.http.HttpServletRequest request,
                                                                      @NotNull
                                                                      javax.servlet.http.HttpServletResponse response)
        Specified by:
        doPost in class MultipartFormController
      • error

        @NotNull
        protected org.springframework.web.servlet.ModelAndView error​(@NotNull
                                                                     org.springframework.web.servlet.ModelAndView modelAndView,
                                                                     @NotNull
                                                                     java.lang.String error)
      • fixSlash

        @Nullable
        public static java.lang.String fixSlash​(@Nullable
                                                java.lang.String path)