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 boolean
apply(@NotNull org.apache.sling.api.resource.Resource resource, @NotNull Set<String> rules)
Applies the indicated rules to the provided resource.void
apply(@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. Ifdeep
is 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
-true
to 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:
true
if one of the specified rules was successfully applied, false otherwise- Throws:
RewriteException
- if any errors occur when applying the rules
-
-