com.atlassian.confluence.pages.thumbnail
Class ThumbnailInfo

java.lang.Object
  extended by com.atlassian.confluence.pages.thumbnail.ThumbnailInfo

public class ThumbnailInfo
extends java.lang.Object


Field Summary
static int THUMBNAIL_DEFAULT_WIDTH
           
 
Constructor Summary
ThumbnailInfo(Attachment attachment, java.io.InputStream attachmentData, java.lang.String attachmentsPath)
          This method closes the InputStream given to it.
 
Method Summary
 Attachment getAttachment()
           
 java.lang.String getImageMimeType()
           
 int getOriginalHeight()
          Get the height of the attachment before thumbnailing
 int getOriginalWidth()
          Get the width of the attachment before thumbnailing
 java.lang.String getPopupLink(java.lang.String imageParameters)
          Get some HTML that will cause a thumbnail to be rendered inline, with a popup-link to the full-sized image.
 java.lang.String getPopupLinkPrefix()
          This method generates an a tag with the 'confluence-thumbnail-link' class.
 java.lang.String getPopupLinkSuffix()
           
 int getThumbnailHeight()
          Get the height of the thumbnail image.
 java.lang.String getThumbnailImageHtml(java.lang.String imageParameters)
           
 java.lang.String getThumbnailUrlPath()
          Get the URL path for downloading the thumbnail, relative to the application's context-root
 int getThumbnailWidth()
          Get the width of the thumbnail image.
static boolean systemSupportsThumbnailing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THUMBNAIL_DEFAULT_WIDTH

public static final int THUMBNAIL_DEFAULT_WIDTH
See Also:
Constant Field Values
Constructor Detail

ThumbnailInfo

public ThumbnailInfo(Attachment attachment,
                     java.io.InputStream attachmentData,
                     java.lang.String attachmentsPath)
This method closes the InputStream given to it.

Method Detail

systemSupportsThumbnailing

public static boolean systemSupportsThumbnailing()

getOriginalWidth

public int getOriginalWidth()
Get the width of the attachment before thumbnailing

Returns:
the width in pixels of the attachment before thumbnailing

getOriginalHeight

public int getOriginalHeight()
Get the height of the attachment before thumbnailing

Returns:
the height in pixels of the attachment before thumbnailing

getThumbnailWidth

public int getThumbnailWidth()
Get the width of the thumbnail image. This should never be greater than the configured maximum thumbnail width.

Returns:
the width of the thumbnail image in pixels

getThumbnailHeight

public int getThumbnailHeight()
Get the height of the thumbnail image. This should never be greater than the configured maximum thumbnail height.

Returns:
the height of the thumbnail image in pixels

getThumbnailUrlPath

public java.lang.String getThumbnailUrlPath()
Get the URL path for downloading the thumbnail, relative to the application's context-root

Returns:
the path for downloading the thumbnail, relative to the application's context-root;

getPopupLink

public java.lang.String getPopupLink(java.lang.String imageParameters)
Get some HTML that will cause a thumbnail to be rendered inline, with a popup-link to the full-sized image. You can optionally supply some additional parameters to include in the img tag. This method generates an a tag with the 'confluence-thumbnail-link' class. The 'image-effects.js' file will attach an onclick function during the page initialisation.

Parameters:
imageParameters - a string of parameters suitable for inserting into an HTML img tag. Ignored if null.
Returns:
the appropriate popup image HTML

getPopupLinkPrefix

public java.lang.String getPopupLinkPrefix()
This method generates an a tag with the 'confluence-thumbnail-link' class. The 'image-effects.js' file will attach an onclick function during the page initialisation.

Returns:
the popup prefix html
See Also:
getPopupLinkSuffix()

getPopupLinkSuffix

public java.lang.String getPopupLinkSuffix()

getThumbnailImageHtml

public java.lang.String getThumbnailImageHtml(java.lang.String imageParameters)

getAttachment

public Attachment getAttachment()

getImageMimeType

public java.lang.String getImageMimeType()


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.