[MAGNOLIA-1654] Allow regular expression in virtual uris Created: 02/Aug/07 Updated: 23/Jan/13 Resolved: 06/Aug/07 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 3.1 M1 |
| Fix Version/s: | 3.1 M2 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Fabrizio Giustina | Assignee: | Fabrizio Giustina |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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 |
|
A nice addition to current virtual uri mappings would be the ability to use regular expression for the original uri and to use matches in the destination one. fromURI=regexp:/products/([0-9A-Z]+)\.html |
| Comments |
| Comment by Fabrizio Giustina [ 02/Aug/07 ] |
|
added to trunk. You need to use the "regexp:" prefix in fromURI to use this new features. |
| Comment by Magnolia International [ 03/Aug/07 ] |
|
Shouldn't this be solved by implementing another VirtualURIMapping and adding a class property in the configuration node instead? |
| Comment by Philipp Bracher [ 03/Aug/07 ] |
|
It should. Fabrizio can you change that? |
| Comment by Fabrizio Giustina [ 03/Aug/07 ] |
|
ok, I'll fix as suggested |
| Comment by Magnolia International [ 03/Aug/07 ] |
|
well, maybe we should rewrite these (redirect, forward) as well then About the ease-of-use, we COULD introduce some sort of shortcut names for the provided implementations. otoh, just having the class name makes it obvious, and if you can read javadoc, you can find the existing implementations - or we could generate custom docs if we had too much time on our hands. We've also been considering the idea of not having a default impl, thus adding the class property for all entries, making it more obvious that its how it works. |
| Comment by Fabrizio Giustina [ 06/Aug/07 ] |
|
reworked as suggested. The "regexp:" suffix doesn't work anymore, you have to explicitly add a class property with the new implementation. (PS. forward: and redirect: stay as is since they are managed externally) |