org.wso2.wsas.transport.fileupload
Class AbstractFileUploadExecutor
java.lang.Object
org.wso2.wsas.transport.fileupload.AbstractFileUploadExecutor
- All Implemented Interfaces:
- FileUploadExecutor
- Direct Known Subclasses:
- AnyFileUploadExecutor, EJBInterfaceFileUploadExecutor, JarZipUploadExecutor, KeyStoreFileUploadExecutor, ModuleFileUploadExecutor, POJOFileUploadExecutor, ServiceFileUploadExecutor, SpringFileUploadExecutor, WSDDFileUploadExecutor
public abstract class AbstractFileUploadExecutor
- extends java.lang.Object
- implements FileUploadExecutor
Field Summary |
protected org.apache.axis2.context.ConfigurationContext |
configurationContext
|
protected static org.apache.commons.logging.Log |
log
|
Method Summary |
protected void |
checkServiceFileExtensionValidity(java.lang.String fileExtension,
java.lang.String[] allowedExtensions)
|
protected boolean |
executeCommon(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String extraStoreDirUUID)
This is the common method that can be used for Fileupload. |
protected java.lang.String |
getFileName(java.lang.String fileName)
|
protected java.util.List |
parseRequest(org.apache.commons.fileupload.servlet.ServletRequestContext requestContext)
|
protected boolean |
uploadArtifacts(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String uploadDirName,
java.lang.String[] extensions,
java.lang.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 java.io.File |
uploadFile(javax.servlet.http.HttpServletRequest request,
java.lang.String repoDir,
javax.servlet.http.HttpServletResponse response,
java.lang.String extension)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
configurationContext
protected org.apache.axis2.context.ConfigurationContext configurationContext
AbstractFileUploadExecutor
public AbstractFileUploadExecutor(org.apache.axis2.context.ConfigurationContext configurationContext)
checkServiceFileExtensionValidity
protected void checkServiceFileExtensionValidity(java.lang.String fileExtension,
java.lang.String[] allowedExtensions)
throws java.lang.Exception
- Throws:
java.lang.Exception
uploadFile
protected java.io.File uploadFile(javax.servlet.http.HttpServletRequest request,
java.lang.String repoDir,
javax.servlet.http.HttpServletResponse response,
java.lang.String extension)
throws java.io.IOException
- Throws:
java.io.IOException
getFileName
protected java.lang.String getFileName(java.lang.String fileName)
executeCommon
protected boolean executeCommon(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String extraStoreDirUUID)
throws org.wso2.utils.ServerException,
java.io.IOException
- This is the common method that can be used for Fileupload.
extraStoreDirUUID is the name of the javascript that's going to
execute on the client side at the secound run.
- Parameters:
request
- response
- extraStoreDirUUID
-
- Returns:
- Status true/fase.
- Throws:
org.wso2.utils.ServerException
java.io.IOException
parseRequest
protected java.util.List parseRequest(org.apache.commons.fileupload.servlet.ServletRequestContext requestContext)
throws org.apache.commons.fileupload.FileUploadException
- Throws:
org.apache.commons.fileupload.FileUploadException
uploadArtifacts
protected boolean uploadArtifacts(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String uploadDirName,
java.lang.String[] extensions,
java.lang.String utilityString)
throws java.io.IOException
- This is a helper method that will be used upload main entity (ex: wsdd, jar, class etc) and
its resources to a given deployer.
- Parameters:
request
- response
- uploadDirName
- extensions
- utilityString
-
- Returns:
- boolean
- Throws:
java.io.IOException