Class ColumnControlRewriteRule

    • Constructor Detail

      • ColumnControlRewriteRule

        public ColumnControlRewriteRule()
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: RewriteRule
        Returns the unique identifier for this Rule.
        Specified by:
        getId in interface RewriteRule
        Returns:
        the id
      • getRanking

        public int getRanking()
        Description copied from interface: RewriteRule
        Ranking of this Rule relative to others that may also match a given node.
        Specified by:
        getRanking in interface RewriteRule
        Returns:
        the rule's ranking
      • findMatches

        @NotNull
        public @NotNull Set<String> findMatches​(@NotNull
                                                @NotNull org.apache.sling.api.resource.Resource resource)
        Description copied from interface: ServiceBasedRewriteRule
        Lists all resource paths in tree rooted at the specified resource, 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.

        Specified by:
        findMatches in interface ServiceBasedRewriteRule
        Parameters:
        resource - Resource for the root of the search
        Returns:
        list of paths that match rules or an empty set if none match
      • hasPattern

        public boolean hasPattern​(@NotNull
                                  @NotNull String... slingResourceTypes)
        Description copied from interface: ServiceBasedRewriteRule
        Indicates if this service uses any of the specified sling:resourceType in any of its matching logic.
        Specified by:
        hasPattern in interface ServiceBasedRewriteRule
        Parameters:
        slingResourceTypes - the sling resource type to check
        Returns:
        true type matches
      • activate

        protected void activate​(org.osgi.service.component.ComponentContext context,
                                com.adobe.aem.modernize.component.rule.ColumnControlRewriteRule.Config config)
                         throws org.osgi.service.cm.ConfigurationException
        Throws:
        org.osgi.service.cm.ConfigurationException