getLMUserInfo

Gets information about a user's licenses and user-variables.

NOTE: All timestamp return values are given as the number of milliseconds since January 1, 1970 (a standard Java time value).

Parameters:

Field
Type
Required Description
sessionid String yes The sessionid returned by loginLMLicensee()
licensee String yes The company code (not the company name) for the Licensee.
email String yes
The user's email address.


Return values: A UserInfoData structure:

Field
Type
Description
fault FaultData If an error has occurred on the server, this will contain information about the error. This field will be null if no error occurred.
history Array of UserHistory A list of the products that the user has ever gotten licenses for, one row per product.
licenses
Array of UserLicense
A list of licenses the user currently has (some may be expired), one row per license.
userInfo
UserInfo Basic information about the user.
vars
Array of UserVarInfo
A list of user variable values, one row per variable.  This does not contain variable values defined at the licensee, product or customer level; to retrieve those, use listLMVariables.

UserHistory

Field
Type
Description
firstLicense long The timestamp when the user first requested a license for the product.
lastLicense long The timestamp when the user last requested, renewed or released a license for the product.
productCode String The product code (not the product name) for the product

UserLicense

Field
Type
Description
companyCode String The company code (not the company name) for the Customer.  Null if the license was a demo license.
expires long The timestamp when the license will (or did) expire.
locked long The timestamp when the license was requested.
lockType
LicenseType
The license type.
poolName String
The name of the pool for the license.  Null if the license was a demo license.
productCode
String
The product code (not the product name) for the product
usageCounter
int
The current usage counter for the license (usually 0).

UserInfo

Field
Type
Description
confirmed Boolean True if the user has confirmed their registration, false otherwise.
email String The user's email address.
firstName String The user's first name.
lastName String
The user's last name.

UserVarInfo

Field
Type
Description
lastSet long The timestamp when the user last set the variable.
name String The variable name.
productCode String The product code (not the product name) for the product  Null if the variable was set for all products (only possible for system-set variables).
value String The variable value.

Example:

NitroAdminAccessServiceLocator service = new NitroAdminAccessServiceLocator();
NitroAdminAccess server = service.getNitroAdminAccess();
UserInfoData data = server.getLMUserInfo(sessionid, "smith", "fredsmith@jones.com");
if (list.getFault()!=null) {
System.err.println("Error: " + data.getFault().getFaultString());
return;
}
if (data!=null) {
System.out.println("User data for " + data.getUserInfo().getEmail());
if (data.getLicenses()!=null) {
UserLicense rec;
for (int i=0; i<data.getLicenses().length; i++) {
rec = data.getLicenses(i);
// report on contents of user license record
}
}
if (data.getVars()!=null) {
UserVarInfo rec;
for (int i=0; i<data.getVars().length; i++) {
rec = data.getVars(i);
// report on contents of user variable record
}
}
if (data.getHistory()!=null) {
UserHistory rec;
for (int i=0; i<data.getHistory().length; i++) {
rec = data.getHistory(i);
// report on contents of user history
}
}
}
Comments