|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.szegedi.spring.web.jsflow.ScriptStorage
public class ScriptStorage
A loader and in-memory storage for compiled flowscripts. It is sufficient (and recommended) to have exactly one script storage per application context. The storage will be used by all the flow controllers in the application context. The script storage is resource loader aware, and will use the resource loader it was made aware of for loading script source code.
Constructor Summary | |
---|---|
ScriptStorage()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
PersistenceSupport |
getPersistenceSupport()
Returns an object implementing support functionality for persistent flow state storage. |
void |
setContextFactory(org.mozilla.javascript.ContextFactory contextFactory)
Sets the context factory used to run the library script. |
void |
setLibraryCustomizer(LibraryCustomizer libraryCustomizer)
Sets a library customizer. |
void |
setLibraryScripts(java.util.List libraryScripts)
Sets a list of library scripts. |
void |
setNoStaleCheckPeriod(long noStaleCheckPeriod)
Sets the period in milliseconds during which a script resource will not be checked for staleness. |
void |
setPrefix(java.lang.String prefix)
Sets the prefix prepended to the script name to form the full path and name of the resource that stores the script source code, i.e. |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Sets the resource loader for this storage. |
void |
setScriptCharacterEncoding(java.lang.String scriptCharacterEncoding)
Sets the character encoding used to load scripts' source code. |
void |
setSecurityDomainFactory(SecurityDomainFactory securityDomainFactory)
Sets a security domain factory for this script storage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptStorage()
Method Detail |
---|
public void setScriptCharacterEncoding(java.lang.String scriptCharacterEncoding)
file.encoding
.
scriptCharacterEncoding
- public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
ResourceLoaderAware
, this will usually be invoked by the Spring
framework to set the application context as the resource loader.
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
public void setPrefix(java.lang.String prefix)
prefix
- the resource path prefix used for locating script source
code resources. Defaults to "".public void setNoStaleCheckPeriod(long noStaleCheckPeriod)
noStaleCheckPeriod
- the period in milliseconds during which one
script file's timestamp is not rechecked.public void setLibraryScripts(java.util.List libraryScripts)
libraryScripts
- the list of additional library scripts. Each
element can be a string (will resolve to a path as per
setResourceLoader(ResourceLoader)
and setPrefix(String)
),
a Resource
, or a Script
.public void setLibraryCustomizer(LibraryCustomizer libraryCustomizer)
setLibraryScripts(List)
, as that will also
cause the functions defined in those scripts to be properly stubbed for
serialization and other clustered replication mechanisms. The customizer
is invoked after all library scripts have already been run.
libraryCustomizer
- public void setSecurityDomainFactory(SecurityDomainFactory securityDomainFactory)
securityDomainFactory
- public void setContextFactory(org.mozilla.javascript.ContextFactory contextFactory)
ContextFactory.getGlobal()
is used.
If you are using a custom context factory in either
FlowController
or OpenContextInViewInterceptor
, you
might want to explicitly specify that factory here as well, although in
majority of cases this is not necessary.
contextFactory
- public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public PersistenceSupport getPersistenceSupport()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |