Uh oh!
There was an error while loading. Please reload this page.
AttachmentContentStore - #276
Conversation
f0de847 to
e720575CompareThere was a problem hiding this comment.
Pull request overview
This pull request introduces a new abstraction layer for attachment content storage in XWiki, separating the concerns of attachment content storage from the overall attachment store implementation. The changes enable pluggable storage backends (e.g., object storage like S3) as alternatives to the legacy Hibernate-based database storage for attachment binary content.
Changes:
- Introduced new
AttachmentContentStoreinterface andHibernateAttachmentContentStoreimplementation to abstract attachment content persistence - Refactored
XWikiHibernateAttachmentStoreto delegate content operations to pluggable stores with fallback support for migration scenarios - Removed
XWikiContextparameter from multipleAttachmentVersioningStoremethods, modernizing the API to use execution context directly - Added
AttachmentContentPolicyto control whether attachment content should be embedded in XML structures (RCS archives, recycle bin) based on the active content store - Migrated logging from Apache Commons Logging to SLF4J across multiple classes
- Removed obsolete
VoidAttachmentVersioningStoreTesttest file
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
XWikiHibernateAttachmentStore.java | Refactored to use pluggable content/versioning stores with fallback mechanism |
HibernateAttachmentContentStore.java | New implementation of AttachmentContentStore for Hibernate-based persistence |
AttachmentContentStore.java | New interface defining content store contract with custom exception type |
AttachmentVersioningStore.java | Removed XWikiContext from method signatures, added hasVersioning() method |
HibernateAttachmentVersioningStore.java | Updated to use execution context instead of XWikiContext |
VoidAttachmentVersioningStore.java | Updated method signatures and simplified implementation |
AttachmentContentPolicy.java | New policy component to control content embedding in XML structures |
StoreFactory.java | Added factory methods for attachment content and versioning stores |
XWikiHibernateBaseStore.java | Added getXContext() helper and cfgSrc dependency injection |
XWikiAttachment.java | Refactored to remove XWikiContext dependencies, added toString() override |
XWikiAttachmentArchive.java | Updated to use policy for content embedding decisions |
XWikiAttachmentContent.java | Changed getSize() return type from int to long |
DeletedAttachment.java | Changed constructor to use boolean flag instead of XWikiContext |
| Various logging classes | Migrated from Commons Logging to SLF4J |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c6fff9e to
0548835Compare
No description provided.