public class ClusterPartitionsTableContentProvider extends ListTableContentProvider implements IRefreshableContentProvider
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 |
---|
ClusterPartitionsTableContentProvider() |
Modifier and Type | Method and Description |
---|---|
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. |
int |
getNumberServersOnPartition() |
protected IPartition |
getPartition() |
URL |
getPartitionURL() |
boolean |
isAutoRefresh()
Returns
true if the provider is currenlty in auto-refresh mode |
protected IPartition |
newRow()
Creates a new, blank row object to be insterted into the list.
|
void |
refresh()
(Re)loads data from the data source.
|
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 true if this content provider supports auto refresh feature.
|
calculateRowId, createRow, deleteRow, getArray, getCanTemplateRow, getCurrentRow, getList, getOnCreateRow, getOnCreateRowExpression, getOnDeleteRow, getOnDeleteRowExpression, getPropertyKeys, getRowCount, getRowId, getRowIdBinding, getRowIdExpression, getRowIndex, getRowType, getRowVariable, getSort, getType, getValue, hasProperty, isAddressable, isReadOnly, isReorderable, isRowAvailable, isTemplateRow, moveTo, setArray, setCanTemplateRow, setCurrentRow, setList, setOnCreateRow, setOnCreateRowExpression, setOnDeleteRow, setOnDeleteRowExpression, setRowById, setRowId, setRowIdBinding, setRowIdExpression, setRowIndex, setRowType, setRowVariable, setSort, setTemplateRow, setValue, sort, toString
getExpireWithPageFlow, setExpireWithPageFlow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPropertyKeys, getType, getValue, hasProperty, toString
public ClusterPartitionsTableContentProvider()
public int getNumberServersOnPartition()
protected IPartition getPartition()
protected String calculateRowId(int index, Object data)
ListTableContentProvider
ListTableContentProvider.getRowIdBinding()
expression.calculateRowId
in class ListTableContentProvider
index
- row indexdata
- row data objectprotected IPartition newRow()
ListTableContentProvider
#templateRow()
.newRow
in class ListTableContentProvider
public void refresh() throws ContentProviderException
IRefreshable
refresh
in interface IRefreshable
ContentProviderException
- if error loading data from the data sourcepublic boolean getNeedRefresh()
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.
getNeedRefresh
in interface IRefreshable
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 boolean isAutoRefresh()
IRefreshable
true
if the provider is currenlty in auto-refresh modeisAutoRefresh
in interface IRefreshable
public void setAutoRefresh(boolean autorefresh) throws ContentProviderException
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.
setAutoRefresh
in interface IRefreshable
autorefresh
- true to turn it onContentProviderException
- if auto refresh mode is not supportedIRefreshable.supportsAutoRefresh()
,
IRefreshable.getNeedRefresh()
,
IRefreshable.setNeedRefresh(boolean)
public void setNeedRefresh(boolean needRefresh)
IRefreshable
IContentProvider.getValue(Object)
.setNeedRefresh
in interface IRefreshable
needRefresh
- true
if the input parameters have changedpublic boolean supportsAutoRefresh()
IRefreshable
supportsAutoRefresh
in interface IRefreshable
IRefreshable.setAutoRefresh(boolean)