public class

HierarchicalFileSystemAttachmentUpgradeTask

extends AbstractUpgradeTask
java.lang.Object
   ↳ com.atlassian.confluence.upgrade.AbstractUpgradeTask
     ↳ com.atlassian.confluence.upgrade.upgradetask.HierarchicalFileSystemAttachmentUpgradeTask

Summary

[Expand]
Inherited Fields
From interface com.atlassian.confluence.upgrade.UpgradeTask
Public Constructors
HierarchicalFileSystemAttachmentUpgradeTask(FileLocationResolver attachmentsDirectoryResolver, AttachmentManager attachmentManager, SessionFactory sessionFactory, HierarchicalFileSystemAttachmentDataDao dataDao, IdMultiPartHashGenerator multiPartHashGenerator)
Public Methods
void doUpgrade()

If this instance of Confluence is configured to store attachments on the file system then this task will migrate the attachments to a new hierarchical structure.

String getBuildNumber()
String getShortDescription()
A short (
boolean isUpgradeNeeded()
Based on the configuration of the Confluence AttachmentManager decide on whether this upgrade task should be run.
void validate()

This is only implemented in this abstract base class for the convenience of the large number of older upgrade tasks.

[Expand]
Inherited Methods
From class com.atlassian.confluence.upgrade.AbstractUpgradeTask
From class java.lang.Object
From interface com.atlassian.confluence.upgrade.UpgradeTask

Public Constructors

public HierarchicalFileSystemAttachmentUpgradeTask (FileLocationResolver attachmentsDirectoryResolver, AttachmentManager attachmentManager, SessionFactory sessionFactory, HierarchicalFileSystemAttachmentDataDao dataDao, IdMultiPartHashGenerator multiPartHashGenerator)

Public Methods

public void doUpgrade ()

If this instance of Confluence is configured to store attachments on the file system then this task will migrate the attachments to a new hierarchical structure.

If non file system storage (e.g. Database) of attachments is used then this upgrade task will log the fact that it is doing nothing.

Throws
Exception

public String getBuildNumber ()

public String getShortDescription ()

A short (

public boolean isUpgradeNeeded ()

Based on the configuration of the Confluence AttachmentManager decide on whether this upgrade task should be run.

Returns
  • true if the task can be run; otherwise false.

public void validate ()

This is only implemented in this abstract base class for the convenience of the large number of older upgrade tasks.

If you are implementing a new UpgradeTask you must give some consideration to implementing validation as well.