|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.ProfileSearchQuery
public class ProfileSearchQuery
Contains the necessary information required to perform a user search.
| Constructor Summary | |
|---|---|
ProfileSearchQuery(java.lang.String keywords)
Creates a new query that does not contain any filters and searches all available user fields. |
|
ProfileSearchQuery(java.lang.String keywords,
java.util.List<ProfileSearchFilter> filters,
boolean searchUsername,
boolean searchName,
boolean searchEmail,
boolean searchProfile,
boolean admin)
Creates a new query, results sorted by relevance. |
|
ProfileSearchQuery(java.lang.String keywords,
java.util.List<ProfileSearchFilter> filters,
org.apache.lucene.search.Sort sort,
boolean searchUsername,
boolean searchName,
boolean searchEmail,
boolean searchProfile,
boolean admin,
Community community)
Creates a new query, results sorted by the given sort. |
|
| Method Summary | |
|---|---|
Community |
getCommunity()
Gets the community used for this query. |
java.util.List<ProfileSearchFilter> |
getFilters()
Gets a list of ProfileSearchFilters used to filter user results for this query. |
java.lang.String |
getKeywords()
Gets the keywords for the user search. |
org.apache.lucene.search.Sort |
getSort()
Gets the sort used for this query. |
boolean |
isAdmin()
Return True if the user performing the search is a system administrator, false otherwise. |
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 |
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(java.util.List<ProfileSearchFilter> filters)
Sets a list of ProfileSearchFilters used to filter user results for this query. |
void |
setKeywords(java.lang.String keywords)
Sets the keywords for the user search. |
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 |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProfileSearchQuery(java.lang.String keywords)
keywords - the keywords to search
public ProfileSearchQuery(java.lang.String keywords,
java.util.List<ProfileSearchFilter> filters,
boolean searchUsername,
boolean searchName,
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(java.lang.String keywords,
java.util.List<ProfileSearchFilter> filters,
org.apache.lucene.search.Sort sort,
boolean searchUsername,
boolean searchName,
boolean searchEmail,
boolean searchProfile,
boolean admin,
Community community)
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 in| Method Detail |
|---|
public java.lang.String getKeywords()
public void setKeywords(java.lang.String keywords)
keywords - the keywords for the user searchpublic java.util.List<ProfileSearchFilter> getFilters()
ProfileSearchFilters used to filter user results for this query.
ProfileSearchFilters used to filter user results for this query.public void setFilters(java.util.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 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 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.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||