adobe / aem-modernize-tools

A suite of tools to modernize your AEM Sites implementations off legacy features.
http://opensource.adobe.com/aem-modernize-tools/
Apache License 2.0
64 stars 42 forks source link

Add Template Path Processing Restrictions #155

Closed bstopp closed 2 years ago

bstopp commented 2 years ago

Description

Its possible that in a particular environment, a single Page Rewrite rule configuration may apply to multiple sites, but the Editable template that should referenced is different on a per-tenant basis.

This update allows PageRewriteRule configurations to specify a content path that restricts their paths to which they are found, and thus available for a job.

To support backwards compatibility, no path restrictions are required.

How Has This Been Tested?

Added new unit tests to account for paths.

Screenshots (if appropriate):

Types of changes

Checklist:

codecov[bot] commented 2 years ago

Codecov Report

Merging #155 (59b7102) into main (1754614) will increase coverage by 0.55%. The diff coverage is 91.37%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #155      +/-   ##
============================================
+ Coverage     79.24%   79.80%   +0.55%     
- Complexity      432      442      +10     
============================================
  Files            34       34              
  Lines          1937     1956      +19     
  Branches        358      361       +3     
============================================
+ Hits           1535     1561      +26     
+ Misses          295      290       -5     
+ Partials        107      105       -2     
Flag Coverage Δ
unittests 79.80% <91.37%> (+0.55%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../aem/modernize/structure/rule/PageRewriteRule.java 90.00% <90.90%> (+7.15%) :arrow_up:
...odernize/servlet/ScheduleConversionJobServlet.java 90.55% <100.00%> (-2.48%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9ae2b4c...59b7102. Read the comment docs.