com.atlassian.confluence.pages.persistence.dao
Class HierarchicalFileSystemAttachmentDataDao

java.lang.Object
  extended by com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao
      extended by com.atlassian.confluence.pages.persistence.dao.HierarchicalFileSystemAttachmentDataDao
All Implemented Interfaces:
AttachmentDataDao, NonTransactionalAttachmentDataDao

Deprecated. Since 5.5 Use 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao
FileSystemAttachmentDataDao.FileSystemAttachmentNamingStrategy
 
Field Summary
static java.lang.String NEW_ATTACHMENT_SUBDIR
          Deprecated. The name of the directory beneath the configured attachments directory where attachments will be migrated to.
static java.lang.String NON_SPACED_DIRECTORY_NAME
          Deprecated.  
 
Fields inherited from class com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao
attachmentsDirResolver, NAMING_STRATEGY_FILE_NAME, NAMING_STRATEGY_ID
 
Constructor Summary
HierarchicalFileSystemAttachmentDataDao()
          Deprecated.  
 
Method Summary
protected  java.io.File getConfluenceAttachmentDirectory()
          Deprecated.  
protected  java.io.File getDirectoryForAttachment(ContentEntityObject content, Attachment attachment)
          Deprecated. Retrieves the location of the containing folder for an Attachment
 java.io.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.
 
Methods inherited from class com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao
afterMigrationFrom, getAttachmentsDirResolver, getDataForAttachment, getDataForAttachment, getDirectoryForContent, getLatestAttachmentFile, getStorageType, isAttachmentPresent, moveAttachment, moveDataForAttachmentVersion, prepareForMigrationTo, removeDataForAttachment, removeDataForAttachmentVersion, replaceDataForAttachment, replaceDataForAttachment, saveDataForAttachment, saveDataForAttachment, saveDataForAttachment, saveDataForAttachmentVersion, saveDataForAttachmentVersion, setAttachmentsDirResolver, setNamingStrategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_ATTACHMENT_SUBDIR

public static final java.lang.String NEW_ATTACHMENT_SUBDIR
Deprecated. 
The name of the directory beneath the configured attachments directory where attachments will be migrated to.

See Also:
Constant Field Values

NON_SPACED_DIRECTORY_NAME

public static final java.lang.String NON_SPACED_DIRECTORY_NAME
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

HierarchicalFileSystemAttachmentDataDao

public HierarchicalFileSystemAttachmentDataDao()
Deprecated. 
Method Detail

getNamingStrategy

public FileSystemAttachmentDataDao.FileSystemAttachmentNamingStrategy getNamingStrategy()
Deprecated. 
This implementation always uses the AttachmentIdNamingStrategy.

Overrides:
getNamingStrategy in class FileSystemAttachmentDataDao

getDirectoryForAttachment

protected java.io.File getDirectoryForAttachment(ContentEntityObject content,
                                                 Attachment attachment)
Deprecated. 
Description copied from class: FileSystemAttachmentDataDao
Retrieves the location of the containing folder for an Attachment

Overrides:
getDirectoryForAttachment in class FileSystemAttachmentDataDao
Parameters:
content - the ContentEntityObject the Attachment belongs to
Returns:
a File pointing to the location

getDirectoryForAttachmentContainer

public java.io.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)

This method is only public so it is available to the upgrade task responsible for migrating to this new attachment storage structure.

Parameters:
contentId - the id of the content the attachment belongs to
spaceId - the id of the space the content belongs to or 0 if it is not spaced content
Returns:
a directory for storing the attachment.

getConfluenceAttachmentDirectory

protected java.io.File getConfluenceAttachmentDirectory()
Deprecated. 
Overrides:
getConfluenceAttachmentDirectory in class FileSystemAttachmentDataDao

setHashGenerator

@Deprecated
public void setHashGenerator(IdMultiPartHashGenerator hashGenerator)
Deprecated. Since 5.4. No replacement.



Copyright © 2003-2014 Atlassian. All Rights Reserved.