Class ScriptContextBuilder
java.lang.Object
org.identityconnectors.framework.common.objects.ScriptContextBuilder
Builds an
ScriptContext
.-
Constructor Summary
ConstructorDescriptionCreates an empty builder.ScriptContextBuilder
(String scriptLanguage, String scriptText) Creates a builder with the required parameters specified. -
Method Summary
Modifier and TypeMethodDescriptionaddScriptArgument
(String name, Object value) Adds or sets an argument to pass to the script.build()
Creates aScriptContext
.Returns a mutable reference of the script arguments map.Identifies the language in which the script is written (e.g.,bash
,csh
,Perl4
orPython
).Returns the actual characters of the script.void
removeScriptArgument
(String name) Removes the given script argument.setScriptLanguage
(String scriptLanguage) Sets the script language.setScriptText
(String scriptText) Sets the actual characters of the script.
-
Constructor Details
-
ScriptContextBuilder
public ScriptContextBuilder()Creates an empty builder. -
ScriptContextBuilder
Creates a builder with the required parameters specified.- Parameters:
scriptLanguage
- a string that identifies the language in which the script is written (e.g.,bash
,csh
,Perl4
orPython
).scriptText
- The text (i.e., actual characters) of the script.
-
-
Method Details
-
getScriptLanguage
Identifies the language in which the script is written (e.g.,bash
,csh
,Perl4
orPython
).- Returns:
- The script language.
-
setScriptLanguage
Sets the script language.- Parameters:
scriptLanguage
- The script language
-
getScriptText
Returns the actual characters of the script.- Returns:
- the actual characters of the script.
-
setScriptText
Sets the actual characters of the script.- Parameters:
scriptText
- The actual characters of the script.
-
addScriptArgument
Adds or sets an argument to pass to the script.- Parameters:
name
- The name of the argument. Must not be null.value
- The value of the argument. Must be one of type types that the framework can serialize.- See Also:
-
removeScriptArgument
Removes the given script argument.- Parameters:
name
- The name of the argument. Must not be null.
-
getScriptArguments
Returns a mutable reference of the script arguments map.- Returns:
- A mutable reference of the script arguments map.
-
build
Creates aScriptContext
. ThescriptLanguage
andscriptText
must be set prior to calling this.- Returns:
- The
ScriptContext
.
-