org.xwiki.store.legacy.store.internal
Class FilesystemAttachmentStore

java.lang.Object
  extended by org.xwiki.store.legacy.store.internal.FilesystemAttachmentStore
All Implemented Interfaces:
XWikiAttachmentStoreInterface

@Component
@Named(value="file")
@Singleton
public class FilesystemAttachmentStore
extends Object
implements XWikiAttachmentStoreInterface

Filesystem based implementation of XWikiAttachmentStoreInterface.

Since:
3.0M2

Constructor Summary
FilesystemAttachmentStore()
          Constructor for component manager.
FilesystemAttachmentStore(FilesystemStoreTools fileTools)
          Testing Constructor.
 
Method Summary
 void cleanUp(XWikiContext context)
           
 void deleteXWikiAttachment(XWikiAttachment attachment, boolean parentUpdate, XWikiContext context, boolean bTransaction)
           
 void deleteXWikiAttachment(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
           
 void loadAttachmentContent(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
           
 void saveAttachmentContent(XWikiAttachment attachment, boolean updateDocument, XWikiContext context, boolean bTransaction)
           This implementation cannot operate in a larger transaction so it starts a new transaction no matter whether bTransaction is true or false.
 void saveAttachmentContent(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
           This implementation cannot operate in a larger transaction so it starts a new transaction no matter whether bTransaction is true or false.
 void saveAttachmentsContent(List<XWikiAttachment> attachments, XWikiDocument doc, boolean updateDocument, XWikiContext context, boolean bTransaction)
           This implementation cannot operate in a larger transaction so it starts a new transaction no matter whether bTransaction is true or false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilesystemAttachmentStore

public FilesystemAttachmentStore(FilesystemStoreTools fileTools)
Testing Constructor.

Parameters:
fileTools - tools for getting files to store given content in and locks.

FilesystemAttachmentStore

public FilesystemAttachmentStore()
Constructor for component manager.

Method Detail

saveAttachmentContent

public void saveAttachmentContent(XWikiAttachment attachment,
                                  XWikiContext context,
                                  boolean bTransaction)
                           throws XWikiException
This implementation cannot operate in a larger transaction so it starts a new transaction no matter whether bTransaction is true or false.

Specified by:
saveAttachmentContent in interface XWikiAttachmentStoreInterface
Throws:
XWikiException
See Also:
XWikiAttachmentStoreInterface.saveAttachmentContent( XWikiAttachment, XWikiContext, boolean)

saveAttachmentContent

public void saveAttachmentContent(XWikiAttachment attachment,
                                  boolean updateDocument,
                                  XWikiContext context,
                                  boolean bTransaction)
                           throws XWikiException
This implementation cannot operate in a larger transaction so it starts a new transaction no matter whether bTransaction is true or false.

Specified by:
saveAttachmentContent in interface XWikiAttachmentStoreInterface
Throws:
XWikiException
See Also:
XWikiAttachmentStoreInterface.saveAttachmentContent( XWikiAttachment, boolean, XWikiContext, boolean)

saveAttachmentsContent

public void saveAttachmentsContent(List<XWikiAttachment> attachments,
                                   XWikiDocument doc,
                                   boolean updateDocument,
                                   XWikiContext context,
                                   boolean bTransaction)
                            throws XWikiException
This implementation cannot operate in a larger transaction so it starts a new transaction no matter whether bTransaction is true or false.

Specified by:
saveAttachmentsContent in interface XWikiAttachmentStoreInterface
Throws:
XWikiException
See Also:
XWikiAttachmentStoreInterface.saveAttachmentsContent( List, XWikiDocument, boolean, XWikiContext, boolean)

loadAttachmentContent

public void loadAttachmentContent(XWikiAttachment attachment,
                                  XWikiContext context,
                                  boolean bTransaction)
                           throws XWikiException
Specified by:
loadAttachmentContent in interface XWikiAttachmentStoreInterface
Throws:
XWikiException

deleteXWikiAttachment

public void deleteXWikiAttachment(XWikiAttachment attachment,
                                  XWikiContext context,
                                  boolean bTransaction)
                           throws XWikiException
Specified by:
deleteXWikiAttachment in interface XWikiAttachmentStoreInterface
Throws:
XWikiException

deleteXWikiAttachment

public void deleteXWikiAttachment(XWikiAttachment attachment,
                                  boolean parentUpdate,
                                  XWikiContext context,
                                  boolean bTransaction)
                           throws XWikiException
Specified by:
deleteXWikiAttachment in interface XWikiAttachmentStoreInterface
Throws:
XWikiException

cleanUp

public void cleanUp(XWikiContext context)
Specified by:
cleanUp in interface XWikiAttachmentStoreInterface