public abstract class BaseTaskSearchContentProvider extends SelectableListTableContentProvider implements ITaskSearchContentProvider
ITaskSearchContentProvider
.ITaskSearchContentProvider
,
Serialized FormSelectableListTableContentProvider.Row, SelectableListTableContentProvider.RowComparator
Modifier and Type | Field and Description |
---|---|
protected boolean |
m_includeTaskData |
protected boolean |
m_isAutoRefresh |
protected boolean |
m_needRefresh |
protected ITask[] |
m_results |
protected boolean |
m_searchInbox |
protected TaskSearchQuery |
m_searchQuery |
static String |
PROPERTY_TASKDATA
property key for task data
|
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 |
---|
BaseTaskSearchContentProvider()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
calculateRowId(int index,
Object data)
Return
data.getTaskInfo().getTaskID() as RowId |
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. |
Object[] |
getPropertyKeys()
Returns property keys for the current row object which is an element of
the wrapped array or the list by
ListTableContentProvider.getRowIndex() index. |
ITask[] |
getResults()
Returns task search results
|
boolean |
getSearchInbox()
Returns boolean value indicates whether to search current user inbox or full task list
return true if search current user inbox only
|
TaskSearchQuery |
getSearchQuery()
Returns task search query used for this provider
|
ITaskInfo |
getTaskInfo()
Returns task info for current row as
ITaskInfo |
Class<?> |
getType(Object propertyKey)
Returns java type of the given property
|
Object |
getValue(Object propertyKey)
Returns value of the given property
|
boolean |
hasProperty(Object propertyKey)
Checks if the given property is supported by this content provider
|
boolean |
isAutoRefresh()
Returns false
|
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) . |
void |
setSearchInbox(boolean value)
Setting whether to search current user inbox or full task list
|
boolean |
supportsAutoRefresh()
Returns
false |
createRow, deleteRow, getCurrentRow, getList, getRowId, getRowSelectedCount, getRowSelectedIds, getRowUnselectedIds, getSelectedRows, getUseUnselectedModel, isAddressable, isRowSelected, moveTo, refresh, setCurrentRow, setList, setRowById, setRowSelected, setRowSelectedIds, setRowUnselectedIds, setRowVariable, setTemplateRow, sort, updateOriginalList
calculateRowId, getArray, getCanTemplateRow, getOnCreateRow, getOnCreateRowExpression, getOnDeleteRow, getOnDeleteRowExpression, getRowCount, getRowIdBinding, getRowIdExpression, getRowIndex, getRowType, getRowVariable, getSort, isReadOnly, isReorderable, isRowAvailable, isTemplateRow, newRow, setArray, setCanTemplateRow, setOnCreateRow, setOnCreateRowExpression, setOnDeleteRow, setOnDeleteRowExpression, setRowId, setRowIdBinding, setRowIdExpression, setRowIndex, setRowType, setSort, setValue, toString
getExpireWithPageFlow, setExpireWithPageFlow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
refresh
getCurrentRow, getRowCount, getRowIndex, getRowVariable, isRowAvailable, setRowIndex, setRowVariable
toString
public static final String PROPERTY_TASKDATA
protected boolean m_isAutoRefresh
protected boolean m_needRefresh
protected boolean m_searchInbox
protected boolean m_includeTaskData
protected TaskSearchQuery m_searchQuery
protected ITask[] m_results
public BaseTaskSearchContentProvider()
public TaskSearchQuery getSearchQuery()
public boolean getSearchInbox()
ITaskSearchContentProvider
getSearchInbox
in interface ITaskSearchContentProvider
public void setSearchInbox(boolean value)
ITaskSearchContentProvider
setSearchInbox
in interface ITaskSearchContentProvider
public ITask[] getResults() throws Exception
getResults
in interface ITaskSearchContentProvider
Exception
public ITaskInfo getTaskInfo()
ITaskInfo
public boolean supportsAutoRefresh()
false
supportsAutoRefresh
in interface IRefreshable
supportsAutoRefresh
in class SelectableListTableContentProvider
IRefreshable.setAutoRefresh(boolean)
public void setAutoRefresh(boolean autoRefresh) throws ContentProviderException
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.
setAutoRefresh
in interface IRefreshable
setAutoRefresh
in class SelectableListTableContentProvider
autoRefresh
- true to turn it onContentProviderException
- if autorefresh is trueIRefreshable.supportsAutoRefresh()
,
IRefreshable.getNeedRefresh()
,
IRefreshable.setNeedRefresh(boolean)
public boolean isAutoRefresh()
isAutoRefresh
in interface IRefreshable
isAutoRefresh
in class SelectableListTableContentProvider
public 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.
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.
getNeedRefresh
in interface IRefreshable
getNeedRefresh
in class SelectableListTableContentProvider
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.public void setNeedRefresh(boolean needRefresh)
IContentProvider.getValue(Object)
.setNeedRefresh
in interface IRefreshable
setNeedRefresh
in class SelectableListTableContentProvider
needRefresh
- true
if the input parameters have changedpublic Object[] getPropertyKeys()
ListTableContentProvider.getRowIndex()
index.getPropertyKeys
in interface IContentProvider
getPropertyKeys
in class ListTableContentProvider
String
or Integer
property keyspublic boolean hasProperty(Object propertyKey)
hasProperty
in interface IContentProvider
hasProperty
in class ListTableContentProvider
propertyKey
- property key of type String
or Integer
true
if property is supportedpublic Object getValue(Object propertyKey) throws ELException, PropertyNotFoundException
getValue
in interface IContentProvider
getValue
in class ListTableContentProvider
propertyKey
- the property key of type String
or Integer
null
PropertyNotFoundException
- if property is not supportedELException
public Class<?> getType(Object propertyKey) throws PropertyNotFoundException
getType
in interface IContentProvider
getType
in class ListTableContentProvider
propertyKey
- the property key of type String
or Integer
Class
PropertyNotFoundException
- if property is not supportedprotected String calculateRowId(int index, Object data)
data.getTaskInfo().getTaskID()
as RowIdcalculateRowId
in class ListTableContentProvider
index
- row indexdata
- row data object