public interface ScriptFactory
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.
|
default ScriptLanguageFactory<?> |
createScriptLanguageFactory(short scriptType,
XULDocument document,
org.scripthelper.model.ScriptSource source)
Create the script language factory for a source and a MIME type.
|
ScriptLanguageFactory<?> |
createScriptLanguageFactoryImpl(short scriptType,
int countScripts,
org.scripthelper.model.ScriptSource source)
Create the script language factory for a source and a MIME type.
|
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 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.
|
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.
|
void setClassLoader(java.lang.ClassLoader classLoader)
classLoader
- the classLoaderjava.lang.ClassLoader getClassLoader()
default ScriptLanguageFactory<?> createScriptLanguageFactory(short scriptType, XULDocument document, org.scripthelper.model.ScriptSource source)
scriptType
- the script typedocument
- the XULDocumentsource
- the script sourceScriptLanguageFactory<?> createScriptLanguageFactoryImpl(short scriptType, int countScripts, org.scripthelper.model.ScriptSource source)
scriptType
- the script typecountScripts
- the total number of scripts in the documentsource
- the script sourcejava.util.Set<java.lang.Class<?>> getInterfaces()
void setScriptContext(XULScriptContext context)
context
- the global script contextXULScriptContext getScriptContext()
void setScriptExceptionListener(org.scripthelper.exceptions.ScriptExceptionListener exceptionListener)
exceptionListener
- the script exception listenerorg.scripthelper.exceptions.ScriptExceptionListener getScriptExceptionListener()
void setScriptLogger(org.scripthelper.context.ScriptLogger scriptLogger)
scriptLogger
- the script loggerorg.scripthelper.context.ScriptLogger getScriptLogger()
java.util.Map<org.scripthelper.model.ScriptSource,ScriptHandle> getScripts()
void addScriptToXUL(java.net.URL url, XULDocument doc)
url
- the scriptdoc
- the XUL documentScriptHandle getScript(org.scripthelper.model.ScriptSource source)
source
- the ScriptSourceboolean containsScript(org.scripthelper.model.ScriptSource source)
source
- the ScriptSourceScriptHandle removeScript(org.scripthelper.model.ScriptSource source)
source
- the ScriptSourcevoid addScriptToDocuments(ScriptHandle script)
script
- the script handleScriptHandle addScript(XULDocument document, org.scripthelper.model.ScriptSource source)
document
- the XULDocumentsource
- the script sourceScriptHandle addScript(short scriptType, XULDocument document, org.scripthelper.model.ScriptSource source)
scriptType
- the script typedocument
- the XULDocumentsource
- the script sourceboolean hasScript(java.lang.String name)
name
- the script nameCopyright © 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence