[MAGNOLIA-2921] Now that we use generics, MgnlContext.doInSystemContext could return values Created: 29/Oct/09  Updated: 23/Jan/13  Resolved: 02/Nov/09

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 4.2

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLSTK-499 "ExtrasArea" - Exception on public-in... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

However, for compatibility's sake, we'll need to introduce a new method, and a new interface, and we'll have to play the game name for this new Operation interface.



 Comments   
Comment by Magnolia International [ 30/Oct/09 ]

Leaving open for discussion:

  • naming
  • exception handling: I introduced ExceptionUtil.unwrapIf() to circumvent the fact the exec() doesn't throw any exception - throwing Exception would just be annoying for client code. On the other hand, since it's a custom interface anyway, and we're in the context of Magnolia operations, it seems having the exec() would be a reasonable behavior.
    Then again, the first usage of doInSystemContext that I find is ModuleManager, where we do not have RepositoryExceptions (because they're handled within the operation)
Comment by Magnolia International [ 02/Nov/09 ]

Operations can now specify an exception thrown by the exec method if needed.
See info.magnolia.context.MgnlContextTest#testCanDeclareCheckExceptionToBeThrownByDoInSystemContext

Naming unchanged for now.

Generated at Mon Feb 12 03:41:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.