Migrating from Host Services API to Workbench APIs
Starting with the July 2019 19.5.1 release of Workbench for Eclipse, the Host Services API has been replaced by the new Workbench API and Workbench for Eclipse API.
Plug-ins currently using the Host Services API will continue to work in Workbench for Eclipse; however, the Host Services API will no longer be enhanced and will be removed in a future version of Workbench for Eclipse. We recommend modifying your custom plug-ins to use the Workbench API, removing any dependencies on the deprecated Host Services API.
The following is an summary of the differences between the Host Services API and the Workbench APIs, with descriptions of how to modify your code to work with the new Workbench APIs.
|Change||Impact on existing Host Services API plug-ins|
|Plug-in and package names were changed from com.compuware.api.hostservices.* to com.compuware.api.topaz.*||Update plug-in dependencies to reference new com.compuware.api.topaz and com.compuware.api.topaz.eclipse plug-ins and packages.|
Removed restrictions requiring that the Workbench API is used within a Workbench for Eclipse client
No impact on existing plug-ins. Users can now write plug-ins and Java applications that can run outside of a Workbench for Eclipse client.
|New HostManager class to retrieve instances of IHostManager|
Replace uses of HostServicesAPI.getInstance().getHostManager() with HostManager.getInstance(). This class is only available in Workbench for Eclipse client plug-ins.
New HostFactory class to create IZOSHost instances outside of Workbench for Eclipse client
No impact on existing plug-ins. This new HostFactory class is available to create IZOSHost instances when users want to write plug-ins or Java applications that do not run in a Workbench for Eclipse client. This class is not intended to be used within Workbench for Eclipse client plug-ins.
New ZOSUIUserCredentialsManager to connect and retrieve Workbench for Eclipse UI user credentials
Replace uses of IHost.connectUIUser(), IHost.hasUIUserCredentials(), and IHost.getUIUserCredentials() with corresponding methods in ZOSUIUserCredentialsManager. This class is only available in Workbench for Eclipse client plug-ins.
|Removed IHostServicesAPIListener||The implementation for the new Workbench APIs are now included with the API plug-ins, so service listeners are no longer applicable. Remove all uses of IHostServicesAPIListener (the implementation will always be available).|
|Removed VERSION constant from IHostManager||This VERSION constant was used internally by BMC for making sure a IHostManager implementation was supported by the Host Services API. Since the implementation is now included as part of the API, this constant is no longer needed. Remove any use of this constant.|
|Removed IHostServicesAPILogger||It is now the responsibility of Workbench API users to log messages using whatever logging techniques they desire. Internal classes will still create logging messages within the compuware.log. Replace all uses of the IHostServicesAPILogger with the logging mechanism of your choice.|