FileSystemAttachmentDataDao
@Deprecated public class HierarchicalFileSystemAttachmentDataDao extends FileSystemAttachmentDataDao
DAO that stores attachments on the file system in a hierarchical structure. The top of the hierarchy is based on the space the attachments belong to with the remainder of the hierarchy being based on the page id the attachment is attached to.
FileSystemAttachmentDataDao.FileSystemAttachmentNamingStrategy
Modifier and Type | Field and Description |
---|---|
static String |
NEW_ATTACHMENT_SUBDIR
Deprecated.
The name of the directory beneath the configured attachments directory where attachments will be migrated to.
|
static String |
NON_SPACED_DIRECTORY_NAME
Deprecated.
|
attachmentsDirResolver, NAMING_STRATEGY_FILE_NAME, NAMING_STRATEGY_ID
Constructor and Description |
---|
HierarchicalFileSystemAttachmentDataDao()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected File |
getConfluenceAttachmentDirectory()
Deprecated.
|
protected File |
getDirectoryForAttachment(ContentEntityObject content,
Attachment attachment)
Deprecated.
Retrieves the location of the containing folder for an Attachment
|
File |
getDirectoryForAttachmentContainer(long contentId,
long spaceId)
Deprecated.
Return the directory that represents where attachments for the supplied content should be stored based also upon
the id of the space that contains the content (if it's spaced content)
|
FileSystemAttachmentDataDao.FileSystemAttachmentNamingStrategy |
getNamingStrategy()
Deprecated.
This implementation always uses the AttachmentIdNamingStrategy.
|
void |
setHashGenerator(IdMultiPartHashGenerator hashGenerator)
Deprecated.
Since 5.4. No replacement.
|
afterMigrationFrom, getAttachmentsDirResolver, getDataForAttachment, getDataForAttachment, getDirectoryForContent, getLatestAttachmentFile, getStorageType, isAttachmentPresent, moveAttachment, moveDataForAttachmentVersion, prepareForMigrationTo, removeDataForAttachment, removeDataForAttachmentVersion, replaceDataForAttachment, replaceDataForAttachment, saveDataForAttachment, saveDataForAttachment, saveDataForAttachment, saveDataForAttachmentVersion, saveDataForAttachmentVersion, setAttachmentsDirResolver, setNamingStrategy
public static final String NEW_ATTACHMENT_SUBDIR
public static final String NON_SPACED_DIRECTORY_NAME
public HierarchicalFileSystemAttachmentDataDao()
public FileSystemAttachmentDataDao.FileSystemAttachmentNamingStrategy getNamingStrategy()
getNamingStrategy
in class FileSystemAttachmentDataDao
protected File getDirectoryForAttachment(ContentEntityObject content, Attachment attachment)
FileSystemAttachmentDataDao
getDirectoryForAttachment
in class FileSystemAttachmentDataDao
content
- the ContentEntityObject the Attachment belongs topublic File getDirectoryForAttachmentContainer(long contentId, long spaceId)
Return the directory that represents where attachments for the supplied content should be stored based also upon the id of the space that contains the content (if it's spaced content)
This method is only public so it is available to the upgrade task responsible for migrating to this new attachment storage structure.
contentId
- the id of the content the attachment belongs tospaceId
- the id of the space the content belongs to or 0 if it is not spaced contentprotected File getConfluenceAttachmentDirectory()
getConfluenceAttachmentDirectory
in class FileSystemAttachmentDataDao
@Deprecated public void setHashGenerator(IdMultiPartHashGenerator hashGenerator)
Copyright © 2003–2015 Atlassian. All rights reserved.