Interface StructureRewriteRuleService

  • All Superinterfaces:
    RewriteRuleService

    @ProviderType
    public interface StructureRewriteRuleService
    extends RewriteRuleService
    Provides a mechanism for listing all the configured rules either via Nodes or custom implementations.
    • Method Detail

      • 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 of the page to process
        rules - 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 while updating the page.