Interface IRefreshable

All Known Subinterfaces:
IRefreshableContentProvider, ITaskContentProvider, ITaskSearchContentProvider, ITaskSearchPagingContentProvider
All Known Implementing Classes:
AbstractTaskContentProvider, BaseIteratorTableContentProvider, BaseTaskSearchContentProvider, BaseWSClientContentProvider, BoundChildrenTreeContentProvider, BpmProcessContentProvider, BpmProcessDefContentProvider, BpmProcessStepContentProvider, ChildrenTableContentProvider, ClusterPartitionsTableContentProvider, ClusterServersTableContentProvider, CustomTaskSearchContentProvider, CustomTaskSearchContentProvider.TaskSearchPagingService, DirectorySearchProvider, EFormContentProvider, EFormFileTemplateProvider, EFormJcrTemplateProvider, FilterableListTreeContentProvider, FilterableSelectableListTableContentProvider, FilteredPortalContainerModel, GlueWSClientContentProvider, LazyNodeTreeContentProvider, ListTreeContentProvider, NewsfeedContentProvider, NodeTreeContentProvider, ObjectMethodContentProvider, PageableTableContentProvider, PeopleSearchProvider, PortalContainerModel, ProcessSearchProvider, RowSetTableContentProvider, SearchTableContentProvider, SelectableListTableContentProvider, SimpleTaskContentProvider, TableTreeContentProvider, TaskContentProvider, TaskContentProviderExtended, TaskInboxHpstraSearchContentProvider, TaskInboxIndexedSearchContentProvider, TaskInboxSearchContentProvider, TaskIndexedSearchContentProvider, TaskIndexedSearchContentProvider.TaskSearchPagingService, TaskSavedSearchContentProvider, TaskSearchContentProvider, VersionHistoryTableContentProvider, XMLTableContentProvider, XMLTreeContentProvider

public interface IRefreshable

Provider that allows wrapped data to be refreshed, i.e. reloaded from the data source. Typically the implementations support some notion of input parameters and output results, where input parameters are used to execute a query or a service and the output results are populated from this query or service call.

.

The provider implementation can support auto-refresh of the results when input parameters have changed. The client must glag the fact that the input parameters have changed by setting setNeedRefresh(boolean) = true. This is done automatically if clients use BaseFacesBean.resolveDataBinding(String[][], Object, String) method on the page bean for dynamic data binding of the provider input parameters.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true when isAutoRefresh() is on and the result properties need to be refreshed from the data source by executing refresh() method.
    boolean
    Returns true if the provider is currenlty in auto-refresh mode
    void
    (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
    Returns true if this content provider supports auto refresh feature.
  • Method Details

    • refresh

      void refresh() throws ContentProviderException
      (Re)loads data from the data source. Implementation specific meaning can be executing a SQL query or a web service call. All current data will be lost and updated with the new results if successful.
      Throws:
      ContentProviderException - if error loading data from the data source
    • supportsAutoRefresh

      boolean supportsAutoRefresh()
      Returns true if this content provider supports auto refresh feature.
      Returns:
      true when auto refresh is supported
      See Also:
    • setAutoRefresh

      void setAutoRefresh(boolean autorefresh) throws ContentProviderException

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

      Parameters:
      autorefresh - true to turn it on
      Throws:
      ContentProviderException - if auto refresh mode is not supported
      See Also:
    • isAutoRefresh

      boolean isAutoRefresh()
      Returns true if the provider is currenlty in auto-refresh mode
      Returns:
      false if auto-refresh mode is off or not supported
    • getNeedRefresh

      boolean getNeedRefresh()

      Returns true when isAutoRefresh() is on and the result properties need to be refreshed from the data source by executing 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 setNeedRefresh(boolean) explicitely.

      Returns:
      true when the output properties are not up-to-date with the current input parameters, i.e. refresh() needs to be executed manually or automatically.
    • setNeedRefresh

      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).
      Parameters:
      needRefresh - true if the input parameters have changed