Package org.sakaiproject.profile2.logic
Interface ProfileSearchLogic
-
public interface ProfileSearchLogicAn interface for dealing with profile searches.- Author:
- Steve Swinsburg (steve.swinsburg@gmail.com), Daniel Robinson (d.b.robinson@lancaster.ac.uk)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSearchTermToHistory(String userUuid, ProfileSearchTerm searchTerm)Adds the given profile search term to a user's search history.voidclearSearchHistory(String userUuid)Clears the search history for the user with the given UUID.List<Person>findUsersByInterest(String search, boolean includeConnections, String worksiteId)Find all users that match the search string in any of the relevant SakaiPerson fieldsList<Person>findUsersByNameOrEmail(String search, boolean includeConnections, String worksiteId)Find all users that match the search string in either name or email.ProfileSearchTermgetLastSearchTerm(String userUuid)Retrieves the last search term made by the user with the given UUID.List<ProfileSearchTerm>getSearchHistory(String userUuid)Retrieves the search history for the user with the given UUID.
-
-
-
Method Detail
-
findUsersByNameOrEmail
List<Person> findUsersByNameOrEmail(String search, boolean includeConnections, String worksiteId)
Find all users that match the search string in either name or email.Searches SakaiPerson, UserDirectorySerice internal users as well as external users if your provider supports SearchExternalUsersUDP.
This list is automatically cleaned for non-existent users by way of UserDirectoryService.getUsers.
- Parameters:
search- string to search forincludeConnections- should connections be returned in resultsworksiteId- optional parameter to limit search to a single worksite. Specifynullto search all users.- Returns:
- List Persons
-
findUsersByInterest
List<Person> findUsersByInterest(String search, boolean includeConnections, String worksiteId)
Find all users that match the search string in any of the relevant SakaiPerson fieldsThis list is automatically cleaned for non-existent users by way of UserDirectoryService.getUsers.
- Parameters:
search- string to search forincludeConnections- should connections be returned in resultsworksiteId- optional parameter to limit search to a single worksite. Specifynullto search all users.- Returns:
- List Persons
-
getLastSearchTerm
ProfileSearchTerm getLastSearchTerm(String userUuid)
Retrieves the last search term made by the user with the given UUID.- Parameters:
userUuid- the UUID of the user to query by.- Returns:
- the last search term made by the user with the given
UUID. Returns
nullif no search term is found.
-
getSearchHistory
List<ProfileSearchTerm> getSearchHistory(String userUuid)
Retrieves the search history for the user with the given UUID.- Parameters:
userUuid- the UUID of the user to query by.- Returns:
- the search history for the user with the given UUID. Returns
nullif no search history is found.
-
addSearchTermToHistory
void addSearchTermToHistory(String userUuid, ProfileSearchTerm searchTerm)
Adds the given profile search term to a user's search history.- Parameters:
userUuid- the user whose history we're adding to.searchTerm- the search term to add.
-
clearSearchHistory
void clearSearchHistory(String userUuid)
Clears the search history for the user with the given UUID.- Parameters:
userUuid- the UUID of the user to clear history for.
-
-