Class AbstractIterationOperation<T extends org.jboss.windup.graph.model.WindupVertexFrame>

  • 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 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()
      • 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 a Property method of the form `@Property public X getCustomProperty()` and `X` has a Property method 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 the uppercaseFirstLetter argument 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 case
        uppercaseFirstLetter - true if the first character is to be uppercased, or false if the first character is to be lowercased
        delimiterChars - optional characters that are used to delimit word boundaries
        Returns:
        the camel case version of the word