Package org.forgerock.openig.script
Interface ScriptFactory
- All Known Implementing Classes:
 GroovyScriptFactory
public interface ScriptFactory
A factory for 
Scripts.- 
Method Summary
Modifier and TypeMethodDescriptioncreateInline(String... lines) Build a newScriptinstance from the givenlinesrepresenting the script content.createResource(String resource) Build a newScriptinstance from a resource name.init(Environment environment) Initialize the factory with the givenenvironment.mimeType()Returns the mime-type of the script supported by this factory. 
- 
Method Details
- 
init
Initialize the factory with the givenenvironment.- Parameters:
 environment- the current environment information- Returns:
 - this factory to allow method chaining
 - Throws:
 ScriptException- if the initialization failed
 - 
createResource
Build a newScriptinstance from a resource name.The
resourcename can either:- a relative path to the script base directory
 - an absolute URL
 
- Parameters:
 resource- Script resource name- Returns:
 - a new Script instance
 - Throws:
 ScriptException- if resource is not available or if any pre-validation failed
 - 
createInline
Build a newScriptinstance from the givenlinesrepresenting the script content.- Parameters:
 lines- script content- Returns:
 - a new Script instance
 - Throws:
 ScriptException- if any pre-validation failed
 - 
mimeType
String mimeType()Returns the mime-type of the script supported by this factory.- Returns:
 - the mime-type of the script supported by this factory.
 
 
 -