public class PeopleSearchProvider extends SelectableListTableContentProvider
Modifier and Type | Class and Description |
---|---|
class |
PeopleSearchProvider.DirectoryPagingIterator
Paging iterator from directory service.
|
protected class |
PeopleSearchProvider.RoleMatchSortComparator
Comparator that sort by exact match and reverses the result of a standard compare
(for descending key sorts) MWS-11783
|
protected class |
PeopleSearchProvider.SortEntry
Sort utility class.
|
SelectableListTableContentProvider.Row, SelectableListTableContentProvider.RowComparator
Modifier and Type | Field and Description |
---|---|
protected List<IPrincipalProvider> |
fExcludePrincipalsList |
protected ISearchQuery |
fSearchQuery |
m_autoIdCounter, m_map, m_originalList, m_selectableHelper
m_array, m_canTemplateRow, m_index, m_list, m_onCreateRow, m_onDeleteRow, m_rowId, m_rowType, m_sort, m_templateRow, m_var
fExpireWithPageFlow
Constructor and Description |
---|
PeopleSearchProvider()
Default constructor that sets the row variable and row Id binding for the
selectable list table content provider parent class.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
filterPrincipalByAttribute(IDirPrincipal dirPrincipal,
PrincipalAttributeValueSource papValueSrc,
List<Pattern> attribFilterRegexList)
Filter the principal by its attributes.
|
protected int |
getAsInt(Object o,
int defaultValue)
Get an integer for the object or use the default value.
|
protected String |
getAsString(Object o,
String defaultValue)
Get a String for the object or use the default value.
|
String |
getDirService()
Get the directory service for the search query.
|
Integer |
getMaxResults()
Get the maximum number of results allowed in the search results.
|
String |
getQueryString()
Deprecated.
Use field on fSearchQuery instead.
|
ISearchQuery |
getSearchQuery()
Initialize and cache the search query from the default search query factory.
|
Integer |
getSearchType()
Get the principal type to search for.
|
static String |
getSortValue(Object obj,
String propertyExpression)
Get the value of the property used to sort the principal.
|
protected boolean |
isPrincipleExcluded(IDirPrincipal principal)
Is the directory principal in the list of excluded principals.
|
protected boolean |
isPrincipleExcluded(IURI principalURI)
Is the principal URI in the list of excluded principals.
|
protected List<IPrincipalProvider> |
lookupRoles(ISearchQuery searchQuery,
int maxResults,
IContext portalContext,
String sortBy,
boolean isAscending) |
protected List<IPrincipalProvider> |
lookupUsersOrGroups(ISearchQuery searchQuery,
int maxResults,
IContext portalContext,
String sortBy,
boolean isAscending) |
void |
refresh()
Refresh the list of search results.
|
void |
setDirService(String dirService)
Set the directory service in the search query.
|
void |
setExcludePrincipalsList(List<IPrincipalProvider> excludePrincipalsList)
Set the list of principals to exclude.
|
void |
setMaxResults(Integer maxResults)
Deprecated.
Use field on fSearchQuery instead.
|
void |
setQueryString(String queryString)
Deprecated.
Use field on fSearchQuery instead.
|
void |
setSearchQuery(ISearchQuery searchQuery)
Manually set the search query.
|
void |
setSearchType(Integer searchType)
Set the principal type to search for.
|
void |
setSort(ISortInfo sort)
Set the sort information for this provider.
|
protected void |
sort()
Sort is handled by the refresh method.
|
createRow, deleteRow, getCurrentRow, getList, getNeedRefresh, getRowId, getRowSelectedCount, getRowSelectedIds, getRowUnselectedIds, getSelectedRows, getUseUnselectedModel, isAddressable, isAutoRefresh, isRowSelected, moveTo, setAutoRefresh, setCurrentRow, setList, setNeedRefresh, setRowById, setRowSelected, setRowSelectedIds, setRowUnselectedIds, setRowVariable, setTemplateRow, supportsAutoRefresh, updateOriginalList
calculateRowId, calculateRowId, getArray, getCanTemplateRow, getOnCreateRow, getOnCreateRowExpression, getOnDeleteRow, getOnDeleteRowExpression, getPropertyKeys, getRowCount, getRowIdBinding, getRowIdExpression, getRowIndex, getRowType, getRowVariable, getSort, getType, getValue, hasProperty, isReadOnly, isReorderable, isRowAvailable, isTemplateRow, newRow, setArray, setCanTemplateRow, setOnCreateRow, setOnCreateRowExpression, setOnDeleteRow, setOnDeleteRowExpression, setRowId, setRowIdBinding, setRowIdExpression, setRowIndex, setRowType, setValue, toString
getExpireWithPageFlow, setExpireWithPageFlow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRowCount, getRowIndex, getRowVariable, isRowAvailable, setRowIndex
getPropertyKeys, getType, getValue, hasProperty, toString
protected List<IPrincipalProvider> fExcludePrincipalsList
protected ISearchQuery fSearchQuery
public PeopleSearchProvider()
public ISearchQuery getSearchQuery()
DefaultSearchQueryFactory.createSearchQuery()
public void setSearchQuery(ISearchQuery searchQuery)
searchQuery
- The searchQuery to setpublic String getDirService()
public void setDirService(String dirService)
dirService
- The dirService to set.public Integer getMaxResults()
public void setMaxResults(Integer maxResults)
maxResults
- The maxResults to set.public String getQueryString()
ISearchQuery.getKeywordField()
public void setQueryString(String queryString)
queryString
- the queryString to set.ISearchQuery.getKeywordField()
public Integer getSearchType()
IDirConstants.TYPE_USER
,
IDirConstants.TYPE_ROLE
, or IDirConstants.TYPE_GROUP
.public void setSearchType(Integer searchType)
searchType
- The searchType is null, IDirConstants.TYPE_USER
,
IDirConstants.TYPE_ROLE
, or IDirConstants.TYPE_GROUP
.public void setExcludePrincipalsList(List<IPrincipalProvider> excludePrincipalsList)
excludePrincipalsList
- the excludePrincipalsList to setprotected void sort()
sort
in class SelectableListTableContentProvider
ListTableContentProvider.setSort(ISortInfo)
public void setSort(ISortInfo sort)
setSort
in interface ISortableTableContentProvider
setSort
in class ListTableContentProvider
sort
- The table sort information.ListTableContentProvider.setSort(com.webmethods.caf.faces.data.ISortInfo)
protected boolean isPrincipleExcluded(IURI principalURI) throws PortalException
principalURI
- The principal URI to check.PortalException
protected boolean isPrincipleExcluded(IDirPrincipal principal) throws PortalException
principal
- The directory principal to check.PortalException
public void refresh()
refresh
in interface IRefreshable
refresh
in class SelectableListTableContentProvider
SelectableListTableContentProvider.refresh()
protected List<IPrincipalProvider> lookupUsersOrGroups(ISearchQuery searchQuery, int maxResults, IContext portalContext, String sortBy, boolean isAscending) throws PortalException
PortalException
protected List<IPrincipalProvider> lookupRoles(ISearchQuery searchQuery, int maxResults, IContext portalContext, String sortBy, boolean isAscending) throws PortalException, BizException
PortalException
BizException
protected boolean filterPrincipalByAttribute(IDirPrincipal dirPrincipal, PrincipalAttributeValueSource papValueSrc, List<Pattern> attribFilterRegexList) throws PortalException
dirPrincipal
- papValueSrc
- The value sourceattribFilterRegexList
- The regex list to filter the attribute value.PortalException
public static String getSortValue(Object obj, String propertyExpression)
obj
- The target to evaluate.propertyExpression
- The value expression (ie '{name}').protected String getAsString(Object o, String defaultValue)
o
- defaultValue
- The value to return if o is null.protected int getAsInt(Object o, int defaultValue)
o
- defaultValue
- The value to return if o is not a String or Integer.