listLMVariables

Lists the variable values for a given licensee, customer, and product combination.

Which variables are returned depends on the input parameters. Specifying only licensee will return the licensee-level defaults, as well as the variable definitions. Specifying only licensee and product will return licensee/product-level defaults. Specifying only licensee and customer will return customer-level values. Specifying licensee, customer and product will return customer/product-level values.

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.
varName String no A variable name pattern to find. This can be either a specific variable name (e.g., "EF_LIMIT") or a wildcard pattern (e.g., "EF_*"). Omitting this argument will return all variables at the given level.
customer String no The company code (not the company name) for the Customer.
product String no The product code (not the product name) for the product.


Return values: A VariableOutputInfo structure:

Field
Type
Description
definitions Array of VariableDef A list of variable definitions. Only filled in when both customer and product are null.
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.
values Array of VariableValue A list of variable values.

VariableDef

Field
Type
Description
defaultValue String The licensee-level default for the variable, if this is a non-list variable.
defaultValueList Array of String A list of licensee-level default values for the variable, if this is a list variable.
externalUse Boolean Whether this is an external-use variable.
isList Boolean Whether this is a list variable.
logOnly Boolean Whether this is a log-only variable, which means it will not be sent down with a license.
name String The variable name.
noInherit Boolean Whether this variable will not be inherited by child customers.
readOnly Boolean Whether this variable can not be overridden by users.
validCombos Array of ValidVarCombo Valid value combinations of this variable with other variables.
validValues Array of String Valid values for this variable.
varId Integer Unused.

ValidVarCombo

Field
Type
Description
name1 String The name of the first variable in the combination. For the listLMVariables() call, this will always be the variable specified in the VariableDef object.
name2 String The name of the second variable in the combination.
value1 String The value of the first variable in the combiation.
value2 String The value of the second variable in the combiation.

VariableValue

Field
Type
Description
isList Boolean Whether this is a list variable.
name String The name of the variable.
value String The variable value, if this is a non-list variable.
valueList Array of String The variable values, if this is a list variable.


Example:

NitroAdminAccessServiceLocator service = new NitroAdminAccessServiceLocator();
NitroAdminAccess server = service.getNitroAdminAccess();
VariableOutputInfo info = server.listLMVariables(sessionid, "smith", "EF_*", "testcust", null);
if (info.getFault()!=null) {
	System.err.println("Error: " + info.getFault().getFaultString());
	return;
}
if (info!=null) {
        if (info.getDefinitions()!=null) {
            for (int i=0; i<info.getDefinitions().length; i++) {
                VariableDef def = info.getDefinitions(i);
                // report on variable definitions
            }
        }
        if (info.getValues()!=null) {
            for (int i=0; i<info.getValues().length; i++) {
                VariableValue val = info.getValues(i);
                // report on variable values
            }
        }
}
Comments