[MAGNOLIA-6251] ResourceOrigin should be injectable Created: 08/Jun/15  Updated: 25/Jun/15  Resolved: 23/Jun/15

Status: Closed
Project: Magnolia
Component/s: resource-loader
Affects Version/s: 5.4
Fix Version/s: 5.4

Type: Task Priority: Neutral
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: origins, resources
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-6266 Rename Origin and ResourcePath interf... Closed
depends upon MAGNOLIA-6220 Resources: clarify pathPattern usage ... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty

 Description   

Now that MAGNOLIA-6220 is out of the way, info.magnolia.resourceloader.Origins could be a singleton - we currently inject it in a number of components, and due to it's builder nature, we're essentially recreating and re-scanning resources for each of these.

It could potentially be implemented as a javax.inject.Provider<Origin> or a configurer.



 Comments   
Comment by Magnolia International [ 23/Jun/15 ]

We know have DefaultResourceOrigins, which is a simple Provider<ResourceOrigin>.
Client code can simply @Inject ResourceOrigin instead of injecting Origins.

Done on feature/MAGNOLIA-6251-ResourceOrigin-inject branch, which was branched off feature/MAGNOLIA-6266-resource-rename.

Generated at Mon Feb 12 04:12:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.