com.smartgwt.client.types

## Enum DataSourceTemplateReferenceMode

- java.lang.Object
- - java.lang.Enum<DataSourceTemplateReferenceMode>
  - - com.smartgwt.client.types.DataSourceTemplateReferenceMode

- All Implemented Interfaces:
    ValueEnum, java.io.Serializable, java.lang.Comparable<DataSourceTemplateReferenceMode>

      public enum DataSourceTemplateReferenceMode
      extends java.lang.Enum<DataSourceTemplateReferenceMode>
      implements ValueEnum

  Indicates the mode to use for resolving templated references in a DataSource's configuration file. See `DataSource.allowTemplateReferences` for an overview of configuration templating.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ALL` Indicates that full Velocity processing will be used to resolve templated references.
    `CONFIGONLY` Indicates that a simple find-and-replace process should resolve templated references.
    `NONE` Indicates that no resolution of templated references should be done

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getValue()`
    `static DataSourceTemplateReferenceMode` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static DataSourceTemplateReferenceMode[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### NONE

          public static final DataSourceTemplateReferenceMode NONE

      Indicates that no resolution of templated references should be done

      If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "none".

    - #### CONFIGONLY

          public static final DataSourceTemplateReferenceMode CONFIGONLY

      Indicates that a simple find-and-replace process should resolve templated references. In this mode, the system looks for references strictly like the one below, and replaces them with the referenced property from your `server.properties` file. So if your `server.properties` file contained an entry like this:

            database.name: MyDatabase

      the below example would cause `dbName` to be resolved as `MyDatabase`

            dbName="$config['database.name']"

      (Note, you can use a different token than "`$config`" if you need to - see `templateConfigToken`)

      If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "configOnly".

    - #### ALL

          public static final DataSourceTemplateReferenceMode ALL

      Indicates that full Velocity processing will be used to resolve templated references. This allows you to use all of Velocity's template-handling features - for example, conditional blocks and iteration - and so is more powerful than the simple "configOnly" option above. Note, however, that this templating is necessarily limited by the fact that it takes place during DataSource initialization, when there is not a lot of context available for templating purposes - you have the "`$config`" object, as with "configOnly", and some of the other variables listed in the `Velocity overview`, but nothing relating to `DSRequest`s

      If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "all".

  - ### Method Detail

    - #### values

          public static DataSourceTemplateReferenceMode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DataSourceTemplateReferenceMode c : DataSourceTemplateReferenceMode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DataSourceTemplateReferenceMode valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getValue

          public java.lang.String getValue()

      Specified by:
        `getValue` in interface `ValueEnum`