Class FileUploadExecutorManager
java.lang.Object
org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager
This class is responsible for delegating the file upload requests to the different FileUploadExecutors.
The FileUploadExecutors may be registered in the following manner:
- 1. Using FileUploadConfig configuration section in the carbon.xml
- 2. Instances of
AbstractFileUploadExecutorregistered as OSGi services - 3. Using component.xml file in UI components
Searching for an FileUploadExecutor in the above 3 types of items is done using the chain of execution pattern. As soon as a FileUploadExecutor which can handle the uploaded file type is found, execution of the chain is terminated.
-
Constructor Summary
ConstructorsConstructorDescriptionFileUploadExecutorManager(org.osgi.framework.BundleContext bundleContext, org.apache.axis2.context.ConfigurationContext configCtx, String webContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExecutor(String action, String executorClass) booleanexecute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) When a FileUpload request is received, this method will be called.voidremoveExecutor(String action)
-
Constructor Details
-
FileUploadExecutorManager
public FileUploadExecutorManager(org.osgi.framework.BundleContext bundleContext, org.apache.axis2.context.ConfigurationContext configCtx, String webContext) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
-
Method Details
-
execute
public boolean execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException When a FileUpload request is received, this method will be called.- Parameters:
request- The HTTP Requestresponse- The HTTP Response- Returns:
- true - if the file uploading was successful, false - otherwise
- Throws:
IOException- If an unrecoverable error occurs during file upload
-
addExecutor
- Throws:
org.wso2.carbon.CarbonException
-
removeExecutor
-