Scripts in RHQ can be stored in various locations or maybe not even in the filesystem. Implementations of this interface can be used to provide the contents of the scripts based on URIs.
Implementations of this interface can be located using the {@link ScriptSourceProviderFactory}if they are registered in META-INF/services.
Note that instances of this class can be created and called in an access control context with limited privileges. If you need to make safe calls that require privileges not granted to a script run in the RHQ server (by default this is determined by the {@code org.rhq.bindings.StandardScriptPermissions} class), make sure to call such actions withelevated permissions through {@link java.security.AccessController#doPrivileged(java.security.PrivilegedExceptionAction)} or any of itsderivatives.
For example JNDI look-ups are not allowed by default for the scripts, so if your provider needs to perform some JNDI lookups to locate the script to include, you need to wrap any code that does a JNDI look-up as above.
@author Lukas Krejci