com.atlassian.confluence.upgrade.upgradetask
Class HierarchicalFileSystemAttachmentUpgradeTask
java.lang.Object
com.atlassian.confluence.upgrade.upgradetask.HierarchicalFileSystemAttachmentUpgradeTask
- All Implemented Interfaces:
- UpgradeTask
public class HierarchicalFileSystemAttachmentUpgradeTask
- extends Object
- implements UpgradeTask
Fields inherited from interface com.atlassian.confluence.upgrade.UpgradeTask |
log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HierarchicalFileSystemAttachmentUpgradeTask
public HierarchicalFileSystemAttachmentUpgradeTask(FileLocationResolver attachmentsDirectoryResolver,
AttachmentManager attachmentManager,
net.sf.hibernate.SessionFactory sessionFactory,
HierarchicalFileSystemAttachmentDataDao dataDao,
IdMultiPartHashGenerator multiPartHashGenerator)
doUpgrade
public void doUpgrade()
throws Exception
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.
- Specified by:
doUpgrade
in interface UpgradeTask
- Throws:
Exception
isUpgradeNeeded
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.
getBuildNumber
public String getBuildNumber()
- Specified by:
getBuildNumber
in interface UpgradeTask
getErrors
public Collection<UpgradeError> getErrors()
- Specified by:
getErrors
in interface UpgradeTask
getShortDescription
public String getShortDescription()
- Specified by:
getShortDescription
in interface UpgradeTask