public class UploadedFileManagerImpl extends Object implements UploadedFileManager
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_UPLOADED_FILE_SIZE_MB |
| Constructor and Description |
|---|
UploadedFileManagerImpl(BambooHomeLocator homeLocator) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull UploadedFile |
createFile(@NotNull InputStream inputStream,
@NotNull String fileName,
@NotNull String contentType,
long size)
Creates a file on disk.
|
@NotNull UploadedFile |
createFile(@NotNull org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper requestWrapper,
@NotNull String fileParamName)
Creates a file on disk.
|
long |
getMaximumUploadedFileSizeBytes() |
@NotNull File |
getUploadedFilesDirectory() |
void |
validateFile(org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper requestWrapper,
String fileParamName) |
public static final int DEFAULT_MAX_UPLOADED_FILE_SIZE_MB
public UploadedFileManagerImpl(BambooHomeLocator homeLocator)
@NotNull public @NotNull UploadedFile createFile(@NotNull @NotNull org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper requestWrapper, @NotNull @NotNull String fileParamName) throws UploadedFileManagerException
UploadedFileManagercreateFile in interface UploadedFileManagerrequestWrapper - the wrapper containing getFile() and getFilesystemName() describing the attachmentfileParamName - name of form parameter specifying filename (in requestWrapper).UploadedFile containing details about whereabouts of the created fileUploadedFileManagerException - iff file upload fails@NotNull public @NotNull UploadedFile createFile(@NotNull @NotNull InputStream inputStream, @NotNull @NotNull String fileName, @NotNull @NotNull String contentType, long size) throws UploadedFileManagerException
UploadedFileManagercreateFile in interface UploadedFileManagerfileName - the source filenamecontentType - the content type of the passed streamsize - the size of the passed stream.UploadedFile containing details about whereabouts of the created fileUploadedFileManagerException - iff file upload failspublic long getMaximumUploadedFileSizeBytes()
getMaximumUploadedFileSizeBytes in interface UploadedFileManagerpublic void validateFile(org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper requestWrapper,
String fileParamName)
throws UploadedFileManagerException
UploadedFileManagerException@NotNull public @NotNull File getUploadedFilesDirectory()
getUploadedFilesDirectory in interface UploadedFileManagerCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.