Class TemporaryUploadedPicture
java.lang.Object
com.atlassian.confluence.user.actions.TemporaryUploadedPicture
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTemporaryUploadedPicture
(String originalFileName, int sourceWidth, int sourceHeight, String thumbnailFileName, int thumbnailWidth, int thumbnailHeight) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
static @Nullable TemporaryUploadedPicture
getPicture
(File sourceFile, String fileName, String owningUserName) Returns an object representing the original and thumbnail imagestatic @Nullable TemporaryUploadedPicture
getPicture
(InputStream source, String fileName, String owningUserName) Returns an object representing the original and thumbnail imageint
int
Doesn't have url encoding, unlikegetThumbnailFileDownloadUrl()
.Just likegetThumbnailFileDownloadPath()
but with the filename Url Encoded.int
int
-
Constructor Details
-
TemporaryUploadedPicture
-
-
Method Details
-
getPicture
public static @Nullable TemporaryUploadedPicture getPicture(File sourceFile, String fileName, String owningUserName) throws IOException Returns an object representing the original and thumbnail image- Parameters:
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 file- Returns:
- a picture or null if the image couldn't be transformed (unreadable or not-an-image)
- Throws:
com.atlassian.core.exception.FailedPredicateException
- if there is insufficient memory to process the imageIOException
- in case of I/O exception
-
getPicture
public static @Nullable TemporaryUploadedPicture getPicture(InputStream source, String fileName, String owningUserName) throws IOException Returns an object representing the original and thumbnail image- Parameters:
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 file- Returns:
- a picture or null if the image couldn't be transformed (unreadable or not-an-image)
- Throws:
com.atlassian.core.exception.FailedPredicateException
- if there is insufficient memory to process the imageIOException
- in case of I/O exception
-
getOriginalFile
-
getThumbnailFile
-
getThumbnailFileDownloadPath
Doesn't have url encoding, unlikegetThumbnailFileDownloadUrl()
. -
getThumbnailFileDownloadUrl
Just likegetThumbnailFileDownloadPath()
but with the filename Url Encoded. -
getThumbnailWidth
public int getThumbnailWidth() -
getThumbnailHeight
public int getThumbnailHeight() -
getSourceWidth
public int getSourceWidth() -
getSourceHeight
public int getSourceHeight() -
getOriginalFileName
-
cleanup
public void cleanup()
-