Package com.adobe.aem.modernize.rule
Interface RewriteRuleService
-
- All Known Subinterfaces:
ComponentRewriteRuleService
,PolicyImportRuleService
,StructureRewriteRuleService
@ProviderType public interface RewriteRuleService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull Set<String>
find(@NotNull org.apache.sling.api.resource.Resource resource)
Deprecated.@Nullable RewriteRule
getRule(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull String id)
Returns the rule based on its unique identifier.@NotNull Set<String>
listRules(@NotNull org.apache.sling.api.resource.Resource resource)
Finds set of rule ids of which this service is aware, that may match the provided resource'ssling:resourceType
.@NotNull Set<RewriteRule>
listRules(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, String... slingResourceType)
Deprecated.
-
-
-
Method Detail
-
find
@Deprecated(since="2.1.0") @NotNull @NotNull Set<String> find(@NotNull @NotNull org.apache.sling.api.resource.Resource resource)
Deprecated.Lists all resource paths that match any rules of which this service is aware.This method may result in fuzzy matches to improve performance and prevent resource utilization overhead.
- Parameters:
resource
- Resource for the root of the search- Returns:
- list of mappings that match rules or empty set if none found or an error occurs
-
listRules
@Deprecated(since="2.1.0") @NotNull @NotNull Set<RewriteRule> listRules(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, String... slingResourceType)
Deprecated.Lists all rules that may apply to the specifiedsling:resourceType
.This method may result in fuzzy matches to improve performance and prevent resource utilization overhead.
- Parameters:
resourceResolver
- ResourceResolver for searchingslingResourceType
- thesling:resourceType
(s) to check- Returns:
- set of rules by path or PID
-
listRules
@NotNull @NotNull Set<String> listRules(@NotNull @NotNull org.apache.sling.api.resource.Resource resource)
Finds set of rule ids of which this service is aware, that may match the provided resource'ssling:resourceType
.This method may result in fuzzy matches to improve performance and prevent resource utilization overhead.
- Parameters:
resource
- Resource to find matching rules- Returns:
- set of rules by path or PID
-
getRule
@Nullable @Nullable RewriteRule getRule(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull String id)
Returns the rule based on its unique identifier.- Parameters:
resourceResolver
- the Resource Resolver to use to for rule lookupid
- the id for the rule- Returns:
- the rule associated with the id or null if none exists
-
-