Enum DataSourceTemplateReferenceMode

java.lang.Object
java.lang.Enum<DataSourceTemplateReferenceMode>
com.smartgwt.client.types.DataSourceTemplateReferenceMode
All Implemented Interfaces:
ValueEnum, Serializable, Comparable<DataSourceTemplateReferenceMode>, Constable

public enum DataSourceTemplateReferenceMode extends 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 Details

    • 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 DSRequests

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

  • Method Details

    • values

      public static DataSourceTemplateReferenceMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DataSourceTemplateReferenceMode valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Specified by:
      getValue in interface ValueEnum