deletePublicObject function

To delete a public object that is stored in z/OSMF core, call the deletePublicObject function. After you delete a public object, it is not retrievable through the retrievePublicObject function because the object is no longer stored in z/OSMF core.

Invoking the function

To call the deletePublicObject function, use the syntax shown in Figure 1.

Figure 1. Syntax to use to call the deletePublicObject function
win.global.zosmfExternalTools.deletePublicObject(handle,param);
where,
handle
Handle used when the object was created.
param
JSON object array that contains the name and value for each parameter that z/OSMF core will pass to the object’s destroy() method. Specifying parameters is optional. The syntax to use follows:
  
{parm1: value1, parm2: value2, parm3: value3}
  
When your plug-in calls the deletePublicObject function, z/OSMF core:
  1. Uses the handle to retrieve the public object.
  2. Cleans up the public object.
  3. Calls the destroy() method if the method is defined in the object. The destroy() method is used to further clean up the object.
  4. Passes any parameters to the destroy() method.
The public object is also deleted when a user:
  • Logs out of z/OSMF.
  • Clicks the X icon to close the z/OSMF tab that contains your task.
  • Closes the browser tab or window.
  • Changes the URL in the browser and redirects away from z/OSMF.

Example

Figure 2. Sample code for the deletePublicObject function
win.global.zosmfExternalTools.deletePublicObject("utilGlobal");