@SuppressWarnings("unchecked")
public PageList<ResourceConfigurationUpdate> findResourceConfigurationUpdates(Subject subject, Integer resourceId,
Long beginDate, Long endDate, boolean suppressOldest, PageControl pc) {
if (resourceId == null && !authorizationManager.isInventoryManager(subject)) {
throw new PermissionException("User[" + subject.getName() + "] Must be an inventory manager to query "
+ "without a resource id.");
} else if (!authorizationManager.hasResourcePermission(subject, Permission.CONFIGURE_READ, resourceId)) {
throw new PermissionException("User[" + subject.getName()
+ "] does not have permission to view configuration history for resource[id=" + resourceId + "]");
}
// TODO (ips, 04/01/10): Our id's are not guaranteed to be sequential, because our sequences are configured to
// pre-create and cache blocks of 10 sequence id's, so it may be better to order by