Class ExternalUserSearchService
java.lang.Object
fr.paris.lutece.plugins.wiki.service.user.ExternalUserSearchService
Service for searching external users via the MyLutece user provider
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValues(List<String> listAttributeNames) Get the distinct combinations of values the given attributes take in the user directory.fr.paris.lutece.plugins.mylutece.service.search.MyLuteceSearchUsergetUserByProviderUserId(String strProviderUserId) Get a user by provider user IDList<fr.paris.lutece.plugins.mylutece.service.search.MyLuteceSearchUser>getUsersByProviderUserIds(List<String> listProviderUserIds) Get several users by provider user IDs, in a single provider callbooleanCheck if external user search is availableList<fr.paris.lutece.plugins.mylutece.service.search.MyLuteceSearchUser>searchUsers(String strLastName, String strGivenName, String strEmail) Search for users matching the given criteriaList<fr.paris.lutece.plugins.mylutece.service.search.MyLuteceSearchUser>searchUsers(String strLastName, String strGivenName, String strEmail, fr.paris.lutece.util.ReferenceList listProviderAttributes) Search for users matching the given criteria including additional attributes.
-
Method Details
-
searchUsers
public List<fr.paris.lutece.plugins.mylutece.service.search.MyLuteceSearchUser> searchUsers(String strLastName, String strGivenName, String strEmail) Search for users matching the given criteria- Parameters:
strLastName- the last name (can be null or empty)strGivenName- the given name (can be null or empty)strEmail- the email (can be null or empty)- Returns:
- the list of matching users
-
searchUsers
public List<fr.paris.lutece.plugins.mylutece.service.search.MyLuteceSearchUser> searchUsers(String strLastName, String strGivenName, String strEmail, fr.paris.lutece.util.ReferenceList listProviderAttributes) Search for users matching the given criteria including additional attributes. Null criteria are passed to the provider as empty strings: some providers, LDAP among them, reject null.- Parameters:
strLastName- the last name (can be null or empty)strGivenName- the given name (can be null or empty)strEmail- the email (can be null or empty)listProviderAttributes- additional provider attributes to search by (can be null)- Returns:
- the list of matching users
-
isAvailable
public boolean isAvailable()Check if external user search is available- Returns:
- true if a user provider is configured, false otherwise
-
getUserByProviderUserId
public fr.paris.lutece.plugins.mylutece.service.search.MyLuteceSearchUser getUserByProviderUserId(String strProviderUserId) Get a user by provider user ID- Parameters:
strProviderUserId- the provider user ID- Returns:
- the user, or null if not found
-
getAttributeValues
Get the distinct combinations of values the given attributes take in the user directory. Providers unable to enumerate them return an empty list, in which case the attributes simply get no suggestion.- Parameters:
listAttributeNames- the provider attribute names to enumerate together- Returns:
- the distinct combinations, empty when unavailable
-
getUsersByProviderUserIds
public List<fr.paris.lutece.plugins.mylutece.service.search.MyLuteceSearchUser> getUsersByProviderUserIds(List<String> listProviderUserIds) Get several users by provider user IDs, in a single provider call- Parameters:
listProviderUserIds- the provider user IDs- Returns:
- the users found, empty when none matches or the service is unavailable
-