|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScriptFactory
Script definition interface, encapsulating the configuration
of a specific script as well as a factory method for
creating the actual scripted Java Object
.
Method Summary | |
---|---|
Object |
getScriptedObject(ScriptSource actualScriptSource,
Class[] actualInterfaces)
Factory method for creating a scripted Java object. |
Class[] |
getScriptInterfaces()
Return the business interfaces that the script is supposed to implement. |
String |
getScriptSourceLocator()
Return a locator that points to the source of the script. |
boolean |
requiresConfigInterface()
Return whether the script requires a config interface to be generated for it. |
Method Detail |
---|
String getScriptSourceLocator()
Typical supported locators are Spring resource locations (such as "file:C:/myScript.bsh" or "classpath:myPackage/myScript.bsh") and inline scripts ("inline:myScriptText...").
ScriptFactoryPostProcessor.convertToScriptSource(java.lang.String, org.springframework.core.io.ResourceLoader)
,
ResourceLoader
Class[] getScriptInterfaces()
Can return null
if the script itself determines
its Java interfaces (such as in the case of Groovy).
boolean requiresConfigInterface()
getScriptInterfaces()
.
getScriptInterfaces()
Object getScriptedObject(ScriptSource actualScriptSource, Class[] actualInterfaces) throws IOException, ScriptCompilationException
actualScriptSource
- the actual ScriptSource to retrieve
the script source text from (never null
)actualInterfaces
- the actual interfaces to expose,
including script interfaces as well as a generated config interface
(if applicable, can be null
)
IOException
- if script retrieval failed
ScriptCompilationException
- if script compilation failed
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |