Interface ComponentRewriteRuleService
-
- All Superinterfaces:
RewriteRuleService
@ProviderType public interface ComponentRewriteRuleService extends RewriteRuleService
Provides a mechanism for listing all configured rules either via Nodes or custom implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanapply(@NotNull org.apache.sling.api.resource.Resource resource, @NotNull Set<String> rules)Applies the indicated rules to the provided resource.voidapply(@NotNull org.apache.sling.api.resource.Resource resource, @NotNull Set<String> rules, boolean deep)Deprecated.-
Methods inherited from interface com.adobe.aem.modernize.rule.RewriteRuleService
find, getRule, listRules, listRules
-
-
-
-
Method Detail
-
apply
@Deprecated(since="2.1.0") void apply(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, @NotNull @NotNull Set<String> rules, boolean deep) throws RewriteException
Deprecated.Applies the indicated rules to the provided resource. Ifdeepis set, rules will be applied recursively.Transformations are performed but not saved.
The rules can be either a fully qualified path to a rule or a Service PID depending on the implementation.
- Parameters:
resource- Parent node for applying rulesrules- the rules to applydeep-trueto recurse into the tree- Throws:
RewriteException- if any errors occur when applying the rules
-
apply
boolean apply(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, @NotNull @NotNull Set<String> rules) throws RewriteException
Applies the indicated rules to the provided resource.Transformations are performed but not saved.
- Parameters:
resource- Resource to processrules- the ids of the rules to apply- Returns:
trueif one of the specified rules was successfully applied, false otherwise- Throws:
RewriteException- if any errors occur when applying the rules
-
-