public abstract class AbstractFileUploadExecutor extends Object
FileUploadExecutorManager| Modifier and Type | Field and Description |
|---|---|
protected org.apache.axis2.context.ConfigurationContext |
configurationContext |
protected static org.apache.commons.logging.Log |
log |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFileUploadExecutor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkServiceFileExtensionValidity(String fileExtension,
String[] allowedExtensions) |
abstract boolean |
execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected boolean |
executeCommon(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is the common method that can be used for Fileupload.
|
protected String |
generateUUID() |
protected List<org.wso2.carbon.utils.FileItemData> |
getAllFileItems() |
protected String |
getContextRoot(javax.servlet.http.HttpServletRequest request) |
protected String |
getErrorRedirectionPage() |
protected Map<String,ArrayList<org.wso2.carbon.utils.FileItemData>> |
getFileItemsMap() |
protected String |
getFileName(String fileName) |
protected Map<String,ArrayList<String>> |
getFormFieldsMap() |
List<String> |
getFormFieldValue(String formFieldName)
Retrieve the form field values of the provided form field with name
formFieldName |
protected String |
getWorkingDir() |
protected void |
parseRequest(javax.servlet.http.HttpServletRequest request) |
protected List |
parseRequest(org.apache.commons.fileupload.servlet.ServletRequestContext requestContext) |
protected boolean |
uploadArtifacts(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String uploadDirName,
String[] extensions,
String utilityString)
This is a helper method that will be used upload main entity (ex: wsdd, jar, class etc) and
its resources to a given deployer.
|
protected File |
uploadFile(javax.servlet.http.HttpServletRequest request,
String repoDir,
javax.servlet.http.HttpServletResponse response,
String extension) |
protected static final org.apache.commons.logging.Log log
protected org.apache.axis2.context.ConfigurationContext configurationContext
public abstract boolean execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws org.wso2.carbon.CarbonException,
IOException
org.wso2.carbon.CarbonExceptionIOExceptionprotected String getErrorRedirectionPage()
protected void parseRequest(javax.servlet.http.HttpServletRequest request)
throws FileUploadFailedException,
FileSizeLimitExceededException
protected String getWorkingDir()
protected String generateUUID()
protected List parseRequest(org.apache.commons.fileupload.servlet.ServletRequestContext requestContext) throws org.apache.commons.fileupload.FileUploadException
org.apache.commons.fileupload.FileUploadExceptionprotected void checkServiceFileExtensionValidity(String fileExtension, String[] allowedExtensions) throws org.apache.commons.fileupload.FileUploadException
org.apache.commons.fileupload.FileUploadExceptionprotected File uploadFile(javax.servlet.http.HttpServletRequest request, String repoDir, javax.servlet.http.HttpServletResponse response, String extension) throws org.apache.commons.fileupload.FileUploadException
org.apache.commons.fileupload.FileUploadExceptionprotected boolean executeCommon(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws org.apache.commons.fileupload.FileUploadException
request - response - org.apache.commons.fileupload.FileUploadExceptionprotected boolean uploadArtifacts(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String uploadDirName,
String[] extensions,
String utilityString)
throws org.apache.commons.fileupload.FileUploadException,
IOException
request - response - uploadDirName - extensions - utilityString - IOExceptionorg.apache.commons.fileupload.FileUploadExceptionprotected List<org.wso2.carbon.utils.FileItemData> getAllFileItems()
protected String getContextRoot(javax.servlet.http.HttpServletRequest request)
public List<String> getFormFieldValue(String formFieldName)
formFieldNameformFieldName - Name of the form field to be retrievedprotected Map<String,ArrayList<org.wso2.carbon.utils.FileItemData>> getFileItemsMap()
Copyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.