Annotation Interface FieldValues


Marks a parameter as having a field or set of fields that have the capability of having its values resolved. This resolution is resolved by the ValueProvider referenced in value().
Since:
1.4
  • Element Details

    • targetSelectors

      String[] targetSelectors
      Gets the target selectors of the fields of the parameter whose values are resolved by the ValueProvider referenced in value().

      The following is an example of a possible value for the parameter so that the type of the parameter is understood:

       {
         "routingInfo": {
         "channelId":"CHANNEL_ID_VALUE",
         "region":"SOUTH"
         },
         "message":"The message to send"
        }
       
      Using the DataWeave syntax, the target selector for the "channelId" field will be "routingInfo.channelId". In this case, the format of the target selector is the name of the fields to access separated by a dot (`.`).

      The following is another example using XML where the target is an attribute:

       
        <customers>
          <person gender="male"/>
            <name>John</name>
            <occupation>Banker</occupation>
          </person>
        </customers>
       
       
      Using the DataWeave syntax the gender attribute target selector will be "customers.person.@gender".

      When the given ValueProvider referenced in value() is a single level provider, the returned array will have only one target selector. If it is multi-level, the returned array will have the selectors of the value parts in order they are resolved.

      The following is an example of a possible value for the parameter so that the type of the parameter is understood:

        {
          "name" : "John",
          "occupation" : "Banker",
          "location": {
          "continent": "CONTINENT",
           "country": "COUNTRY",
           "city": "CITY"
           }
        }
       

      If a multi-level value provider is defined for the fields continent, country and city, the array returned must be ["location.continent", "location.country", "location.city"]

      All the values must be in the same parameter for multi-level resolution.

      Returns:
      the target selectors of the fields of the parameter
    • value

      Class<? extends ValueProvider> value
      Returns:
      the associated ValueProvider for the parameter
    • open

      boolean open
      Returns:
      a boolean indicating if this values are closed or not
      Default:
      true
    • bindings

      Binding[] bindings
      Returns:
      bindings between parameters in the OfValues.value() to extraction expressions.
      Default:
      {}