public abstract class DataUpdateManager extends Object
Constructor and Description |
---|
DataUpdateManager() |
Modifier and Type | Method and Description |
---|---|
abstract Iterator<ActiveDataEvent> |
getEventCache(String clientId)
Returns all ActiveDataEvents cached for the given UIComponent (registered
using
registerComponentForPPRAndCacheEvents ) |
List<ActiveDataModel> |
getModelList()
Returns the list of ActiveDataModel intances registered.
|
abstract Iterator<String> |
getPartialTargets(javax.faces.context.FacesContext context)
Returns the current set of partial targets needing to be rerendered.
|
ActiveDataEncoder |
getRegisteredEncoder(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
ActiveDataModel model) |
abstract Set<String> |
getRegisteredPPRComponentIds()
Returns the set of registered automatic PPR components' id.
|
abstract Set<ActiveDataModel.ActiveDataPolicy> |
getSupportedPolicies()
Returns the Set of ActiveDataPolicies supported by this DataUpdateManager.
|
abstract void |
registerComponent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
ActiveDataModel model,
ActiveDataEncoder encoder)
Register active or PPR coomponent's model and encoder.
|
abstract void |
registerComponentForPPR(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
ActiveDataModel model,
AutoPPRFilter filter)
Registers a component as interested in being automatically re-rendered in the next render
phase in response to changes on an ActiveDataModel.
|
abstract void |
registerComponentForPPRAndCacheEvents(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
ActiveDataModel model)
Registers a component as interested in being automatically re-rendered in the next render
phase in response to changes on an ActiveDataModel.
|
abstract void |
registerSubtrees(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Collection<Object> rowKeys)
Register component with the collections identified by the rowKeys.
|
abstract void |
reregisterComponentForPPR(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Re-registers a previously registered component for being automatically re-rendered in the
next render phase in response to changes on an ActiveDataModel.
|
abstract void |
startActiveData(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
int startChangeCount)
Called when a previously registered component is ready to being receiving active data
starting from a specified
startChangeCount . |
boolean |
suspendComponent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
boolean suspend)
Suspend Active Data updates for the given component.
|
abstract void |
unregisterComponent(javax.faces.context.FacesContext context,
String clientId)
Unregister the component from the DataUpdateManager
|
abstract void |
unregisterSubtrees(javax.faces.context.FacesContext context,
String clientId,
Collection<Object> rowKeys)
Unregister component from the collections of the containers identified
by the rowKeys
|
public abstract Set<ActiveDataModel.ActiveDataPolicy> getSupportedPolicies()
public abstract void registerComponentForPPR(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, ActiveDataModel model, AutoPPRFilter filter)
context
- current FacesContextcomponent
- Component interested in being automatically PPR'ed in response to model
changes.model
- ActiveDataModel to listen for ActiveDataEvents onfilter
- AutoPPRFilter used to determine if ActiveDataEvents generated by the
ActiveDataModel should cause the component to be rerendered in the next rendering phase.public abstract void reregisterComponentForPPR(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
context
- current FacesContextcomponent
- Component previously registered for being automatically PPR'ed in response
to model changes.IllegalStateException
- if the component has not been previously registered
for being automatically re-rendered.public abstract void registerComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, ActiveDataModel model, ActiveDataEncoder encoder)
context
- current FacesContextcomponent
- the UI component to be registeredencoder
- the ActiveDataEncoder used for encoding the active data
generated for the UI component. If this value is null
, the component will
be registered as PPR component. Otherwise, the component will be
registered as active component.model
- Active Data model which will generate active eventsIllegalStateException
- if the component is re-registered with different modelActiveDataEncoder
public abstract void registerComponentForPPRAndCacheEvents(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, ActiveDataModel model)
context
- current FacesContextcomponent
- Component interested in being automatically PPR'ed in response to model
changes.model
- ActiveDataModel to listen for ActiveDataEvents on
ActiveDataModel should cause the component to be rerendered in the next rendering phase.public ActiveDataEncoder getRegisteredEncoder(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, ActiveDataModel model)
public abstract Iterator<ActiveDataEvent> getEventCache(String clientId)
registerComponentForPPRAndCacheEvents
)clientId
- of the UIComponent to cache events forpublic abstract void registerSubtrees(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Collection<Object> rowKeys)
context
- current FacesContextcomponent
- the UI component to be registeredrowKeys
- the container row keys of collections from which the component
is to receive active data eventsIllegalArgumentException
- if rowKeys
is null
IllegalStateException
- if the component is not registered for its model and encoderpublic abstract void startActiveData(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, int startChangeCount)
startChangeCount
.
In order to handle error cases, the startChangeCount
may
be earlier than the changeCount
of the most recent events
delivered by the ActiveDataModel, however the startChangeCount
should never be
later than the most recent received changeCount
.context
- current FacesContextcomponent
- the UI component to beging receiving active datastartChangeCount
- Event change count to start sending active data from.IllegalStateException
- if the component is already started or the eventId is
later than the most recently delivered eventIdpublic abstract void unregisterComponent(javax.faces.context.FacesContext context, String clientId)
context
- current FacesContextclientId
- UI Component to unregisterpublic abstract void unregisterSubtrees(javax.faces.context.FacesContext context, String clientId, Collection<Object> rowKeys)
context
- current FacesContextclientId
- UI Component to unregisterrowKeys
- the container row keys of collections from which the component
has regsitered to receive active data eventsIllegalArgumentException
- if rowKeys
is null
public abstract Iterator<String> getPartialTargets(javax.faces.context.FacesContext context)
context
- current FacesContextpublic List<ActiveDataModel> getModelList()
public abstract Set<String> getRegisteredPPRComponentIds()
public boolean suspendComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, boolean suspend)
context
- current FacesContextcomponent
- the UI component to be suspendedsuspend
- true
to suspend; false
to resume normal processing.true
if updates are still suspended for this component;
false
otherwiseIllegalStateException
- if suspend
is
false
and the component is not currently suspended.