Class IteratingRuleProvider<PAYLOADTYPE extends org.jboss.windup.graph.model.WindupVertexFrame>
- java.lang.Object
-
- org.ocpsoft.rewrite.context.ContextBase
-
- org.jboss.windup.config.AbstractRuleProvider
-
- org.jboss.windup.config.ruleprovider.IteratingRuleProvider<PAYLOADTYPE>
-
- 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 extendAbstractRuleProviderfor cases where the rule simply needs to provide some query, and wants to execute a function over each resulting row.- Author:
- Jesse Sightler
-
-
Constructor Summary
Constructors Constructor Description IteratingRuleProvider()IteratingRuleProvider(Class<? extends RuleProvider> implementationType, String id)IteratingRuleProvider(RuleProviderMetadata metadata)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.ocpsoft.rewrite.config.ConfigurationgetConfiguration(RuleLoaderContext ruleLoaderContext)KEEP - The purpose of this override is to make sure that reflection (interface.getClass().getMethods()) keeps a method with the specific type.abstract voidperform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, PAYLOADTYPE payload)Perform this function for eachWindupVertexFramereturned by the "when" clause.StringtoStringPerform()This should return a string describing the operation to be performed by the subclass.abstract org.ocpsoft.rewrite.config.ConditionBuilderwhen()Gets the condition for theConfiguration's "when" clause.-
Methods inherited from class org.jboss.windup.config.AbstractRuleProvider
enhanceRuleMetadata, equals, getExecutionIndex, getMetadata, handles, hashCode, priority, setExecutionIndex, toString
-
-
-
-
Constructor Detail
-
IteratingRuleProvider
public IteratingRuleProvider()
-
IteratingRuleProvider
public IteratingRuleProvider(RuleProviderMetadata metadata)
-
IteratingRuleProvider
public IteratingRuleProvider(Class<? extends RuleProvider> implementationType, String id)
-
-
Method Detail
-
when
public abstract org.ocpsoft.rewrite.config.ConditionBuilder when()
Gets the condition for theConfiguration's "when" clause.
-
perform
public abstract void perform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, PAYLOADTYPE payload)
Perform this function for eachWindupVertexFramereturned 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:RuleProviderKEEP - 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.
-
-