public interface ScriptEnvironment
This interface is the top level of the Java API that allows Java code called from a Script object in a Composition to interact directly with various aspects of the environment of the playing Composition. All other objects in the API can be accessed (directly or indirectly) through this top level interface.
This API can be made accessible to the Java code by the calling Script
object in the Composition through the JavaScript
$context.createJavaEnvironment()
call. The calling Script
should call that function, which returns a Java object that implements
this API, and arrange to pass that as a parameter to the called Java code.
(Note that the call returns a Java object that is only usable by Java, and
is not designed to be called by JavaScript.)
Modifier and Type | Method and Description |
---|---|
Context |
getContext()
Returns the singleton
Context
object, an object that provides access to components of, and the
state of, the current Composition. |
CustomProperties |
getCustomProperties()
Returns the singleton
CustomProperties
object, an object that provides access to all Custom Properties in the
current Composition. |
GlobalProperties |
getGlobalProperties()
Returns the singleton
GlobalProperties
object, an object that provides access to all Global Properties
in the Repository. |
SystemProperties |
getSystemProperties()
Returns the singleton
SystemProperties
object, an object that provides access to all System Properties in the
current Composition. |
Context getContext() throws ScriptEnvironmentException
Context
object, an object that provides access to components of, and the
state of, the current Composition.Context
objectScriptEnvironmentException
GlobalProperties getGlobalProperties() throws ScriptEnvironmentException
GlobalProperties
object, an object that provides access to all Global Properties
in the Repository.GlobalProperties
objectScriptEnvironmentException
CustomProperties getCustomProperties() throws ScriptEnvironmentException
CustomProperties
object, an object that provides access to all Custom Properties in the
current Composition.CustomProperties
objectScriptEnvironmentException
SystemProperties getSystemProperties() throws ScriptEnvironmentException
SystemProperties
object, an object that provides access to all System Properties in the
current Composition.SystemProperties
objectScriptEnvironmentException