com.webmethods.caf.faces.data.csp
Class CSPRefreshableContentBaseProvider
java.lang.Object
com.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseFacesSessionBean
com.webmethods.caf.faces.data.csp.CSPBaseProvider
com.webmethods.caf.faces.data.csp.CSPRefreshableContentBaseProvider
- All Implemented Interfaces:
- IPageFlowScopeAdapter, IRefreshable, Serializable
- Direct Known Subclasses:
- CSPEFormTemplateProvider, CSPPreviewImageProvider
public abstract class CSPRefreshableContentBaseProvider
- extends CSPBaseProvider
- implements IRefreshable
Base class for CSP providers that need refresh support and work based on content id.
- See Also:
- Serialized Form
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean |
createMethodBinding, createValueBinding, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSPRefreshableContentBaseProvider
public CSPRefreshableContentBaseProvider()
supportsAutoRefresh
public boolean supportsAutoRefresh()
- Description copied from interface:
IRefreshable
- Returns true if this content provider supports auto refresh feature.
- Specified by:
supportsAutoRefresh
in interface IRefreshable
- 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
- Parameters:
autorefresh
- true to turn it on
- Throws:
ContentProviderException
- if auto refresh mode is not supported- See Also:
IRefreshable.supportsAutoRefresh()
,
IRefreshable.getNeedRefresh()
,
IRefreshable.setNeedRefresh(boolean)
isAutoRefresh
public boolean isAutoRefresh()
- Description copied from interface:
IRefreshable
- Returns
true
if the provider is currenlty in auto-refresh mode
- Specified by:
isAutoRefresh
in interface IRefreshable
- 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
- 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
- Parameters:
needRefresh
- true
if the input parameters have changed