All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.script.SCREnvironment
java.lang.Object
|
+----com.ibm.beans.script.SCREnvironment
- public class SCREnvironment
- extends Object
- implements Serializable
The scripting environment class is created
by a Java application programmer to provide an environment
capable of persistently associating Java objects with scripts of
supported scripting languages.
-
SCR_ENVIRONMENT_CHANGED_AFTER_CHECK
- The name of the client request for checking if the script is changed after last check.
-
SCR_ENVIRONMENT_CHANGED_AFTER_GENERATE
- The name of the client request for checking if the script is changed after last generate.
-
SCR_ENVIRONMENT_CHANGED_AFTER_SAVE
- The name of the client request for checking if the script is changed after last save.
-
SCREnvironment()
- Creates a scripting environment.
-
clientRequest(String, Object)
- Processes a client request.
-
deregisterClass(Class)
- Deregisteres a class with the scripting environment.
-
deregisterObject(String)
- Removes the named object from the scripting environment.
-
editScript()
- Edits the script.
-
editScriptNoFrame()
- Edits the script.
-
exportScript(BufferedWriter)
- Exports script data.
-
getComponentDescriptor()
- Gets the scripting component descriptor that is used to create the scripting environment.
-
getPackagingFiles(Vector, Vector)
- Requests the list of files that are to be packaged when this scripting
environment is published.
-
getRTEnvironment(boolean)
- Creates and returns a run-time scripting environment.
-
importScript(BufferedReader)
- Imports script data.
-
initialize(SCRClient)
- Initializes the scripting environment.
-
isEmpty()
-
-
registerClass(Class)
- Registers a class with the scripting environment.
-
registerObject(Class, String)
- Allows the object to be introduced to the scripting environment.
-
renameObject(String, String)
- Renames an object with a given name.
-
stopEditingScript()
- Stops the script editing session and closes the IDE for the scripting environment.
SCR_ENVIRONMENT_CHANGED_AFTER_SAVE
public static final String SCR_ENVIRONMENT_CHANGED_AFTER_SAVE
- The name of the client request for checking if the script is changed after last save.
SCR_ENVIRONMENT_CHANGED_AFTER_GENERATE
public static final String SCR_ENVIRONMENT_CHANGED_AFTER_GENERATE
- The name of the client request for checking if the script is changed after last generate.
SCR_ENVIRONMENT_CHANGED_AFTER_CHECK
public static final String SCR_ENVIRONMENT_CHANGED_AFTER_CHECK
- The name of the client request for checking if the script is changed after last check.
SCREnvironment
public SCREnvironment()
- Creates a scripting environment. This constructor is used for serialization purposes only.
initialize
public void initialize(SCRClient newScrClient)
- Initializes the scripting environment. This function must
be called when the SCREnvironment class is deserialized.
The SCREnvironmentFactory class calls this method during creation.
- Parameters:
- newScrClient - The scripting client.
- See Also:
- SCREnvironmentFactory
getComponentDescriptor
public SCRComponentDescriptor getComponentDescriptor()
- Gets the scripting component descriptor that is used to create the scripting environment.
- Returns:
- The scripting component descriptor that is used to create the scripting environment.
registerObject
public boolean registerObject(Class cls,
String name)
- Allows the object to be introduced to the scripting environment.
The name parameter is assigned to the object. Registering
an object makes the object available to the scripting engine
described by the scripting component descriptor.
- Parameters:
- cls - The Object class being introduced into the scripting environment.
- name - The name to be assigned to the object.
- Returns:
- true if registered successfully; false otherwise.
- See Also:
- SCRComponentDescriptor
deregisterObject
public boolean deregisterObject(String name)
- Removes the named object from the scripting environment.
- Parameters:
- name - The name of the object to be removed.
- Returns:
- true if deregistered successfully; false otherwise.
- See Also:
- registerObject, deregisterObject
renameObject
public boolean renameObject(String oldName,
String newName)
- Renames an object with a given name.
- Parameters:
- oldName - The name of the object to be renamed.
- newName - The new name of the object.
- Returns:
- true if the object is renamed; false otherwise.
registerClass
public boolean registerClass(Class cls)
- Registers a class with the scripting environment.
- Parameters:
- cls - The class to be registered.
- Returns:
- true if registered successfully; false otherwise.
- See Also:
- registerObject
deregisterClass
public boolean deregisterClass(Class cls)
- Deregisteres a class with the scripting environment.
- Parameters:
- cls - Class to be deregistered.
- Returns:
- true if deregistered successfully; false otherwise.
- See Also:
- deregisterObject
editScript
public boolean editScript()
- Edits the script. Invokes the IDE for the scripting environment.
The IDE is created in a separate window.
- Returns:
- true if successful; false if an IDE is not supported.
editScriptNoFrame
public Component editScriptNoFrame()
- Edits the script. Invokes the IDE for the scripting environment.
The IDE will not be created in a separate window.
- Returns:
- null if an IDE is not supported or the IDE was already created
in a separate window using the editScript() method. This method does not
determine if an IDE is supported.
If the return value is non-null, then the user can add the component into
a java.awt.Container object.
stopEditingScript
public boolean stopEditingScript()
- Stops the script editing session and closes the IDE for the scripting environment.
- Returns:
- true if successful; false if an IDE is not supported.
isEmpty
public boolean isEmpty()
getRTEnvironment
public SCRRTEnvironment getRTEnvironment(boolean withDebug)
- Creates and returns a run-time scripting environment.
- Parameters:
- withDebug - Indicates whether the run-time environment is
created with debugging information.
- Returns:
- Run-time scripting environment.
exportScript
public void exportScript(BufferedWriter out)
- Exports script data.
- Parameters:
- out - The write buffer.
importScript
public void importScript(BufferedReader in)
- Imports script data.
- Parameters:
- in - The read buffer.
getPackagingFiles
public void getPackagingFiles(Vector allNames,
Vector byteArrays)
- Requests the list of files that are to be packaged when this scripting
environment is published.
- Parameters:
- allNames - The list of class names of the public classes created
by the scripting engine.
- byteArrays - The list of byte arrays representing the classes
created by the scripting engine.
clientRequest
public boolean clientRequest(String request_name,
Object request_para)
- Processes a client request. The component implementation
need to decide it handles what kind of client requests by
override this method. This method always returns false.
- Parameters:
- request_name - The client request name.
- request_para - The client request parameter.
- Returns:
- true, if successful; false, if failed.
All Packages Class Hierarchy This Package Previous Next Index