[ 
https://issues.apache.org/jira/browse/SLING-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782527#action_12782527
 ] 

Jonathan 'J5' Cook commented on SLING-1198:
-------------------------------------------

Robert is providing a good solution to a very real problem which relates to 
reversibility and substitution in the current ResourceResolver mappings.

I am not familiar enough with how the current /etc/map based and "standard" 
(ResourceResolver2 and ResourceResolver style) rules are translated into 
MapEntry objects to know whether putting this patch in this class is 
appropriate or not, nor what the ramifications would be if it went forward.

However, I find the functionality described and modeled by the patch to be very 
useful for my real-world applications in Day CQ 5.x

Robert, thank you for putting the idea on the table and submitting a patch.

I would call this "Reversible Reg-ex Based ResourceResolver Mappings Using 
Bi-Directional Pattern Parameterization".  By making a portion of the regular 
expression both a pattern to match against and a target for replacements, a 
greater reversibility is possible.

I would remove the requirement that all parameters always be present and allow 
for default values, and make sure that the mappings implementation only 
includes the FQDN and not just a relative request when the mapped URL FQDN does 
not match the request FQDN.  I don't have time to evaluate the patch or modify 
it to do this.  If the patch is acceptable as is, I could attempt to 
patch-the-patch to incorporate these additional ideas.

+1 for the implementing the requested functionality as I understand it, with or 
without my ideas

> Allow mapping nodes to internet domains with template parameters
> ----------------------------------------------------------------
>
>                 Key: SLING-1198
>                 URL: https://issues.apache.org/jira/browse/SLING-1198
>             Project: Sling
>          Issue Type: New Feature
>          Components: Engine
>    Affects Versions: JCR Resource 2.0.2
>            Reporter: Róbert Csákány
>            Assignee: Felix Meschberger
>             Fix For: JCR Resource 2.0.4
>
>         Attachments: MapEntry.patch
>
>
> Sling should support hosting multiple domains, with different JCR roots.
> E.g.:
> http://www.domain1.com could map to /content/domain1.com
> http://www.domain2.com could map to /content/domain2.com
> While developing a website, the fully qualified domain might not be 
> available. Ideally, the mapping could be configured in a flexible way. One 
> option would be to maintain a set of regular expressions to match against 
> URLs. Each regexp would then match to a path in the JCR.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to