H
- the type of helpers created by this factorypublic interface HelperFactory<H>
extends sirius.kernel.di.std.Priorized
ScopeInfo
to perform certain tasks.
Note that a helper is created once per scope and not per user or request. Everything that is specific to the user or request has the be in the request itself or the session.
Variables can be annotated using HelperConfig
and will be automatically filled with the value set in the
scope config. HOWEVER: Note that user specific overwrites of this config value cannot be applied. These values
have to be fetched using UserContext.getSettings()
.
Modifier and Type | Method and Description |
---|---|
Class<H> |
getHelperType()
Returns the type of helpers produced by this factory.
|
String |
getName()
Returns a short and descriptive name which can be used to fetch the helper in templates.
|
default int |
getPriority() |
H |
make(ScopeInfo scope)
Creates a new helper for the given scope.
|
default int getPriority()
getPriority
in interface sirius.kernel.di.std.Priorized
@Nonnull Class<H> getHelperType()
@Nonnull String getName()
We prefer using names over class names in templates as this make refactorings way easier.
Copyright © 2018. All rights reserved.