public class

DisabledThumbNailManager

extends Object
implements ThumbnailManager
java.lang.Object
   ↳ com.atlassian.jira.issue.thumbnail.DisabledThumbNailManager

Summary

[Expand]
Inherited Fields
From interface com.atlassian.jira.issue.thumbnail.ThumbnailManager
Public Constructors
DisabledThumbNailManager()
Public Methods
boolean checkToolkit()
Checks whether there is an "Abstract Window Toolkit" (AWT Toolkit) available.
void deleteThumbnailForAttachment(Issue issue, Attachment attachment)
Deletes the generated thumbnail for an attachment, if exists.
void deleteThumbnailsForIssue(Issue issue)
Deletes the generated thumbnails for the attachments of an issue.
Thumbnail getThumbnail(Issue issue, Attachment attachment)
Returns the Thumbnail that corresponds to an Attachment, or null if the given attachment is not an image.
Thumbnail getThumbnail(Attachment attachment)
Returns the Thumbnail that corresponds to an Attachment, or null if the given attachment is not an image.
Collection<Thumbnail> getThumbnails(Issue issue, ApplicationUser user)
Retrieves Thumbnails for an Issue
boolean isThumbnailable(Issue issue, Attachment attachment)
Indicates whether JIRA can generate a thumbnail for the given attachment.
boolean isThumbnailable(Attachment attachment)
Indicates whether JIRA can generate a thumbnail for the given attachment.
<T> T streamThumbnailContent(Attachment attachment, InputStreamConsumer<T> consumer)
Get binary content of the thumbnail
ThumbnailedImage toThumbnailedImage(Thumbnail thumbnail)
Converts a Thumbnail into an ThumbnailedImage.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.thumbnail.ThumbnailManager

Public Constructors

public DisabledThumbNailManager ()

Public Methods

public boolean checkToolkit ()

Checks whether there is an "Abstract Window Toolkit" (AWT Toolkit) available.

Returns
  • true if one is available

public void deleteThumbnailForAttachment (Issue issue, Attachment attachment)

Deletes the generated thumbnail for an attachment, if exists.

Parameters
issue the issue for the attachment (passed in for performance reasons)
attachment an Attachment

public void deleteThumbnailsForIssue (Issue issue)

Deletes the generated thumbnails for the attachments of an issue.

Parameters
issue the issue whose attachments' thumbnails will be deleted.

public Thumbnail getThumbnail (Issue issue, Attachment attachment)

Returns the Thumbnail that corresponds to an Attachment, or null if the given attachment is not an image.

Parameters
issue the issue for the attachment (passed in for performance reasons)
attachment an Attachment
Returns
  • returns a Thumbnail, or null

public Thumbnail getThumbnail (Attachment attachment)

Returns the Thumbnail that corresponds to an Attachment, or null if the given attachment is not an image.

Parameters
attachment an Attachment
Returns
  • returns a Thumbnail, or null

public Collection<Thumbnail> getThumbnails (Issue issue, ApplicationUser user)

Retrieves Thumbnails for an Issue

Parameters
issue the issue to get the thumnails for.
user the user on whose behalf the request is made.
Returns
  • the thumbnails.
Throws
Exception

public boolean isThumbnailable (Issue issue, Attachment attachment)

Indicates whether JIRA can generate a thumbnail for the given attachment. This method may perform better than isThumbnailable(com.atlassian.jira.issue.attachment.Attachment) because it doesn't need to look up the issue.

Parameters
issue the issue to which the attachment relates (if null, this method will look it up)
attachment the attachment (required)
Returns
  • see above

public boolean isThumbnailable (Attachment attachment)

Indicates whether JIRA can generate a thumbnail for the given attachment.

Parameters
attachment the attachment (required)
Returns
  • see above

public T streamThumbnailContent (Attachment attachment, InputStreamConsumer<T> consumer)

Get binary content of the thumbnail

Parameters
attachment an Attachment
consumer function that consumes the thumbnail data.
Returns
  • the result of the function after it consumed the thumbnail data.
Throws
IOException

public ThumbnailedImage toThumbnailedImage (Thumbnail thumbnail)

Converts a Thumbnail into an ThumbnailedImage. The ThumbnailedImage is an analog of the atlassian-core Thumbnail but it contains JIRA-specific methods for getting the image URL, etc.

Parameters
thumbnail a Thumbnail, or null
Returns
  • an ImageThumbnail, or null