-
public final class CustomTemplateA definition of a custom template. Can be a function or a code template. Instances are uniquely identified by their name.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCustomTemplate.FunctionBuilderBuilder for CustomTemplate functions. See Builder
public final classCustomTemplate.TemplateBuilderBuilder for CustomTemplate code templates. See Builder.
public classCustomTemplate.BuilderBuilder for CustomTemplates creation. Name and presenter must be set before calling build. Arguments can be specified by using one of the *argument methods. Argument names must be unique. "." characters in template arguments' names denote hierarchical structure. They are treated the same way as the keys within maps passed to mapArgument. If a higher-level name (to the left of a . symbol) matches a map argument's name it is treated the same as if the argument was part of the map itself.
For example, the following code snippets define identical arguments:
builder.mapArgument( name = "map", value = mapOf ( "a" to 5, "b" to 6 ) )and
builder.intArgument("map.a", 5) builder.intArgument("map.b", 6)Methods of this class throw CustomTemplateException for invalid states or parameters. Exceptions of this type are not meant to be caught since defined templates must be correct when the sdk is running. If such an exception is thrown the template definition should be changed instead of handling the error.
-
Method Summary
Modifier and Type Method Description final StringgetName()The name of the template. final CustomTemplatePresenter<?>getPresenter()The presenter associated with this template. final BooleangetIsVisual()Whether the template has UI or not. Booleanequals(Object other)IntegerhashCode()StringtoString()-
-
Method Detail
-
getPresenter
final CustomTemplatePresenter<?> getPresenter()
The presenter associated with this template.
-
getIsVisual
final Boolean getIsVisual()
Whether the template has UI or not. If set to
truethe template is registered as part of the in-apps queue and must be explicitly dismissed before other in-apps can be shown. If set tofalsethe template is executed directly and does not require dismissal nor it impedes other in-apps.
-
-
-
-