Package com.xpn.xwiki.store
Class XWikiHibernateAttachmentStore
- java.lang.Object
-
- com.xpn.xwiki.internal.store.AbstractXWikiStore
-
- com.xpn.xwiki.store.XWikiHibernateBaseStore
-
- com.xpn.xwiki.store.XWikiHibernateAttachmentStore
-
- All Implemented Interfaces:
XWikiAttachmentStoreInterface
@Component @Named("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
hibernateConfiguration, HINT, loggerManager, store
-
-
Constructor Summary
Constructors Constructor Description XWikiHibernateAttachmentStore()Empty constructor needed for component manager.XWikiHibernateAttachmentStore(XWikiContext context)Deprecated.1.6M1.XWikiHibernateAttachmentStore(XWiki xwiki, XWikiContext context)Deprecated.1.6M1.XWikiHibernateAttachmentStore(String hibpath)Deprecated.1.6M1.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanattachmentContentExists(XWikiAttachment attachment, XWikiContext inputxcontext, boolean bTransaction)voiddeleteXWikiAttachment(XWikiAttachment attachment, boolean parentUpdate, XWikiContext inputxcontext, boolean bTransaction)voiddeleteXWikiAttachment(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)voidloadAttachmentContent(XWikiAttachment attachment, XWikiContext inputxcontext, boolean bTransaction)voidsaveAttachmentContent(XWikiAttachment attachment, boolean parentUpdate, XWikiContext inputxcontext, boolean bTransaction)voidsaveAttachmentContent(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)voidsaveAttachmentsContent(List<XWikiAttachment> attachments, XWikiDocument doc, boolean bParentUpdate, XWikiContext inputxcontext, 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, getDatabaseMetaData, getDatabaseProductName, getDatabaseProductName, getDialect, getExecution, getHint, getMapping, getMetadata, getNbConnections, getPath, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaUpdateScript, getSession, getSessionFactory, getTransaction, isInSchemaMode, isVirtual, makeMapping, setDatabase, setNbConnections, setPath, setSession, setSessionFactory, setTransaction, shutdownHibernate, updateSchema, updateSchema, updateSchema, updateSchema
-
Methods inherited from class com.xpn.xwiki.internal.store.AbstractXWikiStore
getExecutionXContext, restoreExecutionXContext
-
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, getHint
-
-
-
-
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.
-
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:
saveAttachmentContentin interfaceXWikiAttachmentStoreInterface- Throws:
XWikiException
-
saveAttachmentContent
public void saveAttachmentContent(XWikiAttachment attachment, boolean parentUpdate, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
- Specified by:
saveAttachmentContentin interfaceXWikiAttachmentStoreInterface- Throws:
XWikiException
-
saveAttachmentsContent
public void saveAttachmentsContent(List<XWikiAttachment> attachments, XWikiDocument doc, boolean bParentUpdate, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
- Specified by:
saveAttachmentsContentin interfaceXWikiAttachmentStoreInterface- Throws:
XWikiException
-
loadAttachmentContent
public void loadAttachmentContent(XWikiAttachment attachment, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
- Specified by:
loadAttachmentContentin interfaceXWikiAttachmentStoreInterface- Throws:
XWikiException
-
attachmentContentExists
public boolean attachmentContentExists(XWikiAttachment attachment, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
- Specified by:
attachmentContentExistsin interfaceXWikiAttachmentStoreInterfaceinputxcontext- the XWiki context- Returns:
- true of the content of this attachment still exist in the store
- Throws:
XWikiException- when it's not possible to check of the content exist
-
deleteXWikiAttachment
public void deleteXWikiAttachment(XWikiAttachment attachment, XWikiContext context, boolean bTransaction) throws XWikiException
- Specified by:
deleteXWikiAttachmentin interfaceXWikiAttachmentStoreInterface- Throws:
XWikiException
-
deleteXWikiAttachment
public void deleteXWikiAttachment(XWikiAttachment attachment, boolean parentUpdate, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
- Specified by:
deleteXWikiAttachmentin interfaceXWikiAttachmentStoreInterface- Throws:
XWikiException
-
-