XmlRpcFileManagerClient client = getClient();
ProductType type = client.getProductTypeByName(productTypeName);
if (type == null) {
throw new Exception("FileManager returned null ProductType");
}
ProductPage firstPage = client.getFirstPage(type);
if (firstPage == null) {
throw new Exception("FileManager returned null product page");
}
printer.println("Page: [num=" + firstPage.getPageNum()
+ ", totalPages=" + firstPage.getTotalPages() + ", pageSize="
+ firstPage.getPageSize() + "]");
printer.println("Products:");
if (firstPage.getPageProducts() == null) {
throw new Exception("Page Products is null");
}
for (Product p : firstPage.getPageProducts()) {
printer.println("Product: [id=" + p.getProductId() + ",name="
+ p.getProductName() + ",type="
+ p.getProductType().getName() + ",structure="
+ p.getProductStructure() + ", transferStatus="
+ p.getTransferStatus() + "]");