public class TemporaryUploadedPicture extends Object implements Serializable
Constructor and Description |
---|
TemporaryUploadedPicture(String originalFileName,
int sourceWidth,
int sourceHeight,
String thumbnailFileName,
int thumbnailWidth,
int thumbnailHeight) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
File |
getOriginalFile() |
String |
getOriginalFileName() |
static TemporaryUploadedPicture |
getPicture(File sourceFile,
String fileName,
String owningUserName)
Returns an object representing the original and thumbnail image
|
static TemporaryUploadedPicture |
getPicture(InputStream source,
String fileName,
String owningUserName)
Returns an object representing the original and thumbnail image
|
int |
getSourceHeight() |
int |
getSourceWidth() |
File |
getThumbnailFile() |
String |
getThumbnailFileDownloadPath()
Doesn't have url encoding, unlike
getThumbnailFileDownloadUrl() . |
String |
getThumbnailFileDownloadUrl()
Just like
getThumbnailFileDownloadPath() but with the filename Url Encoded. |
int |
getThumbnailHeight() |
int |
getThumbnailWidth() |
@Nullable public static TemporaryUploadedPicture getPicture(File sourceFile, String fileName, String owningUserName) throws IOException
sourceFile
- the image uploaded by the userfileName
- a name for this image. It has no effect in the computation.owningUserName
- login of the user who uploaded the filecom.atlassian.core.exception.FailedPredicateException
- if there is insufficient memory to process the imageIOException
- in case of I/O exception@Nullable public static TemporaryUploadedPicture getPicture(InputStream source, String fileName, String owningUserName) throws IOException
source
- the image uploaded by the userfileName
- a name for this image. It has no effect in the computation.owningUserName
- login of the user who uploaded the filecom.atlassian.core.exception.FailedPredicateException
- if there is insufficient memory to process the imageIOException
- in case of I/O exceptionpublic File getOriginalFile()
public File getThumbnailFile()
public String getThumbnailFileDownloadPath()
getThumbnailFileDownloadUrl()
.public String getThumbnailFileDownloadUrl()
getThumbnailFileDownloadPath()
but with the filename Url Encoded.public int getThumbnailWidth()
public int getThumbnailHeight()
public int getSourceWidth()
public int getSourceHeight()
public String getOriginalFileName()
public void cleanup()
Copyright © 2003–2016 Atlassian. All rights reserved.