associateLMProductToPool

Associate a new product with an existing customer pool, or update parameters for a product already in the pool.

A product to be associated with a pool must already be associated with a pool in the parent customer, or an error will occur.

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.
customer String yes The company code (not the company name) for the Customer.
pool String yes The name of the customer's pool. If the pool does not have a name, then passing "Pool ##" where ## is the pool number will also work.
productData PoolProductInfo yes The product and its parameters.

PoolProductInfo

(Note: The only required field in this structure is code.)

Field
Type
Description
checkoutCount Integer The maximum number of check-out licenses that may be in use for this product at one time. Set to 0 for no restriction. Defaults to 0.
checkoutLength Integer The maximum number of days that a check-out licenses may be gotten for this product. Set to 0 for no restriction. Set to -1 to block check-out licenses from being used. Defaults to 0.
code String The product code (not the product name) for the product.
libraryData Array of String A list of library codes to be assigned to the customer initially for this product.  Currently ignored for this call.
licenseLimit Integer The maximum number of licenses (of any kind) that may be in use for this product at one time. Set to 0 for no restriction. Defaults to 0.
validUntil Long An optional "early" expiration date for the licenses in the pool, which can be sooner than the licenses' actual expiration. The date is given as the number of milliseconds since January 1, 1970 (a standard Java time value).
variableData Array of VarValueInfo A list of initial customer/product-level variable values to set.  Currently ignored for this call.

Return values: A StatusData 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.
status Integer 0

Example:

NitroAdminAccessServiceLocator service = new NitroAdminAccessServiceLocator();
NitroAdminAccess server = service.getNitroAdminAccess();

StatusData ret;

PoolProductInfo p1 = new PoolProductInfo();
p1.setCode("myProduct");

ret = server.associateLMProductToPool(sessionid, "smith", "cust1", "my first pool", p1);
if (ret.getFault()!=null) {
	System.err.println("Error: " + ret.getFault().getFaultString());
	return;
}

PoolProductInfo p2 = new PoolProductInfo();
p2.setCode("yourProduct");
p2.setCheckoutCount(5);
p2.setCheckoutLength(14);
p2.setLicenseLimit(10);
p2.setValidUntil(1254369600000L); // 10/01/2009

ret = server.associateLMProductToPool(sessionid, "testco", "cust1", "my first pool", p2);
if (ret.getFault()!=null) {
	System.err.println("Error: " + ret.getFault().getFaultString());
	return;
}
Comments