com.webmethods.caf.faces.data.task.impl
Class ProcessSearchProvider

java.lang.Object
  extended by com.webmethods.caf.faces.bean.PageFlowScopeAdapter
      extended by com.webmethods.caf.faces.data.object.ListTableContentProvider
          extended by com.webmethods.caf.faces.data.object.SelectableListTableContentProvider
              extended by com.webmethods.caf.faces.data.task.impl.ProcessSearchProvider
All Implemented Interfaces:
IPageFlowScopeAdapter, IAddressableTableContentProvider, IContentProvider, IRefreshable, IRefreshableContentProvider, IReorderableTableContentProvider, ISelectableTableContentProvider, ISortableTableContentProvider, ITableContentProvider, IUpdateableContentProvider, IUpdateableTableContentProvider, Serializable

public class ProcessSearchProvider
extends SelectableListTableContentProvider

Search provider to search and display ad-hoc workflow process instances

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webmethods.caf.faces.data.object.SelectableListTableContentProvider
SelectableListTableContentProvider.Row, SelectableListTableContentProvider.RowComparator
 
Field Summary
protected  boolean m_isAutoRefresh
          Flag to auto-refresh provider
protected  boolean m_needRefresh
          Flag to indicate that providers needs to be refreshed
protected  List m_resultList
          Search result list
protected  BpmProcessSearchQuery m_searchQuery
          Search query for ad-hoc workflow processes
 
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
ProcessSearchProvider()
          Default constructor
 
Method Summary
protected  String calculateRowId(int index, Object data)
          Calculates row id from the row data object using ListTableContentProvider.getRowIdBinding() expression.
 boolean getNeedRefresh()
          Returns true when IRefreshable.isAutoRefresh() is on and the result properties need to be refreshed from the data source by executing IRefreshable.refresh() method.
 List getResults()
          Returns result of the search
 BpmProcessSearchQuery getSearchQuery()
          Returns ad-hoc workflow processes search query
 boolean isAutoRefresh()
          Returns false
 void refresh()
          Refreshes provider results
 void setAutoRefresh(boolean autoRefresh)
          Sets auto refresh mode on.
 void setNeedRefresh(boolean needRefresh)
          Tells the provider that the input parameters have changed and the output results need to be refreshed the next time any output property is requested via IContentProvider.getValue(Object).
 boolean supportsAutoRefresh()
          Returns false
 
Methods inherited from class com.webmethods.caf.faces.data.object.SelectableListTableContentProvider
createRow, deleteRow, getCurrentRow, getList, getRowId, getRowSelectedCount, getRowSelectedIds, getRowUnselectedIds, getSelectedRows, getUseUnselectedModel, isAddressable, isRowSelected, moveTo, setCurrentRow, setList, setRowById, setRowSelected, setRowSelectedIds, setRowUnselectedIds, setRowVariable, setTemplateRow, sort, updateOriginalList
 
Methods inherited from class com.webmethods.caf.faces.data.object.ListTableContentProvider
calculateRowId, getArray, getCanTemplateRow, getOnCreateRow, getOnDeleteRow, getPropertyKeys, getRowCount, getRowIdBinding, getRowIndex, getRowType, getRowVariable, getSort, getType, getValue, hasProperty, isReadOnly, isReorderable, isRowAvailable, isTemplateRow, newRow, setArray, setCanTemplateRow, setOnCreateRow, setOnDeleteRow, setRowId, setRowIdBinding, setRowIndex, setRowType, setSort, 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.ITableContentProvider
getRowCount, getRowIndex, getRowVariable, isRowAvailable, setRowIndex
 
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
getPropertyKeys, getType, getValue, hasProperty, toString
 

Field Detail

m_isAutoRefresh

protected boolean m_isAutoRefresh
Flag to auto-refresh provider


m_needRefresh

protected boolean m_needRefresh
Flag to indicate that providers needs to be refreshed


m_searchQuery

protected BpmProcessSearchQuery m_searchQuery
Search query for ad-hoc workflow processes


m_resultList

protected List m_resultList
Search result list

Constructor Detail

ProcessSearchProvider

public ProcessSearchProvider()
Default constructor

Method Detail

getSearchQuery

public BpmProcessSearchQuery getSearchQuery()
Returns ad-hoc workflow processes search query


calculateRowId

protected String calculateRowId(int index,
                                Object data)
Description copied from class: ListTableContentProvider
Calculates row id from the row data object using ListTableContentProvider.getRowIdBinding() expression.

Overrides:
calculateRowId in class ListTableContentProvider
Parameters:
index - row index
data - row data object
Returns:
row id

getResults

public List getResults()
                throws Exception
Returns result of the search

Returns:
list of ad-hoc workflow processes
Throws:
Exception

refresh

public void refresh()
Refreshes provider results

Specified by:
refresh in interface IRefreshable
Overrides:
refresh in class SelectableListTableContentProvider

supportsAutoRefresh

public boolean supportsAutoRefresh()
Description copied from class: SelectableListTableContentProvider
Returns false

Specified by:
supportsAutoRefresh in interface IRefreshable
Overrides:
supportsAutoRefresh in class SelectableListTableContentProvider
Returns:
true when auto refresh is supported
See Also:
IRefreshable.setAutoRefresh(boolean)

setAutoRefresh

public void setAutoRefresh(boolean autoRefresh)
                    throws ContentProviderException
Description copied from interface: IRefreshable

Sets auto refresh mode on. When auto refresh mode is on, the provider calls IRefreshable.getNeedRefresh() to determine whether the refresh needs to be done before returning any result properties. If it returns true, the provider calls IRefreshable.refresh() method to updated the result properties.

Specified by:
setAutoRefresh in interface IRefreshable
Overrides:
setAutoRefresh in class SelectableListTableContentProvider
Parameters:
autoRefresh - true to turn it on
Throws:
ContentProviderException - if autorefresh is true
See Also:
IRefreshable.supportsAutoRefresh(), IRefreshable.getNeedRefresh(), IRefreshable.setNeedRefresh(boolean)

isAutoRefresh

public boolean isAutoRefresh()
Description copied from class: SelectableListTableContentProvider
Returns false

Specified by:
isAutoRefresh in interface IRefreshable
Overrides:
isAutoRefresh in class SelectableListTableContentProvider
Returns:
false if auto-refresh mode is off or not supported

getNeedRefresh

public boolean getNeedRefresh()
Description copied from interface: IRefreshable

Returns true when IRefreshable.isAutoRefresh() is on and the result properties need to be refreshed from the data source by executing IRefreshable.refresh() method.

Implementations may return an accurate value from this method if they can track the changes to the input parameter properties or they may require the clients to call IRefreshable.setNeedRefresh(boolean) explicitely.

Specified by:
getNeedRefresh in interface IRefreshable
Overrides:
getNeedRefresh in class SelectableListTableContentProvider
Returns:
true when the output properties are not up-to-date with the current input parameters, i.e. IRefreshable.refresh() needs to be executed manually or automatically.

setNeedRefresh

public void setNeedRefresh(boolean needRefresh)
Description copied from interface: IRefreshable
Tells the provider that the input parameters have changed and the output results need to be refreshed the next time any output property is requested via IContentProvider.getValue(Object).

Specified by:
setNeedRefresh in interface IRefreshable
Overrides:
setNeedRefresh in class SelectableListTableContentProvider
Parameters:
needRefresh - true if the input parameters have changed