public interface RenderContext
RenderContext
defines the context for executing Sightly scripts (see RenderUnit
).Modifier and Type | Method and Description |
---|---|
java.lang.Object |
call(java.lang.String functionName,
java.lang.Object... arguments)
Call one of the registered
RuntimeExtension s. |
javax.script.Bindings |
getBindings()
Returns the map of script bindings available to Sightly scripts.
|
ResourceResolver |
getScriptResourceResolver()
Returns the
ResourceResolver that was used for resolving the
currently evaluated script. |
javax.script.Bindings getBindings()
java.lang.Object call(java.lang.String functionName, java.lang.Object... arguments)
RuntimeExtension
s.functionName
- the name under which the extension is registeredarguments
- the extension's argumentsRuntimeExtension
's resultResourceResolver getScriptResourceResolver()
ResourceResolver
that was used for resolving the
currently evaluated script. This resolver is the same resolver used by
the ServletResolver
and thus should be used only for
script resolution.
This ResourceResolver
must not be closed.
If a RuntimeExtension
or a UseProvider
need to resolve
content, then the ResourceResolver
of the current request should
be used. This can be retrieved by using the following call:
ResourceResolver resolver = (ResourceResolver) renderContext.getBindings().get(SlingBindings.REQUEST).getResourceResolver();
"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"