[MAGNOLIA-8381] Link conversion logic should be moved elsewhere Created: 18/Apr/22 Updated: 09/Nov/22 Resolved: 09/Nov/22 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Jonathan Ayala | Assignee: | Sang Ngo Huu |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| 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: | |||||
| Epic Link: | Nucleus Quality Maintenance | ||||
| Team: | |||||
| Description |
|
info.magnolia.jcr.util.ContentMap.getNodeProperty(String) method contains a conversion logic for those values matching an UUID pattern: info.magnolia.jcr.util.ContentMap (221) else if (LinkUtil.UUID_PATTERN.matcher(prop.getString()).find()) { try { return info.magnolia.link.LinkUtil.convertLinksFromUUIDPattern(prop.getString()); } catch (LinkException e) { log.warn("Failed to parse links with from {}", prop.getName(), e); } } It would be good to separate this specific logic to another class whose purpose would be link management instead of having it in ContentMap. When JcrAssetProvider is customized/extended, it results in a wrong links as info.magnolia.jcr.util.ContentMap.getNodeProperty(String) method contains a conversion logic for those values matching an UUID pattern. Therefore, it will be needed moving this conversion logic outside info.magnolia.jcr.util.ContentMap or configurable so it can be disabled. |
| Comments |
| Comment by Roman Kovařík [ 12/Oct/22 ] |
|
The link generation should be customisable already:
|
| Comment by Roman Kovařík [ 19/Oct/22 ] |
|
dmaslanka Could we check the above with support/customer? |
| Comment by Roman Kovařík [ 19/Oct/22 ] |
|
As explained in the previous comment, the conversion logic is not implemented directly in ContentMap, LinkUtil is just delegating to customisable transformer interfaces. |
| Comment by Roman Kovařík [ 09/Nov/22 ] |
|
Closing this as won't do:
|