public class

UpdateAttachmentsOnFilesystemOnPageMoveListener

extends Object
implements EventListener
java.lang.Object
   ↳ com.atlassian.confluence.pages.persistence.dao.UpdateAttachmentsOnFilesystemOnPageMoveListener

Class Overview

A listener interested in page move events which will ensure any attachments associated with a page being moved are also moved to the new location.

Since CONF-8298 was implemented in Confluence 3, attachments have been stored on the filesystem in a structure that encapsulates the space key for the page. This means that if a page is moved to a different space then the location of the attachments will also need to be changed. This is the responsibility of this listener.

If filesystem storage is not used, or if a page isn't moving to a different space then this listener will not do anything.

Summary

Public Constructors
UpdateAttachmentsOnFilesystemOnPageMoveListener()
Public Methods
Class[] getHandledEventClasses()
void handleEvent(Event event)
void setAttachmentManager(AttachmentManager attachmentManager)
void setAttachmentManagerTarget(DelegatorAttachmentManager delegatorAttachmentManager)
void setDefaultAttachmentManager(AttachmentManager defaultAttachmentManager)
The default attachment manager is set here so that the logic from the delegating attachment manager does not need to be reproduced here.
void setFileSystemAttachmentDataDao(FileSystemAttachmentDataDao fileSystemAttachmentDataDao)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.event.EventListener

Public Constructors

public UpdateAttachmentsOnFilesystemOnPageMoveListener ()

Public Methods

public Class[] getHandledEventClasses ()

public void handleEvent (Event event)

public void setAttachmentManager (AttachmentManager attachmentManager)

public void setAttachmentManagerTarget (DelegatorAttachmentManager delegatorAttachmentManager)

public void setDefaultAttachmentManager (AttachmentManager defaultAttachmentManager)

The default attachment manager is set here so that the logic from the delegating attachment manager does not need to be reproduced here. Instead we can just check the attachment manager it sets against the default and if it matched then filesystem storage (default) is being used

public void setFileSystemAttachmentDataDao (FileSystemAttachmentDataDao fileSystemAttachmentDataDao)