Home > 7.1, arsystem, java > Get License info using the Remedy ARS Java API

Get License info using the Remedy ARS Java API

December 29th, 2008

Using the Remedy ARS Java API we can get all kinds of information about the licenses that are installed on the server. These can be server licenses (ARServer, Fixed, Floating, etc.) or application licenses (Incident Management, Problem Management, etc).

What we first of course do is get a proper ARServerUser, as usual we will create one hardcoded for the example.
ARServerUser context = new ARServerUser("Demo", "", "","192.168.184.128")

Now we use the ARServerUser.getListLicense() method to get a List of LicenseInfo objects:

List<LicenseInfo> licenseInfo= context.getListLicense(null);

What we do now is walk through the List<LicenseInfo> that we got (in licenseInfo) and show some information about it.

for (int i = 0; i < licenseInfo.size(); i++) {
LicenseInfo licInfo = licenseInfo.get(i);
System.out.println(licInfo.getlicType() + " " + licInfo.getNumLicenses() );
}

We show the Type of the license (ie. BMC Incident Management Application, User Floating, etc) and the number of licenses.

If you want to see all the information that we can get back about license information have a look at the LicenseInfo object in the Javadoc Documentation.

You can download the complete source for this example here:arsystemlicenseinfo

This entry is part of the BMC Remedy ARSystem Java api series

7.1, arsystem, java

  1. No comments yet.
  1. No trackbacks yet.