Search in sources :

Example 1 with RuntimeExtension

use of org.apache.sling.scripting.sightly.extension.RuntimeExtension in project sling by apache.

the class RenderContextImpl method call.

@Override
public Object call(String functionName, Object... arguments) {
    Map<String, RuntimeExtension> extensions = extensionRegistryService.extensions();
    RuntimeExtension extension = extensions.get(functionName);
    if (extension == null) {
        throw new SightlyException("Runtime extension is not available: " + functionName);
    }
    return extension.call(this, arguments);
}
Also used : RuntimeExtension(org.apache.sling.scripting.sightly.extension.RuntimeExtension) SightlyException(org.apache.sling.scripting.sightly.SightlyException)

Aggregations

SightlyException (org.apache.sling.scripting.sightly.SightlyException)1 RuntimeExtension (org.apache.sling.scripting.sightly.extension.RuntimeExtension)1