[
https://issues.apache.org/jira/browse/SLING-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930339#comment-16930339
]
Radu Cotescu commented on SLING-4330:
-------------------------------------
[~olli], your implementation is a good step forward but I'm afraid that it's
not generic enough. With the code you wrote we only cover the case of scripts
obtained through the {{SlingScriptAdapterFactory}}. I think a more generic
approach would be to extend the implementation we have in the
{{SlingScriptEngineManager}} [0] and maybe expose this as an API. In this case
we'd need another {{SlingScriptEngineManager#getEngineByExtension}} method that
would take the resource type as parameter, besides the extension. WDYT?
[0] -
[https://github.com/apache/sling-org-apache-sling-scripting-core/blob/master/src/main/java/org/apache/sling/scripting/core/impl/jsr223/SlingScriptEngineManager.java]
> Select script engines in SlingScriptAdapterFactory via mapping
> --------------------------------------------------------------
>
> Key: SLING-4330
> URL: https://issues.apache.org/jira/browse/SLING-4330
> Project: Sling
> Issue Type: New Feature
> Components: Scripting
> Affects Versions: Scripting Core 2.0.28
> Reporter: Oliver Lietz
> Assignee: Oliver Lietz
> Priority: Major
> Fix For: Scripting Core 2.0.60
>
>
> Running multiple script engines for same script (template) extension should
> be possible.
> -Scripting Thymeleaf already provides that parameter, see
> {{org.apache.sling.scripting.thymeleaf.SlingTemplateModeHandler#getPatternSpec():org.thymeleaf.PatternSpec}}.-
> Support for multiple script engines via mapping:
> {noformat}
> {
> "sling:scripting": [
> "html=The HTL Templating Language:1.4",
> "js=ECMAScript:partial ECMAScript 2015 support"
> ]
> }
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)