Class AbstractIterationOperation<T extends org.jboss.windup.graph.model.WindupVertexFrame>
- java.lang.Object
-
- org.ocpsoft.rewrite.config.DefaultOperationBuilder
-
- org.jboss.windup.config.operation.GraphOperation
-
- org.jboss.windup.config.operation.iteration.AbstractIterationOperation<T>
-
- All Implemented Interfaces:
org.ocpsoft.rewrite.config.Operation,org.ocpsoft.rewrite.config.OperationBuilder
- Direct Known Subclasses:
IterationProgress,ParameterizedIterationOperation,TypeOperation
public abstract class AbstractIterationOperation<T extends org.jboss.windup.graph.model.WindupVertexFrame> extends GraphOperation
Simplified operation having method that already accepts the found payload.
-
-
Constructor Summary
Constructors Constructor Description AbstractIterationOperation()When the variable name is not specified, let the Iteration to set the current payload variable name.AbstractIterationOperation(String variableName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringcamelCase(String lowerCaseAndUnderscoredWord, boolean uppercaseFirstLetter, char... delimiterChars)By default, this method converts strings to UpperCamelCase.protected voidcheckVariableName(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context)Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.StringgetVariableName()booleanhasVariableNameSet()voidperform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context)abstract voidperform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, T payload)TresolvePayload(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.jboss.windup.graph.model.WindupVertexFrame payload)protected org.jboss.windup.graph.model.WindupVertexFrameresolveVariable(GraphRewrite event, String variableName)Resolves variable/property name expressions of the form `#{initialModelVar.customProperty.anotherProp}`, where the `initialModelVar` has aPropertymethod of the form `@Property public X getCustomProperty()` and `X` has aPropertymethod of the form `@Property public X getAnotherProp()`voidsetVariableName(String variableName)StringtoString()-
Methods inherited from class org.jboss.windup.config.operation.GraphOperation
perform
-
-
-
-
Constructor Detail
-
AbstractIterationOperation
public AbstractIterationOperation()
When the variable name is not specified, let the Iteration to set the current payload variable name.
-
AbstractIterationOperation
public AbstractIterationOperation(String variableName)
-
-
Method Detail
-
getVariableName
public String getVariableName()
-
setVariableName
public void setVariableName(String variableName)
-
hasVariableNameSet
public boolean hasVariableNameSet()
-
perform
public void perform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context)
- Specified by:
performin classGraphOperation
-
resolvePayload
public T resolvePayload(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.jboss.windup.graph.model.WindupVertexFrame payload)
-
checkVariableName
protected void checkVariableName(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context)
Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.
-
resolveVariable
protected org.jboss.windup.graph.model.WindupVertexFrame resolveVariable(GraphRewrite event, String variableName)
Resolves variable/property name expressions of the form `#{initialModelVar.customProperty.anotherProp}`, where the `initialModelVar` has aPropertymethod of the form `@Property public X getCustomProperty()` and `X` has aPropertymethod of the form `@Property public X getAnotherProp()`
-
perform
public abstract void perform(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, T payload)
-
camelCase
public String camelCase(String lowerCaseAndUnderscoredWord, boolean uppercaseFirstLetter, char... delimiterChars)
By default, this method converts strings to UpperCamelCase. If theuppercaseFirstLetterargument to false, then this method produces lowerCamelCase. This method will also use any extra delimiter characters to identify word boundaries.Examples:
inflector.camelCase("active_record",false) #=> "activeRecord" inflector.camelCase("active_record",true) #=> "ActiveRecord" inflector.camelCase("first_name",false) #=> "firstName" inflector.camelCase("first_name",true) #=> "FirstName" inflector.camelCase("name",false) #=> "name" inflector.camelCase("name",true) #=> "Name"- Parameters:
lowerCaseAndUnderscoredWord- the word that is to be converted to camel caseuppercaseFirstLetter- true if the first character is to be uppercased, or false if the first character is to be lowercaseddelimiterChars- optional characters that are used to delimit word boundaries- Returns:
- the camel case version of the word
-
-