throws CmdLineActionException {
try {
Validate.notNull(productTypeName, "Must specify productTypeName");
Validate.notNull(currentPageNum, "Must specify currentPageNum");
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 first ProductPage");
}
ProductPage currentPage = new ProductPage();
currentPage.setPageNum(currentPageNum);
currentPage.setPageSize(firstPage.getPageSize());
currentPage.setTotalPages(firstPage.getTotalPages());
ProductPage prevPage = client.getPrevPage(type, currentPage);
if (prevPage == null) {
throw new Exception("FileManager returned null previous ProductPage");
}
printer.println("Page: [num=" + prevPage.getPageNum()
+ ", totalPages=" + prevPage.getTotalPages() + ", pageSize="