}
/*
* page.setAltMessage(navigateObject.getDescription() + ": Page " +
* currentPageNum + " of " + total);
*/
NavigationBean bean = new NavigationBean();
bean.setNavigateObject(navigateObject);
bean.setCurrentPageItem(page);
bean.setPageDisplay(page.getDataStream(properties));
if (currentPageNum > 1) {
bean.setPreviousPage(printURL(currentPageNum - 1) + properties.print());
} else {
bean.setPreviousPage(printURL(currentPageNum) + properties.print());
}
if (currentPageNum < total) {
bean.setNextPage(printURL(currentPageNum + 1) + properties.print());
} else {
bean.setNextPage(printURL(total) + properties.print());
}
bean.setTotalPages(String.valueOf(total));
bean.setFirstPage(printURL(1) + properties.print());
bean.setLastPage(printURL(total) + properties.print());
bean.setCurrentPageBaseURL(printURL(currentPageNum));
bean.setDescription(navigateObject.getDescription());
bean.setParameterMap(properties);
bean.setDataStreamMap(dataSParameterMap);
log.debug("Finished creating NavigationBean object: collection [" + prefix + "], oid ["
+ oid + "]");
return bean;
}