Open
Conversation
f0de847 to
e720575
Compare
Contributor
There 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.
celements-xwiki-core/src/main/java/com/xpn/xwiki/store/XWikiHibernateAttachmentStore.java
Show resolved
Hide resolved
celements-xwiki-core/src/main/java/com/xpn/xwiki/store/XWikiHibernateAttachmentStore.java
Outdated
Show resolved
Hide resolved
celements-xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiAttachmentContent.java
Outdated
Show resolved
Hide resolved
celements-xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiAttachment.java
Outdated
Show resolved
Hide resolved
celements-xwiki-core/src/main/java/com/xpn/xwiki/store/XWikiHibernateAttachmentStore.java
Show resolved
Hide resolved
celements-xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiAttachment.java
Outdated
Show resolved
Hide resolved
celements-xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiAttachment.java
Show resolved
Hide resolved
celements-xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiAttachment.java
Show resolved
Hide resolved
celements-xwiki-core/src/test/java/com/xpn/xwiki/store/XWikiHibernateStoreTest.java
Show resolved
Hide resolved
c6fff9e to
0548835
Compare
fpichler
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.