Class UploadHandler

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.web.WebRequestHandler
org.exoplatform.web.handler.UploadHandler
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class UploadHandler extends WebRequestHandler
Created by The eXo Platform SARL Author : Nhu Dinh Thuan nhudinhthuan@exoplatform.com Dec 9, 2006
  • Constructor Details

    • UploadHandler

      public UploadHandler(org.exoplatform.container.xml.InitParams params)
  • Method Details

    • getHandlerName

      public String getHandlerName()
      Description copied from class: WebRequestHandler
      Returns the handler name.
      Specified by:
      getHandlerName in class WebRequestHandler
      Returns:
      the handler name
    • execute

      public boolean execute(ControllerContext context) throws Exception
      Description copied from class: WebRequestHandler
      Execute a service.
      Specified by:
      execute in class WebRequestHandler
      Parameters:
      context - the controller context
      Returns:
      true if the handler was able to handle the request
      Throws:
      Exception - any exception
    • execute

      public void execute(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws Exception
      Serves the upload actions. An upload action from a request without an authenticated user and carrying an Authorization: Bearer header is authorized by that one-time upload token alone (executeTokenUpload(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, java.lang.String)); every other request keeps the session-based behaviour, so a token never authorizes the progress, delete or abort actions, and a logged-in user's request is never handled by the token path.
      Parameters:
      req - the request
      res - the response
      Throws:
      Exception - when writing the response fails
    • getRequiresLifeCycle

      protected boolean getRequiresLifeCycle()
      Description copied from class: WebRequestHandler
      Flag if particular handler requires lifecycle.
      Specified by:
      getRequiresLifeCycle in class WebRequestHandler
      Returns:
      true if processing of particular handler requires to be wrapped within RequestLifeCycle block.
    • encodeName

      public String encodeName(String name) throws Exception
      Throws:
      Exception