Class ThumbnailRemovingListener

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

    public class ThumbnailRemovingListener
    extends Object
    implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
    Removes thumbnails when an attachment is removed or updated. In the case of an update, this allows a new thumbnail to be generated to reflect the latest version.
    • Constructor Detail

      • ThumbnailRemovingListener

        public ThumbnailRemovingListener​(ThumbnailManager thumbnailManager,
                                         @Qualifier("attachmentManager")
                                         AttachmentManager attachmentManager,
                                         com.atlassian.event.api.EventPublisher eventPublisher)
    • Method Detail

      • handleAttachmentUpdateEvent

        @EventListener
        public void handleAttachmentUpdateEvent​(AttachmentUpdateEvent event)
      • handleAttachmentRemoveEvent

        @EventListener
        public void handleAttachmentRemoveEvent​(AttachmentRemoveEvent event)
      • handleAttachmentVersionRemoveEvent

        @EventListener
        public void handleAttachmentVersionRemoveEvent​(AttachmentVersionRemoveEvent event)
      • destroy

        public void destroy()
                     throws Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        Exception
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception