com.atlassian.jira.issue.attachment
Class AttachmentsCategoriser

java.lang.Object
  extended by com.atlassian.jira.issue.attachment.AttachmentsCategoriser

public class AttachmentsCategoriser
extends Object

Helper class for handling attachments on the view issue page. This class sorts attachments into two categories:

This is useful because of the different way in which these two types of attachments are displayed on the view issue page. Note that an attachment may be "thumbnailable" but not have a thumbnail in practice, i.e. because there was an error creating the thumbnail. This class cares not about theoretical thumbnailability, but only about actual presence/absence of a thumbnail.

Since:
v5.0

Nested Class Summary
 class AttachmentsCategoriser.AttachmentItemCreator
           
static interface AttachmentsCategoriser.Source
           
 
Constructor Summary
AttachmentsCategoriser(ThumbnailManager thumbnailManager, AttachmentsCategoriser.Source attachmentsSource)
          Creates a new AttachmentsCategoriser
 
Method Summary
 AttachmentItems items()
           
 AttachmentItems itemsThatDoNotHaveThumbs()
           
 AttachmentItems itemsThatHaveThumbs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentsCategoriser

public AttachmentsCategoriser(ThumbnailManager thumbnailManager,
                              AttachmentsCategoriser.Source attachmentsSource)
Creates a new AttachmentsCategoriser

Parameters:
thumbnailManager - a ThumbnailManager
attachmentsSource - the Source used to get Attachments from
Method Detail

items

public AttachmentItems items()
Returns:
a AttachmentItems containing all the attachments for current issue

itemsThatHaveThumbs

public AttachmentItems itemsThatHaveThumbs()
Returns:
as AttachmentItems containing all the attachments that have thumbnails

itemsThatDoNotHaveThumbs

public AttachmentItems itemsThatDoNotHaveThumbs()
Returns:
as AttachmentItems containing all the attachments that do not have thumbnails


Copyright © 2002-2014 Atlassian. All Rights Reserved.