-
Notifications
You must be signed in to change notification settings - Fork 0
AttachmentContentStore #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: major-7
Are you sure you want to change the base?
Conversation
f0de847 to
e720575
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
No description provided.