@Singleton public class ScriptEngineConfigurator extends Object implements ServiceListener
StandardScriptEngineManager so that individual engines can be configured.ADDED, MODIFIED, REMOVED| Constructor and Description |
|---|
ScriptEngineConfigurator(org.slf4j.Logger logger)
Construct a new instance of
ScriptEngineConfigurator |
| Modifier and Type | Method and Description |
|---|---|
protected List<Pattern> |
compilePatternList(Set<String> patterns)
Compiles a set of class-name patterns into equivalent regular expressions.
|
void |
globalConfigChanged(String serviceName,
String version,
String groupName,
String serviceComponent,
int type)
Propagates script configuration changes to the configured
StandardScriptEngineManager. |
void |
organizationConfigChanged(String serviceName,
String version,
String orgName,
String groupName,
String serviceComponent,
int type) |
void |
registerServiceListener()
Registers this configurator with the
ServiceConfigManager to receive updates
when the script configuration changes. |
void |
schemaChanged(String serviceName,
String version) |
protected void |
updateConfig(ScriptConstants.ScriptContext context)
Propagates script global configuration to the script engine manager.
|
@Inject
public ScriptEngineConfigurator(@Named(value="ScriptLogger")
org.slf4j.Logger logger)
ScriptEngineConfiguratorlogger - The logger to log any error and debug messages to.public void registerServiceListener()
ServiceConfigManager to receive updates
when the script configuration changes.IllegalStateException - if the configuration listener cannot be registered.public void schemaChanged(String serviceName, String version)
schemaChanged in interface ServiceListenerpublic void organizationConfigChanged(String serviceName, String version, String orgName, String groupName, String serviceComponent, int type)
organizationConfigChanged in interface ServiceListenerpublic void globalConfigChanged(String serviceName, String version, String groupName, String serviceComponent, int type)
StandardScriptEngineManager.
Ignores all other changes.globalConfigChanged in interface ServiceListenerprotected void updateConfig(ScriptConstants.ScriptContext context)
context - The script context for which the config is updated.protected List<Pattern> compilePatternList(Set<String> patterns)
.*?) in the regular expression. All other characters are escaped. The order of the resulting list
is the iteration order of the set. There is no way to include a literal '*' character in the pattern, but '*' is
not a valid character in a Java class name identifier.patterns - the list of glob-style patterns to translate.Copyright © 2010–2024 Open Identity Platform Community. All rights reserved.