[MULTISITE-43] Create site aware version of RegExpVirtualURIMapping Created: 28/May/15  Updated: 02/Jun/15  Resolved: 01/Jun/15

Status: Closed
Project: Magnolia Multisite Module
Component/s: None
Affects Version/s: 1.2
Fix Version/s: 1.2

Type: Improvement Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Christopher Zimmermann
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 MGNLDEMO-46 RegExpVirtualURIMapping is not site a... Closed
is depended upon by MGNLDEMO-12 Multisite example 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)
Date of First Response:

 Description   

RegexpVirtualURIMapping is a useful VirtualURImapping but is not site aware. It would be useful to be able to target a mapping to only apply to a specific site.

This would allow each site to map a specific url pattern (such as that created by RepositoryToUri mapping) to a different actual page.

In fact this is the usecase which drives the creation of this mapping:
We have two sites which should allow linking to a contentItem from a specific workspace: tours. RepositoryToUri mapping creates a url with the name of the workspace in the link.
Now we want to use VirtualURIMapping to forward the requests from these links to the different pages in the different sites which should display these tours.



 Comments   
Comment by Philip Mundt [ 29/May/15 ]

info.magnolia.multisite.MultiSiteRegexpVirtualURIMapping:

  • Use (@Inject) info.magnolia.module.site.provider.SiteProvider instead of info.magnolia.module.site.functions.SiteFunctions
    • Actually add @Inject annotation
    • String siteName can be private

pom.xml:

  • Remove (added) test-dependency to info.magnolia:magnolia-imaging-support

info.magnolia.multisite.MultiSiteRegexpVirtualURIMappingTest:

  • javadoc link in info.magnolia.multisite.MultiSiteRegexpVirtualURIMappingTest doesn't resolve due to type
Comment by Philip Mundt [ 01/Jun/15 ]

Parameter of constructor should also be renamed to siteProvider, see public MultiSiteRegexpVirtualURIMapping(SiteProvider siteFunctions)

Comment by Christopher Zimmermann [ 01/Jun/15 ]

Dang, fixed.

Generated at Mon Feb 12 06:05:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.