S
- the Script interfacepublic abstract class AbstractScriptFactory<S> extends java.lang.Object implements ScriptFactory
Modifier and Type | Field and Description |
---|---|
protected java.lang.ClassLoader |
classLoader
The ClassLoader.
|
protected XULScriptContext |
context
The XULScriptContext.
|
protected org.scripthelper.exceptions.ScriptExceptionListener |
exceptionListener
The ScriptExceptionListener.
|
protected java.util.Map<java.lang.Class<?>,ScriptLanguageFactory<?>> |
langFactories
The ScriptLanguageFactory.
|
protected org.scripthelper.context.ScriptLogger |
scriptLogger
The ScriptLogger.
|
Constructor and Description |
---|
AbstractScriptFactory() |
Modifier and Type | Method and Description |
---|---|
ScriptHandle |
addScript(short scriptType,
XULDocument document,
org.scripthelper.model.ScriptSource source)
Add a script.
|
ScriptHandle |
addScript(XULDocument document,
org.scripthelper.model.ScriptSource source)
Add a script.
|
void |
addScriptToDocuments(ScriptHandle script)
Add a script to all XUL documents.
|
void |
addScriptToXUL(java.net.URL url,
XULDocument doc)
Add a script to a XUL document.
|
boolean |
containsScript(org.scripthelper.model.ScriptSource source)
Return true if the factory contains a ScriptSource.
|
java.lang.ClassLoader |
getClassLoader()
Return the classLoader to use to load the script classes
|
java.util.Set<java.lang.Class<?>> |
getInterfaces()
Return the Set of script interfaces which are handled by this factory.
|
ScriptHandle |
getScript(org.scripthelper.model.ScriptSource source)
Return the script associated with a source.
|
XULScriptContext |
getScriptContext()
Return the script context.
|
org.scripthelper.exceptions.ScriptExceptionListener |
getScriptExceptionListener()
Return the script exception listener.
|
org.scripthelper.context.ScriptLogger |
getScriptLogger()
Return the script logger.
|
java.util.Map<org.scripthelper.model.ScriptSource,ScriptHandle> |
getScripts()
Return the scripts.
|
protected short |
getScriptType(org.scripthelper.model.ScriptSource source)
Return the script type for a script source.
|
boolean |
hasScript(java.lang.String name)
Return true if the factory has a script of a specified name.
|
ScriptHandle |
removeScript(org.scripthelper.model.ScriptSource source)
Removed a script.
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
Set the classLoader to use to load the script classes.
|
void |
setScriptContext(XULScriptContext context)
Set the global script context used by all scripts.
|
void |
setScriptExceptionListener(org.scripthelper.exceptions.ScriptExceptionListener exceptionListener)
Set the script exception listener.
|
void |
setScriptLogger(org.scripthelper.context.ScriptLogger scriptLogger)
Set the script logger.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createScriptLanguageFactory, createScriptLanguageFactoryImpl
protected java.util.Map<java.lang.Class<?>,ScriptLanguageFactory<?>> langFactories
protected XULScriptContext context
protected org.scripthelper.exceptions.ScriptExceptionListener exceptionListener
protected org.scripthelper.context.ScriptLogger scriptLogger
protected java.lang.ClassLoader classLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
setClassLoader
in interface ScriptFactory
classLoader
- the classLoaderpublic java.lang.ClassLoader getClassLoader()
getClassLoader
in interface ScriptFactory
public void setScriptContext(XULScriptContext context)
setScriptContext
in interface ScriptFactory
context
- the global script contextpublic XULScriptContext getScriptContext()
getScriptContext
in interface ScriptFactory
public void setScriptExceptionListener(org.scripthelper.exceptions.ScriptExceptionListener exceptionListener)
setScriptExceptionListener
in interface ScriptFactory
exceptionListener
- the script exception listenerpublic org.scripthelper.exceptions.ScriptExceptionListener getScriptExceptionListener()
getScriptExceptionListener
in interface ScriptFactory
public void setScriptLogger(org.scripthelper.context.ScriptLogger scriptLogger)
setScriptLogger
in interface ScriptFactory
scriptLogger
- the script loggerpublic org.scripthelper.context.ScriptLogger getScriptLogger()
getScriptLogger
in interface ScriptFactory
public java.util.Map<org.scripthelper.model.ScriptSource,ScriptHandle> getScripts()
getScripts
in interface ScriptFactory
public java.util.Set<java.lang.Class<?>> getInterfaces()
getInterfaces
in interface ScriptFactory
public void addScriptToXUL(java.net.URL url, XULDocument doc)
addScriptToXUL
in interface ScriptFactory
url
- the scriptdoc
- the XUL documentpublic ScriptHandle getScript(org.scripthelper.model.ScriptSource source)
getScript
in interface ScriptFactory
source
- the ScriptSourcepublic boolean containsScript(org.scripthelper.model.ScriptSource source)
containsScript
in interface ScriptFactory
source
- the ScriptSourcepublic ScriptHandle removeScript(org.scripthelper.model.ScriptSource source)
removeScript
in interface ScriptFactory
source
- the ScriptSourcepublic void addScriptToDocuments(ScriptHandle script)
addScriptToDocuments
in interface ScriptFactory
script
- the script handleprotected short getScriptType(org.scripthelper.model.ScriptSource source)
source
- the ScriptSourcepublic ScriptHandle addScript(XULDocument document, org.scripthelper.model.ScriptSource source)
addScript
in interface ScriptFactory
document
- the XULDocumentsource
- the script sourcepublic ScriptHandle addScript(short scriptType, XULDocument document, org.scripthelper.model.ScriptSource source)
addScript
in interface ScriptFactory
scriptType
- the script typedocument
- the XULDocumentsource
- the script sourcepublic boolean hasScript(java.lang.String name)
hasScript
in interface ScriptFactory
name
- the script nameCopyright © 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence