com.tibco.cep.repo

## Interface GlobalVariables

-     public interface GlobalVariables

  Manages the global variables available in a RuleServiceProvider. See the TIBCO Designer documentation for details on creating global variables.
  Since:
    2.0.0
  See Also:
    `RuleServiceProvider`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `GlobalVariableDescriptor` | `getVariable(java.lang.String name)` Gets all information about a `GlobalVariable`.
    `boolean` | `getVariableAsBoolean(java.lang.String varName, boolean defaultValue)` Gets the `boolean` value of a global variable.
    `double` | `getVariableAsDouble(java.lang.String varName, double defaultValue)` Gets the `double` value of a global variable.
    `int` | `getVariableAsInt(java.lang.String varName, int defaultValue)` Gets the `int` value of a global variable.
    `long` | `getVariableAsLong(java.lang.String varName, long defaultValue)` Gets the `long` value of a global variable.
    `java.lang.String` | `getVariableAsString(java.lang.String varName, java.lang.String defaultValue)` Gets the `String` value of a global variable.
    `java.util.Collection` | `getVariables()` Gets all the global variables available in this `GlobalVariables`.
    `java.lang.CharSequence` | `substituteVariables(java.lang.CharSequence text)` Returns the result of substituting all global variables contained in the given `CharSequence` with their value.

- - ### Method Detail

    - #### getVariable

          GlobalVariableDescriptor getVariable(java.lang.String name)

      Gets all information about a `GlobalVariable`.
      Parameters:
        `name` - of the variable.
      Returns:
        a `GlobalVariable`.
      Since:
        2.0.0

    - #### getVariables

          java.util.Collection getVariables()

      Gets all the global variables available in this `GlobalVariables`.
      Returns:
        a Collection of `GlobalVariable`.
      Since:
        2.0.0

    - #### getVariableAsInt

          int getVariableAsInt(java.lang.String varName,
                               int defaultValue)

      Gets the `int` value of a global variable.
      Parameters:
        `varName` - name of the global variable.
        `defaultValue` - value returned if the global variable was not set.
      Returns:
        an `in`.
      Since:
        2.0.0

    - #### getVariableAsLong

          long getVariableAsLong(java.lang.String varName,
                                 long defaultValue)

      Gets the `long` value of a global variable.
      Parameters:
        `varName` - name of the global variable.
        `defaultValue` - value returned if the global variable was not set.
      Returns:
        a `long`.
      Since:
        2.0.0

    - #### getVariableAsDouble

          double getVariableAsDouble(java.lang.String varName,
                                     double defaultValue)

      Gets the `double` value of a global variable.
      Parameters:
        `varName` - name of the global variable.
        `defaultValue` - value returned if the global variable was not set.
      Returns:
        a `double`.
      Since:
        2.0.0

    - #### getVariableAsString

          java.lang.String getVariableAsString(java.lang.String varName,
                                               java.lang.String defaultValue)

      Gets the `String` value of a global variable.
      Parameters:
        `varName` - name of the global variable.
        `defaultValue` - value returned if the global variable was not set.
      Returns:
        a `String`.
      Since:
        2.0.0

    - #### getVariableAsBoolean

          boolean getVariableAsBoolean(java.lang.String varName,
                                       boolean defaultValue)

      Gets the `boolean` value of a global variable.
      Parameters:
        `varName` - name of the global variable.
        `defaultValue` - value returned if the global variable was not set.
      Returns:
        a `boolean`.
      Since:
        2.0.0

    - #### substituteVariables

          java.lang.CharSequence substituteVariables(java.lang.CharSequence text)

      Returns the result of substituting all global variables contained in the given `CharSequence` with their value. Undefined global variables will not be substituted.
      Parameters:
        `text` - a `CharSequence` that may contain global variables.
      Returns:
        another `CharSequence` that contains the result of substituting all global variables contained in the given `CharSequence` with their value.
      Since:
        2.0.0