Telosys directives
In addition to the standard Velocity language syntax, Telosys provides some specific "directives".
These directives can be useful to simplify writing or debugging templates.
#assertFalse
( Telosys specific directive - since version 2.0.7 )
Checks that the value of the first argument is FALSE. Otherwise throws an error with the given message.
Examples :
#assertTrue
( Telosys specific directive - since version 2.0.7 )
Checks that the value of the first argument is TRUE. Otherwise throws an error with the given message.
Examples :
#cancel
( Telosys specific directive - since version 3.3.0 )
Cancels the current generation. When "#cancel" is used in a template the target file is not generated. This directive is useful when certain entities are not supposed to be generated. A cancellation is not considered as an error (no reported in errors).
This directive has only one argument: a message to indicate why the generation was canceled
Examples :
#checkId
( Telosys specific directive - since version 3.0.0 )
Checks the existence of ID/Primary Key in the given entity. Throws an error if there's no ID/Primary Key defined in the entity.
Examples :
#error
( Telosys specific directive - since version 2.0.7 )
Throws an error with the given message
Examples :
#using
( Telosys specific directive - since version 2.0.7 )
Declares that the current template will use unusual objects or variables which must therefore be defined in the context. This directive verifies that all required objects or variables are defined in the Velocity context. It throws an error if one of the given objects is not defined. Often used to verify that required specific variables have been defined.
Examples :
Last updated