Package org.exoplatform.web.handler
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
Created by The eXo Platform SARL Author : Nhu Dinh Thuan nhudinhthuan@exoplatform.com Dec 9, 2006
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencodeName(String name) voidexecute(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) Serves the upload actions.booleanexecute(ControllerContext context) Execute a service.Returns the handler name.protected booleanFlag if particular handler requires lifecycle.Methods inherited from class org.exoplatform.web.WebRequestHandler
onDestroy, onInitMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
UploadHandler
public UploadHandler(org.exoplatform.container.xml.InitParams params)
-
-
Method Details
-
getHandlerName
Description copied from class:WebRequestHandlerReturns the handler name.- Specified by:
getHandlerNamein classWebRequestHandler- Returns:
- the handler name
-
execute
Description copied from class:WebRequestHandlerExecute a service.- Specified by:
executein classWebRequestHandler- 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. Anuploadaction from a request without an authenticated user and carrying anAuthorization: Bearerheader 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 theprogress,deleteorabortactions, and a logged-in user's request is never handled by the token path.- Parameters:
req- the requestres- the response- Throws:
Exception- when writing the response fails
-
getRequiresLifeCycle
protected boolean getRequiresLifeCycle()Description copied from class:WebRequestHandlerFlag if particular handler requires lifecycle.- Specified by:
getRequiresLifeCyclein classWebRequestHandler- Returns:
- true if processing of particular handler requires to be wrapped within
RequestLifeCycleblock.
-
encodeName
- Throws:
Exception
-