org.rhq.enterprise.server.search
Interface SavedSearchManagerRemote


public interface SavedSearchManagerRemote

The remote interface to the SavedSearchManager.


Method Summary
 int createSavedSearch(Subject subject, SavedSearch savedSearch)
          Persisted a new SavedSearch with the given primary key
 void deleteSavedSearch(Subject subject, int savedSearchId)
          Deletes the SavedSearch with the given primary key
 PageList<SavedSearch> findSavedSearchesByCriteria(Subject subject, SavedSearchCriteria criteria)
          Returns the PageList of SavedSearch entities that match the criteria filters that are visible to the user
 SavedSearch getSavedSearchById(Subject subject, int savedSearchId)
          Returns the SavedSearch with the given primary key
 boolean updateSavedSearch(Subject subject, SavedSearch savedSearch)
          Saves all changes to the passed SavedSearch database, correlating it to the record already persisted with the same primary key
 

Method Detail

createSavedSearch

int createSavedSearch(Subject subject,
                      SavedSearch savedSearch)
Persisted a new SavedSearch with the given primary key

Parameters:
subject - the logged in user requesting the SavedSearch deletion
savedSearch - the primary key of the SavedSearch to be deleted
Throws:
org.rhq.enterprise.server.authz.PermissionException - if the user is not authorized to create the SavedSearch. Only inventory managers can create global saved searches. Regular users can only create SavedSearches against their own accounts.

updateSavedSearch

boolean updateSavedSearch(Subject subject,
                          SavedSearch savedSearch)
Saves all changes to the passed SavedSearch database, correlating it to the record already persisted with the same primary key

Parameters:
subject - the logged in user requesting the SavedSearch persisted modification
savedSearch - the SavedSearch which will have its modifications persisted .
Returns:
whether or not the SavedSearch had any edits that needed to be persisted
Throws:
org.rhq.enterprise.server.authz.PermissionException - if the user is not authorized to modify the SavedSearch. Only inventory managers can update global saved searches. Regular users can only update SavedSearches from their own accounts.

deleteSavedSearch

void deleteSavedSearch(Subject subject,
                       int savedSearchId)
Deletes the SavedSearch with the given primary key

Parameters:
subject - the logged in user requesting the SavedSearch deletion
savedSearchId - the primary key of the SavedSearch to be deleted
Throws:
org.rhq.enterprise.server.authz.PermissionException - if the user is not authorized to delete the SavedSearch. Only inventory managers can delete global saved searches. Regular users can only delete SavedSearches from their own accounts.

getSavedSearchById

SavedSearch getSavedSearchById(Subject subject,
                               int savedSearchId)
Returns the SavedSearch with the given primary key

Parameters:
subject - the logged in user requesting the SavedSearch to be loaded
savedSearchId - the primary key of the SavedSearch to be loaded
Returns:
the SavedSearch or null if it wasn't found
Throws:
org.rhq.enterprise.server.authz.PermissionException - if the user is not authorized to view the SavedSearch. Regular users can only view SavedSearches from their own accounts.

findSavedSearchesByCriteria

PageList<SavedSearch> findSavedSearchesByCriteria(Subject subject,
                                                  SavedSearchCriteria criteria)
Returns the PageList of SavedSearch entities that match the criteria filters that are visible to the user

Parameters:
subject - the logged in user requesting the PageList of SavedSearch to be returned
criteria - the SavedSearchCriteria object that will filter the returned results
Returns:
the PageList of SavedSearch entities that match the criteria filters, an empty list will be returned if no results were found or none matches the given filters


Copyright © 2005-2011 Red Hat, Inc.. All Rights Reserved.