TemplateContext
Inheritance: java.lang.Object
public final class TemplateContext<TObject>
Represents a model object interface for a template engine.
Methods
Method | Description |
---|---|
Creates a child template context. | |
getObject() | Returns the model object. |
getOutput() | Returns collection of output elements of the host document. |
getLocal() | Returns local storage of the current template context. |
getGlobal() | Returns global storage of the host document. |
subModel(TSubModel subModel)
public final TemplateContext<TSubModel> <TSubModel>subModel(TSubModel subModel)
Creates a child template context.
Parameters:
Parameter | Type | Description |
---|---|---|
subModel | TSubModel | Child model object. |
Returns: TemplateContext - New template context with given model and parent’s output collection and global storage.
getObject()
public final TObject getObject()
Returns the model object. Read-only Object.
Returns: TObject
getOutput()
public final Output getOutput()
Returns collection of output elements of the host document. Read-only Output(#getOutput.getOutput).
Returns: Output
getLocal()
public final Storage getLocal()
Returns local storage of the current template context. Read-only Storage.
Returns: Storage
getGlobal()
public final Storage getGlobal()
Returns global storage of the host document. Read-only Storage.
Returns: Storage