Variable exit

The interface defines the structure of a variable that can be used in the queries.

The name of the variable, as it appears in the user interface, can be set using the javax.inject.Named class annotation.

public interface Variable
{
       /**
       * Get the type of the data returned by this variable.
       * @return The data type.
       */
       DataType getType();

       /**
       * Evaluate the value of the variable in the current context.
       * @param context The context of the query.
       * @return The value of the variable.
       */
       @CheckForNull
       Object evaluate(Map<? extends String, ?> context);
}
Argument Content
arguments Arguments describing the context.

Note:

For Variable exits, your jar must contain a META-INF/services/com.axway.datastore.runtime.api.base.extension.variable.Variable file.
The file must contain full path entries (package and class name) for each of your exits that implements Variable interface.

Example:

For a variable exit called LastTwoMonthsVariable.class in package exits, META-INF/services/com.axway.datastore.runtime.api.base.extension.variable.Variable file inside the jar should contain only one line:

exits.LastTwoMonthsVariable

Related Links