Class DirectorySearchProvider
java.lang.Object
com.webmethods.caf.faces.bean.PageFlowScopeAdapter
com.webmethods.caf.faces.data.object.ListTableContentProvider
com.webmethods.caf.faces.data.object.SelectableListTableContentProvider
com.webmethods.caf.faces.data.dir.DirectorySearchProvider
- All Implemented Interfaces:
IPageFlowScopeAdapter
,IAddressableTableContentProvider
,IContentProvider
,IRefreshable
,IRefreshableContentProvider
,IReorderableTableContentProvider
,ISelectableTableContentProvider
,ISortableTableContentProvider
,ITableContentProvider
,IUpdateableContentProvider
,IUpdateableTableContentProvider
,Serializable
Directory Search Provider for searching on users/groups/roles principles.
The provider extends a list Table content provider.
- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Paging iterator from directory service.protected class
Sort utility class.Nested classes/interfaces inherited from class com.webmethods.caf.faces.data.object.SelectableListTableContentProvider
SelectableListTableContentProvider.Row, SelectableListTableContentProvider.RowComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected List<IPrincipalProvider>
protected Integer
protected String
protected Integer
Fields inherited from class com.webmethods.caf.faces.data.object.SelectableListTableContentProvider
m_autoIdCounter, m_map, m_originalList, m_selectableHelper
Fields inherited from class com.webmethods.caf.faces.data.object.ListTableContentProvider
m_array, m_canTemplateRow, m_index, m_list, m_onCreateRow, m_onDeleteRow, m_rowId, m_rowType, m_sort, m_templateRow, m_var
Fields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor that sets the row variable and row Id binding for the selectable list table content provider parent class. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
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.protected IThingIDList
Get the directory services from the portal system.Get the directory service for the search query.Set the directory service in the search query.Deprecated.Use field on fSearchQuery insteadGet the search 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.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 principal to exclude.void
setMaxResults
(Integer maxResults) Deprecated.Use field on fSearchQuery instead.void
setQueryString
(String queryString) Deprecated.use field on fSearchQuery insteadvoid
setSearchType
(Integer searchType) Set the search type toIDirConstants.TYPE_USER
,IDirConstants.TYPE_ROLE
, orIDirConstants.TYPE_GROUP
.void
Set the sort information for this provider.protected void
sort()
Sort is handled by the refresh method.Methods inherited from class com.webmethods.caf.faces.data.object.SelectableListTableContentProvider
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
Methods inherited from class com.webmethods.caf.faces.data.object.ListTableContentProvider
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
Methods inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
getPropertyKeys, getType, getValue, hasProperty, toString
Methods inherited from interface com.webmethods.caf.faces.data.ITableContentProvider
getRowCount, getRowIndex, getRowVariable, isRowAvailable, setRowIndex
-
Field Details
-
fMaxResults
-
fSearchType
-
fDirService
-
fQueryString
-
fExcludePrincipalsList
-
-
Constructor Details
-
DirectorySearchProvider
public DirectorySearchProvider()Default constructor that sets the row variable and row Id binding for the selectable list table content provider parent class. The row variable is set to "row". The row Id binding is set to the value binding for #{row.principalURI}".
-
-
Method Details
-
getDirService
Get the directory service for the search query.- Returns:
- The dirService.
-
setDirService
Set the directory service in the search query.- Parameters:
dirService
- The dirService to set.
-
getMaxResults
Set the directory service in the search query.- Parameters:
dirService
- The dirService to set.
-
setMaxResults
Deprecated.Use field on fSearchQuery instead.Set the maximum number of results allowed in the search results.- Parameters:
maxResults
- The maxResults to set.
-
getQueryString
Deprecated.Use field on fSearchQuery insteadGets the raw value of the query string.- Returns:
- the queryString
-
setQueryString
Deprecated.use field on fSearchQuery insteadSet the raw value of the query string.- Parameters:
queryString
- the queryString to set
-
getSearchType
Get the search type to search for.- Returns:
- The searchType is -1 (null),
IDirConstants.TYPE_USER
,IDirConstants.TYPE_ROLE
, orIDirConstants.TYPE_GROUP
.
-
setSearchType
Set the search type toIDirConstants.TYPE_USER
,IDirConstants.TYPE_ROLE
, orIDirConstants.TYPE_GROUP
.- Parameters:
searchType
- The search type to set.
-
setExcludePrincipalsList
Set the list of principal to exclude.- Parameters:
excludePrincipalsList
- the excludePrincipalsList to set
-
sort
protected void sort()Sort is handled by the refresh method.- Overrides:
sort
in classSelectableListTableContentProvider
- See Also:
-
setSort
Set the sort information for this provider. If it has changed then refresh the table.- Specified by:
setSort
in interfaceISortableTableContentProvider
- Overrides:
setSort
in classListTableContentProvider
- Parameters:
sort
- The table sort information.- See Also:
-
isPrincipleExcluded
Is the principal URI in the list of excluded principals.- Parameters:
principalURI
- The principal URI to check.- Returns:
- True if in the list excluded principal list.
- Throws:
PortalException
-
isPrincipleExcluded
Is the directory principal in the list of excluded principals.- Parameters:
principal
- The directory principal to check.- Returns:
- True if in the list excluded principal list.
- Throws:
PortalException
-
refresh
public void refresh()Refresh the list of search results.- Specified by:
refresh
in interfaceIRefreshable
- Overrides:
refresh
in classSelectableListTableContentProvider
- See Also:
-
getSortValue
Get the value of the property used to sort the principal.- Parameters:
obj
- The target to evaluate.propertyExpression
- The value expression (ie '{name}').
-
getAsString
Get a String for the object or use the default value. If the object is not null then get the to string value.- Parameters:
o
-defaultValue
- The value to return if o is null.- Returns:
- The parsed or default value.
-
getAsInt
Get an integer for the object or use the default value. If the object is a Sting or Integer try to convert the object to an int.- Parameters:
o
-defaultValue
- The value to return if o is not a String or Integer.- Returns:
- The parsed or default value.
-
getDirectoryServices
Get the directory services from the portal system.- Returns:
- The directory services.
- Throws:
PortalException
-