Class DefaultImageDetailsManager
- java.lang.Object
-
- com.atlassian.confluence.pages.attachments.DefaultImageDetailsManager
-
- All Implemented Interfaces:
ImageDetailsManager
,com.atlassian.event.EventListener
public final class DefaultImageDetailsManager extends Object implements ImageDetailsManager, com.atlassian.event.EventListener
Calculates, stores and retrievesImageDetails
forAttachment
s.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
Constructors Constructor Description DefaultImageDetailsManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>[]
getHandledEventClasses()
ImageDetails
getImageDetails(Attachment attachment)
Ifattachment
is an intelligble image, then this method returns theImageDetails
for it.void
handleEvent(com.atlassian.event.Event event)
void
setAttachmentManager(AttachmentManager attachmentManager)
void
setImageDetailsDao(ImageDetailsDao imageDetailsDao)
void
setThumbnailManager(ThumbnailManager thumbnailManager)
-
-
-
Method Detail
-
getImageDetails
public ImageDetails getImageDetails(Attachment attachment)
Description copied from interface:ImageDetailsManager
Ifattachment
is an intelligble image, then this method returns theImageDetails
for it. Otherwise it returns null.- Specified by:
getImageDetails
in interfaceImageDetailsManager
- 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 interfacecom.atlassian.event.EventListener
-
getHandledEventClasses
public Class<?>[] getHandledEventClasses()
- Specified by:
getHandledEventClasses
in interfacecom.atlassian.event.EventListener
-
setAttachmentManager
public void setAttachmentManager(AttachmentManager attachmentManager)
-
setImageDetailsDao
public void setImageDetailsDao(ImageDetailsDao imageDetailsDao)
-
setThumbnailManager
public void setThumbnailManager(ThumbnailManager thumbnailManager)
-
-