Class IteratingRuleProvider<PAYLOADTYPE extends org.jboss.windup.graph.model.WindupVertexFrame>

  • All Implemented Interfaces:
    RuleProvider, org.ocpsoft.common.pattern.Specialized<Object>, org.ocpsoft.common.pattern.Weighted, org.ocpsoft.rewrite.config.ConfigurationProvider<RuleLoaderContext>, org.ocpsoft.rewrite.context.Context

    public abstract class IteratingRuleProvider<PAYLOADTYPE extends org.jboss.windup.graph.model.WindupVertexFrame>
    extends AbstractRuleProvider
    This provides a simplified way to extend AbstractRuleProvider for cases where the rule simply needs to provide some query, and wants to execute a function over each resulting row.
    Author:
    Jesse Sightler
    • Constructor Detail

      • IteratingRuleProvider

        public IteratingRuleProvider()
      • IteratingRuleProvider

        public IteratingRuleProvider​(Class<? extends RuleProvider> implementationType,
                                     String id)
    • Method Detail

      • when

        public abstract org.ocpsoft.rewrite.config.ConditionBuilder when()
        Gets the condition for the Configuration's "when" clause.
      • perform

        public abstract void perform​(GraphRewrite event,
                                     org.ocpsoft.rewrite.context.EvaluationContext context,
                                     PAYLOADTYPE payload)
        Perform this function for each WindupVertexFrame returned by the "when" clause.
      • toStringPerform

        public String toStringPerform()
        This should return a string describing the operation to be performed by the subclass.
      • getConfiguration

        public final org.ocpsoft.rewrite.config.Configuration getConfiguration​(RuleLoaderContext ruleLoaderContext)
        Description copied from interface: RuleProvider
        KEEP - The purpose of this override is to make sure that reflection (interface.getClass().getMethods()) keeps a method with the specific type. Otherwise, type erasure will get rid of it and callers will get ClassCastExceptions in some obscure cases.