com.atlassian.confluence.pages.attachments
Class DefaultImageDetailsManager

java.lang.Object
  extended by com.atlassian.confluence.pages.attachments.DefaultImageDetailsManager
All Implemented Interfaces:
ImageDetailsManager, com.atlassian.event.EventListener

public final class DefaultImageDetailsManager
extends java.lang.Object
implements ImageDetailsManager, com.atlassian.event.EventListener

Calculates, stores and retrieves ImageDetails for Attachments.

This manager listens for attachment events in order to proactively store image details for newly created or updated attachments, and to delete image details for deleted or outdated attachments.

ImageDetails are not stored for old versions of attachments, they are calculated each time when required.


Constructor Summary
DefaultImageDetailsManager()
           
 
Method Summary
 java.lang.Class<?>[] getHandledEventClasses()
           
 ImageDetails getImageDetails(Attachment attachment)
          If attachment is an intelligble image, then this method returns the ImageDetails for it.
 void handleEvent(com.atlassian.event.Event event)
           
 void setAttachmentManager(AttachmentManager attachmentManager)
           
 void setImageDetailsDao(ImageDetailsDao imageDetailsDao)
           
 void setThumbnailManager(ThumbnailManager thumbnailManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultImageDetailsManager

public DefaultImageDetailsManager()
Method Detail

getImageDetails

public ImageDetails getImageDetails(Attachment attachment)
Description copied from interface: ImageDetailsManager
If attachment is an intelligble image, then this method returns the ImageDetails for it. Otherwise it returns null.

Specified by:
getImageDetails in interface ImageDetailsManager
Returns:
image details of the attachment or null if the attachment could not be parsed as an image.

handleEvent

public void handleEvent(com.atlassian.event.Event event)
Specified by:
handleEvent in interface com.atlassian.event.EventListener

getHandledEventClasses

public java.lang.Class<?>[] getHandledEventClasses()
Specified by:
getHandledEventClasses in interface com.atlassian.event.EventListener

setAttachmentManager

public void setAttachmentManager(AttachmentManager attachmentManager)

setImageDetailsDao

public void setImageDetailsDao(ImageDetailsDao imageDetailsDao)

setThumbnailManager

public void setThumbnailManager(ThumbnailManager thumbnailManager)


Copyright © 2003-2013 Atlassian. All Rights Reserved.