com.xpn.xwiki.store
Class XWikiHibernateAttachmentStore

java.lang.Object
  extended by com.xpn.xwiki.store.XWikiHibernateBaseStore
      extended by com.xpn.xwiki.store.XWikiHibernateAttachmentStore
All Implemented Interfaces:
XWikiAttachmentStoreInterface, org.xwiki.component.phase.Initializable

@Component
@Named(value="hibernate")
@Singleton
public class XWikiHibernateAttachmentStore
extends XWikiHibernateBaseStore
implements XWikiAttachmentStoreInterface


Nested Class Summary
 
Nested classes/interfaces inherited from class com.xpn.xwiki.store.XWikiHibernateBaseStore
XWikiHibernateBaseStore.HibernateCallback<T>
 
Field Summary
 
Fields inherited from class com.xpn.xwiki.store.XWikiHibernateBaseStore
loggerManager
 
Constructor Summary
XWikiHibernateAttachmentStore()
          Empty constructor needed for component manager.
XWikiHibernateAttachmentStore(String hibpath)
          Deprecated. 1.6M1. Use ComponentManager.lookup(XWikiAttachmentStoreInterface.class) instead.
XWikiHibernateAttachmentStore(XWikiContext context)
          Deprecated. 1.6M1. Use ComponentManager.lookup(XWikiAttachmentStoreInterface.class) instead.
XWikiHibernateAttachmentStore(XWiki xwiki, XWikiContext context)
          Deprecated. 1.6M1. Use ComponentManager.lookup(XWikiAttachmentStoreInterface.class) instead.
 
Method Summary
 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 parentUpdate, XWikiContext context, boolean bTransaction)
           
 void saveAttachmentContent(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
           
 void saveAttachmentsContent(List<XWikiAttachment> attachments, XWikiDocument doc, boolean bParentUpdate, XWikiContext context, boolean bTransaction)
           
 
Methods inherited from class com.xpn.xwiki.store.XWikiHibernateBaseStore
beginTransaction, beginTransaction, beginTransaction, beginTransaction, checkHibernate, cleanUp, createHibernateSequenceIfRequired, dynamicMappingTableName, endTransaction, endTransaction, escapeSchema, execute, execute, executeRead, executeRead, executeWrite, executeWrite, failSafeExecute, failSafeExecuteRead, failSafeExecuteWrite, getConfiguration, getConnections, getDatabaseProductName, getDatabaseProductName, getExecution, getMapping, getNbConnections, getPath, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaUpdateScript, getSession, getSessionFactory, getTransaction, initialize, isInSchemaMode, isVirtual, makeMapping, setDatabase, setNbConnections, setPath, setSession, setSessionFactory, setTransaction, shutdownHibernate, updateSchema, updateSchema, updateSchema, updateSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.xpn.xwiki.store.XWikiAttachmentStoreInterface
cleanUp
 

Constructor Detail

XWikiHibernateAttachmentStore

@Deprecated
public XWikiHibernateAttachmentStore(XWiki xwiki,
                                                XWikiContext context)
Deprecated. 1.6M1. Use ComponentManager.lookup(XWikiAttachmentStoreInterface.class) instead.

This allows to initialize our storage engine. The hibernate config file path is taken from xwiki.cfg or directly in the WEB-INF directory.

Parameters:
xwiki -
context -

XWikiHibernateAttachmentStore

@Deprecated
public XWikiHibernateAttachmentStore(XWikiContext context)
Deprecated. 1.6M1. Use ComponentManager.lookup(XWikiAttachmentStoreInterface.class) instead.

See Also:
XWikiHibernateAttachmentStore(XWiki, XWikiContext)

XWikiHibernateAttachmentStore

@Deprecated
public XWikiHibernateAttachmentStore(String hibpath)
Deprecated. 1.6M1. Use ComponentManager.lookup(XWikiAttachmentStoreInterface.class) instead.

Initialize the storage engine with a specific path This is used for tests.

Parameters:
hibpath -

XWikiHibernateAttachmentStore

public XWikiHibernateAttachmentStore()
Empty constructor needed for component manager.

Method Detail

saveAttachmentContent

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

saveAttachmentContent

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

saveAttachmentsContent

public void saveAttachmentsContent(List<XWikiAttachment> attachments,
                                   XWikiDocument doc,
                                   boolean bParentUpdate,
                                   XWikiContext context,
                                   boolean bTransaction)
                            throws XWikiException
Specified by:
saveAttachmentsContent in interface XWikiAttachmentStoreInterface
Throws:
XWikiException

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


Copyright © 2004–2014 XWiki. All rights reserved.