org.apache.sling.scripting.api
Class AbstractScriptEngineFactory

java.lang.Object
  extended by org.apache.sling.scripting.api.AbstractScriptEngineFactory
All Implemented Interfaces:
javax.script.ScriptEngineFactory

public abstract class AbstractScriptEngineFactory
extends Object
implements javax.script.ScriptEngineFactory

This abstract class can be used for own script engine factory implementations.


Constructor Summary
protected AbstractScriptEngineFactory()
           
 
Method Summary
 String getEngineName()
           
 String getEngineVersion()
           
 List<String> getExtensions()
           
 String getMethodCallSyntax(String obj, String m, String... args)
           
 List<String> getMimeTypes()
           
 List<String> getNames()
           
 String getOutputStatement(String value)
           
 Object getParameter(String name)
           
 String getProgram(String... arg0)
           
protected  void setEngineName(String engineName)
          Set the engine name.
protected  void setEngineVersion(String engineVersion)
          Set the engine version
protected  void setExtensions(String... extensions)
          Set the extensions
protected  void setMimeTypes(String... mimeTypes)
          Set the mime types
protected  void setNames(String... names)
          Set the names
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.script.ScriptEngineFactory
getLanguageName, getLanguageVersion, getScriptEngine
 

Constructor Detail

AbstractScriptEngineFactory

protected AbstractScriptEngineFactory()
Method Detail

getEngineName

public String getEngineName()
Specified by:
getEngineName in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getEngineName()

setEngineName

protected void setEngineName(String engineName)
Set the engine name.

Parameters:
engineName - The new engine name

getEngineVersion

public String getEngineVersion()
Specified by:
getEngineVersion in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getEngineVersion()

setEngineVersion

protected void setEngineVersion(String engineVersion)
Set the engine version

Parameters:
engineVersion - The version string

getExtensions

public List<String> getExtensions()
Specified by:
getExtensions in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getExtensions()

setExtensions

protected void setExtensions(String... extensions)
Set the extensions

Parameters:
extensions - The array of extensions

getMimeTypes

public List<String> getMimeTypes()
Specified by:
getMimeTypes in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getMimeTypes()

setMimeTypes

protected void setMimeTypes(String... mimeTypes)
Set the mime types

Parameters:
mimeTypes - The array of mime types

getNames

public List<String> getNames()
Specified by:
getNames in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getNames()

setNames

protected void setNames(String... names)
Set the names

Parameters:
names - The array of names.

getMethodCallSyntax

public String getMethodCallSyntax(String obj,
                                  String m,
                                  String... args)
Specified by:
getMethodCallSyntax in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getMethodCallSyntax(java.lang.String, java.lang.String, java.lang.String[])

getOutputStatement

public String getOutputStatement(String value)
Specified by:
getOutputStatement in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getOutputStatement(java.lang.String)

getParameter

public Object getParameter(String name)
Specified by:
getParameter in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getParameter(java.lang.String)

getProgram

public String getProgram(String... arg0)
Specified by:
getProgram in interface javax.script.ScriptEngineFactory
See Also:
ScriptEngineFactory.getProgram(java.lang.String[])


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