org.apache.myfaces.extensions.cdi.scripting.impl.util
Class ScriptingUtils

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.scripting.impl.util.ScriptingUtils

@Typed
public abstract class ScriptingUtils
extends Object

Author:
Gerhard Petracek

Method Summary
static UnmodifiableMap<String,Object> createExpressionLanguageHelper()
          Creates a new el helper map
static javax.script.ScriptEngine createScriptEngine(Class<? extends Language> language)
          Resolves the ScriptEngine based on the given language definition
static javax.script.ScriptEngineManager getCurrentScriptEngineManager()
          Resolves the current ScriptEngineManager
static ExternalExpressionInterpreter resolveExternalExpressionInterpreter()
          Resolves an ExternalExpressionInterpreter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCurrentScriptEngineManager

public static javax.script.ScriptEngineManager getCurrentScriptEngineManager()
Resolves the current ScriptEngineManager

Returns:
the current script-engine-manager

createExpressionLanguageHelper

public static UnmodifiableMap<String,Object> createExpressionLanguageHelper()
Creates a new el helper map

Returns:
a new el helper

resolveExternalExpressionInterpreter

public static ExternalExpressionInterpreter resolveExternalExpressionInterpreter()
Resolves an ExternalExpressionInterpreter

Returns:
a scoped custom bean or a new instance of the default implementation

createScriptEngine

public static javax.script.ScriptEngine createScriptEngine(Class<? extends Language> language)
Resolves the ScriptEngine based on the given language definition

Parameters:
language - current language
Returns:
script-engine for the given language


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.