Package com.smartgwt.client.types
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates that full Velocity processing will be used to resolve templated references.Indicates that a simple find-and-replace process should resolve templated references.Indicates that no resolution of templated references should be done -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
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.
-
Enum Constant Details
-
NONE
Indicates that no resolution of templated references should be doneIf this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "none". -
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 yourserver.properties
file. So if yourserver.properties
file contained an entry like this:database.name: MyDatabase
the below example would causedbName
to be resolved asMyDatabase
dbName="$config['database.name']"
(Note, you can use a different token than "$config
" if you need to - seetemplateConfigToken
)If this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "configOnly". -
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 theVelocity overview
, but nothing relating toDSRequest
sIf 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
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
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 nameNullPointerException
- if the argument is null
-
getValue
-