|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.user.profile.ProfileSearchQuery
public class ProfileSearchQuery
Contains the necessary information required to perform a user search.
| Field Summary | |
|---|---|
static int |
MAXIMUM_NUMBER_OF_WILDCARDS
|
| Constructor Summary | |
|---|---|
ProfileSearchQuery(String keywords)
Creates a new query that does not contain any filters and searches all available user fields. |
|
ProfileSearchQuery(String keywords,
String prefix,
List<ProfileSearchFilter> filters,
String tag,
boolean searchUsername,
boolean searchName,
boolean searchNamePhonetically,
boolean searchEmail,
boolean searchProfile,
boolean admin)
Creates a new query, results sorted by relevance. |
|
ProfileSearchQuery(String keywords,
String prefix,
List<ProfileSearchFilter> filters,
String tag,
org.apache.lucene.search.Sort sort,
boolean searchUsername,
boolean searchName,
boolean searchNamePhonetically,
boolean searchEmail,
boolean searchProfile,
boolean admin,
Community community,
boolean returnDisabledUsers,
boolean returnExternalUsers,
boolean returnOnlineUsers)
Creates a new query, results sorted by the given sort. |
|
| Method Summary | |
|---|---|
Community |
getCommunity()
Gets the community used for this query. |
List<ProfileSearchFilter> |
getFilters()
Gets a list of ProfileSearchFilters used to filter user results for this query. |
String |
getInternalQuery()
Get the internal query used by the search mechanism. |
String |
getKeywords()
Gets the keywords for the user search. |
long |
getMaxCreationDate()
Get the maximum document creation date for this query. |
long |
getMinCreationDate()
Get the minimum document creation date for this query. |
String |
getPrefix()
Get a single-character prefix used to filter names, such as "A" which would return all users with first names, last names, and usernames beginning in "A". |
int |
getRange()
The number of returned user results. |
Collection<Long> |
getReturnedUserIDs()
A collection of userids returned by a search using this query. |
org.apache.lucene.search.Sort |
getSort()
Gets the sort used for this query. |
int |
getStart()
The starting index of returned user results, with respect to total hits. |
String |
getTag()
Get the tag for this query. |
boolean |
isAdmin()
Return True if the user performing the search is a system administrator, false otherwise. |
boolean |
isEvilQuery()
Check whether or not this query is dangerous. |
boolean |
isFiltered()
Check whether or not this query has filters with non-null values. |
boolean |
isReturnCountOnly()
If count only, don't populate userIDs or users in the returned ProfileSearchResults object. |
boolean |
isReturnDisabledUsers()
Return True if the search returns disabled users. |
boolean |
isReturnExternalUsers()
Return True if the search returns external (Cloud) users. |
boolean |
isReturnOnlineUsers()
Return True if the search returns online users only. |
boolean |
isReturnProfiles()
Return UserProfile objects in the ProfileSearchResults, instead of other, lighter-weight user implementations. |
boolean |
isReturnUserIDsOnly()
If userIDs only, don't populate users in the returned ProfileSearchResults object. |
boolean |
isSearchEmail()
Returns true if the user's email field is to be searched, false otherwise. |
boolean |
isSearchName()
Returns true if the user's name field is to be searched, false otherwise. |
boolean |
isSearchNamePhonetically()
Returns true if the user's name field is to be searched phonetically, false otherwise. |
boolean |
isSearchProfile()
Returns true if the user's profile field values are to be searched, false otherwise. |
boolean |
isSearchUsername()
Returns true if the user's username field is to be searched, false otherwise. |
void |
setAdmin(boolean admin)
True if the user performing the search is a system administrator, false otherwise. |
void |
setCommunity(Community community)
Sets the community the user wants to find an expert in. |
void |
setFilters(List<ProfileSearchFilter> filters)
Sets a list of ProfileSearchFilters used to filter user results for this query. |
void |
setInternalQuery(String internalQuery)
|
void |
setKeywords(String keywords)
Sets the keywords for the user search. |
void |
setMaxCreationDate(long maxCreationDate)
Set the maximum document creation date for this query. |
void |
setMinCreationDate(long minCreationDate)
Set the minimum document creation date for this query. |
void |
setPrefix(String prefix)
Set a single-character prefix used to filter names, such as "A" which would return all users with first names, last names, and usernames beginning in "A". |
void |
setRange(int range)
The number of returned user results. |
void |
setReturnCountOnly(boolean returnCountOnly)
If count only, don't populate userIDs or users in the returned ProfileSearchResults object. |
void |
setReturnDisabledUsers(boolean returnDisabledUsers)
|
void |
setReturnedUserIDs(Collection<Long> returnedUserIDs)
Provide a collection that will be used to populate the userIDs returned by a search. |
void |
setReturnExternalUsers(boolean returnExternalUsers)
|
void |
setReturnOnlineUsers(boolean returnOnlineUsers)
|
void |
setReturnProfiles(boolean returnProfiles)
Return UserProfile objects in the ProfileSearchResults, instead of other, lighter-weight user implementations. |
void |
setReturnUserIDsOnly(boolean returnUserIDsOnly)
If userIDs only, don't populate users in the returned ProfileSearchResults object. |
void |
setSearchEmail(boolean searchEmail)
True if the user's email field is to be searched, false otherwise. |
void |
setSearchName(boolean searchName)
True if the user's name field is to be searched, false otherwise. |
void |
setSearchNamePhonetically(boolean searchNamePhonetically)
True if the user's name field is to be searched phonetically, false otherwise. |
void |
setSearchProfile(boolean searchProfile)
True if the user's profile field values are to be searched, false otherwise. |
void |
setSearchUsername(boolean searchUsername)
True if the user's username field is to be searched, false otherwise. |
void |
setSort(org.apache.lucene.search.Sort sort)
Sets the Sort used for this query. |
void |
setStart(int start)
The starting index of returned user results, with respect to total hits. |
void |
setTag(String tag)
Sets the tag for this query. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAXIMUM_NUMBER_OF_WILDCARDS
| Constructor Detail |
|---|
public ProfileSearchQuery(String keywords)
keywords - the keywords to search
public ProfileSearchQuery(String keywords,
String prefix,
List<ProfileSearchFilter> filters,
String tag,
boolean searchUsername,
boolean searchName,
boolean searchNamePhonetically,
boolean searchEmail,
boolean searchProfile,
boolean admin)
keywords - the keywords to searchfilters - a list of ProfileSearchFilterssearchUsername - true to search the user's username field, false otherwise.searchName - true to search the user's name field, false otherwise. The user's name field
will not be searchable if User.isNameVisible() is false.searchEmail - true to search the user's email field, false otherwise. The user's email field
will not be searchable if User.isEmailVisible() is false.searchProfile - true to search the user's profile fields, false otherwise. A profile field will
not be searchable if ProfileField.isVisible() is false.admin - true to search the user's name and email fields, whether or not they are hidden. The default value
for this field is false, and this field should only be set if the user performing the search is a system administrator.
public ProfileSearchQuery(String keywords,
String prefix,
List<ProfileSearchFilter> filters,
String tag,
org.apache.lucene.search.Sort sort,
boolean searchUsername,
boolean searchName,
boolean searchNamePhonetically,
boolean searchEmail,
boolean searchProfile,
boolean admin,
Community community,
boolean returnDisabledUsers,
boolean returnExternalUsers,
boolean returnOnlineUsers)
keywords - the keywords to searchfilters - a list of ProfileSearchFilterssort - a field to sort the results bysearchUsername - true to search the user's username field, false otherwise.searchName - true to search the user's name field, false otherwise. The user's name field
will not be searchable if User.isNameVisible() is false.searchEmail - true to search the user's email field, false otherwise. The user's email field
will not be searchable if User.isEmailVisible() is false.searchProfile - true to search the user's profile fields, false otherwise. A profile field will
not be searchable if ProfileField.isVisible() is false.admin - true to search the user's name and email fields, whether or not they are hidden. The default value
for this field is false, and this field should only be set if the user performing the search is a system administrator.community - a specific community that the user wants to find experts inreturnDisabledUsers - | Method Detail |
|---|
public String getKeywords()
public void setKeywords(String keywords)
keywords - the keywords for the user searchpublic String getPrefix()
public void setPrefix(String prefix)
prefix - a single character String.public List<ProfileSearchFilter> getFilters()
ProfileSearchFilters used to filter user results for this query.
ProfileSearchFilters used to filter user results for this query.public void setFilters(List<ProfileSearchFilter> filters)
ProfileSearchFilters used to filter user results for this query.
filters - a list of ProfileSearchFilters used to filter user results for this query.public org.apache.lucene.search.Sort getSort()
Sort.RELEVANCE.
public void setSort(org.apache.lucene.search.Sort sort)
Sort used for this query.
sort - sorting strategy for this query.public long getMinCreationDate()
public void setMinCreationDate(long minCreationDate)
public long getMaxCreationDate()
public void setMaxCreationDate(long maxCreationDate)
public String getTag()
public void setTag(String tag)
tag - public Community getCommunity()
public void setCommunity(Community community)
community - the community the user wants to find an expert in.public boolean isSearchUsername()
public void setSearchUsername(boolean searchUsername)
searchUsername - true if the user's username field is to be searched, false otherwise.public boolean isSearchName()
User.isNameVisible() is false.
public void setSearchName(boolean searchName)
User.isNameVisible() is false.
searchName - true if the user's name field is to be searched, false otherwise.public boolean isSearchNamePhonetically()
User.isNameVisible() is false.
public void setSearchNamePhonetically(boolean searchNamePhonetically)
User.isNameVisible()
is false.
searchNamePhonetically - true if the user's name field is to be searched phonetically, false
otherwise.public boolean isSearchEmail()
User.isEmailVisible() is false.
public void setSearchEmail(boolean searchEmail)
User.isEmailVisible() is false.
searchEmail - true if the user's email field is to be searched, false otherwise.public boolean isSearchProfile()
ProfileField.isVisible() is false.
public void setSearchProfile(boolean searchProfile)
ProfileField.isVisible() is false.
searchProfile - true if the user's profile field values are to be searched, false otherwise.public boolean isAdmin()
public void setAdmin(boolean admin)
admin - true if the user performing the search is a system administrator, false otherwise.public boolean isReturnDisabledUsers()
public void setReturnDisabledUsers(boolean returnDisabledUsers)
public boolean isReturnExternalUsers()
public void setReturnExternalUsers(boolean returnExternalUsers)
public boolean isReturnOnlineUsers()
public void setReturnOnlineUsers(boolean returnOnlineUsers)
public String getInternalQuery()
public void setInternalQuery(String internalQuery)
public int getStart()
public void setStart(int start)
public int getRange()
public void setRange(int range)
public boolean isReturnProfiles()
public void setReturnProfiles(boolean returnProfiles)
public boolean isReturnCountOnly()
public void setReturnCountOnly(boolean returnCountOnly)
public boolean isReturnUserIDsOnly()
public void setReturnUserIDsOnly(boolean returnUserIDsOnly)
public Collection<Long> getReturnedUserIDs()
public void setReturnedUserIDs(Collection<Long> returnedUserIDs)
returnedUserIDs - public boolean isFiltered()
public boolean isEvilQuery()
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||