Skip to content

Conversation

@msladek
Copy link
Member

@msladek msladek commented Jan 13, 2026

No description provided.

@msladek msladek changed the title Store att content AttachmentContentStore Jan 13, 2026
@msladek msladek marked this pull request as ready for review January 15, 2026 11:03
@msladek msladek requested review from Copilot and fpichler January 15, 2026 11:03
Copy link
Contributor

Copilot AI left a 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 AttachmentContentStore interface and HibernateAttachmentContentStore implementation to abstract attachment content persistence
  • Refactored XWikiHibernateAttachmentStore to delegate content operations to pluggable stores with fallback support for migration scenarios
  • Removed XWikiContext parameter from multiple AttachmentVersioningStore methods, modernizing the API to use execution context directly
  • Added AttachmentContentPolicy to 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 VoidAttachmentVersioningStoreTest test 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants