*
* @throws SearchException the search exception
*/
private void doSave() throws SearchException {
LOG.info("Event: Performing Save");
SearchCriteria criteria = this.getSearchCriteria();
//if(criteria.getSavedSearchList().size()
// >= SearchConfig.getConfiguredInstance().getMaxSavedSearches()) {
// throw new SearchException("catalog.search.error.maxSavedSearchesReached");
//}
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Search Criteria Object being saved = \n{0}", criteria.toString());
}
criteria = new SearchCriteria(criteria.toDom());
criteria.getSearchFilterPageCursor().setCurrentPage(1);
SavedSearchCriteria savedSearchCriteria =
new SavedSearchCriteria(this.getSearchCriteria().getSavedSearchName(),
criteria, this.extractRequestContext().getUser());
ISearchSaveRepository saveRpstry =
SearchSaveRpstryFactory.getSearchSaveRepository();
saveRpstry.save(savedSearchCriteria);
criteria.setSavedSearchName(null);
}