Package org.silverpeas.components.silvercrawler.servlets.handlers

## Class FunctionHandler

- java.lang.Object
- - org.silverpeas.components.silvercrawler.servlets.handlers.FunctionHandler

- Direct Known Subclasses:
    `ActivateReadWriteAccessHandler`, `BackToSearchResultsHandler`, `CreateFolderFormHandler`, `CreateFolderHandler`, `DownloadFolderHandler`, `GoToDirectoryHandler`, `IndexFileHandler`, `IndexPathHandler`, `IndexSelectedFilesHandler`, `IndexSelectedFoldersHandler`, `InitHandler`, `PortletHandler`, `ProcessDragAndDropHandler`, `RemoveFileHandler`, `RemoveFolderHandler`, `RemoveSelectedFilesHandler`, `RemoveSelectedFoldersHandler`, `RenameFileFormHandler`, `RenameFileHandler`, `RenameFolderFormHandler`, `RenameFolderHandler`, `ResolveConflictsHandler`, `SearchHandler`, `SubDirectoryFromResultHandler`, `SubDirectoryHandler`, `UnActivateReadWriteAccessHandler`, `UploadFileFormHandler`, `UploadFileHandler`, `ViewDirectoryHandler`, `ViewDownloadHistoryFromResultHandler`, `ViewDownloadHistoryHandler`, `ViewHistoryByUserHandler`

      public abstract class FunctionHandler
      extends Object

  A function handler is associated to a peas function and is called by the request router when this function has to be processed.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static String` | `ROOT_DESTINATION` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `FunctionHandler​(HandlerProvider provider)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `computeDestination​(SilverCrawlerSessionController session, jakarta.servlet.http.HttpServletRequest request)` |
    `abstract String` | `getDestination​(SilverCrawlerSessionController session, jakarta.servlet.http.HttpServletRequest request)` | Process the request and returns the response url.
    `protected HandlerProvider` | `getHandlerProvider()` |
    `protected String` | `getUserHighestRole​(SilverCrawlerSessionController sessionController)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ROOT_DESTINATION

          protected static final String ROOT_DESTINATION

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FunctionHandler

          protected FunctionHandler​(HandlerProvider provider)

  - ### Method Detail

    - #### getHandlerProvider

          protected HandlerProvider getHandlerProvider()

    - #### computeDestination

          public String computeDestination​(SilverCrawlerSessionController session,
                                           jakarta.servlet.http.HttpServletRequest request)

    - #### getDestination

          public abstract String getDestination​(SilverCrawlerSessionController session,
                                                jakarta.servlet.http.HttpServletRequest request)
                                         throws Exception

      Process the request and returns the response url.
      Parameters:
        `session` - the user request context
        `request` - the user request params
      Throws:
        `Exception`

    - #### getUserHighestRole

          protected String getUserHighestRole​(SilverCrawlerSessionController sessionController)