org.apache.myfaces.trinidad.change
Class SessionChangeManager

java.lang.Object
  extended by org.apache.myfaces.trinidad.change.ChangeManager
      extended by org.apache.myfaces.trinidad.change.SessionChangeManager

public class SessionChangeManager
extends ChangeManager

A ChangeManager implementation that manages persisting the added Changes at the session. This means the lifetime of Changes added such is within the session scope.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/change/SessionChangeManager.java#0 $) $Date: 10-nov-2005.19:06:35 $

Constructor Summary
SessionChangeManager()
           
 
Method Summary
 void addComponentChange(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, ComponentChange change)
          Add a ComponentChange to this current request for a specified component.
 java.util.Iterator<ComponentChange> getComponentChanges(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent)
          Retrieve the ComponentChanges available for specified component on this request.
 java.util.Iterator<java.lang.String> getComponentIdsWithChanges(javax.faces.context.FacesContext facesContext)
          Retrieve the identifiers of all components on this request that have Changes associated with them for the viewId specified in the facesContext.
protected  java.util.Map<java.lang.String,java.util.List<ComponentChange>> getComponentToChangesMapForView(javax.faces.context.FacesContext facesContext, java.lang.String viewId, boolean createIfNecessary)
          The Map used to store the Changes.
protected  org.w3c.dom.Document getDocument(javax.faces.context.FacesContext context)
          We don't support DocumentAspect persistence
protected  void persistDocumentChanges(javax.faces.context.FacesContext facesContext)
           
protected  boolean supportsDocumentPersistence(javax.faces.context.FacesContext context)
          Returns true if we can support Document-based Persistence in this ChangeManager.
 
Methods inherited from class org.apache.myfaces.trinidad.change.ChangeManager
addDocumentChange, createDocumentChange, registerDocumentFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionChangeManager

public SessionChangeManager()
Method Detail

getComponentToChangesMapForView

protected java.util.Map<java.lang.String,java.util.List<ComponentChange>> getComponentToChangesMapForView(javax.faces.context.FacesContext facesContext,
                                                                                                          java.lang.String viewId,
                                                                                                          boolean createIfNecessary)
The Map used to store the Changes. The Map is stored as key=ComponentCompositeId, value=ChangesList (List)

Parameters:
facesContext - FacesContext for request
viewId - viewID for request
createIfNecessary - true if Map should be created if not already present
Returns:
Synchronized Map of componentID tokens to Lists of Changes

getDocument

protected org.w3c.dom.Document getDocument(javax.faces.context.FacesContext context)
We don't support DocumentAspect persistence


addComponentChange

public void addComponentChange(javax.faces.context.FacesContext facesContext,
                               javax.faces.component.UIComponent uiComponent,
                               ComponentChange change)
Add a ComponentChange to this current request for a specified component.

Specified by:
addComponentChange in class ChangeManager

getComponentChanges

public java.util.Iterator<ComponentChange> getComponentChanges(javax.faces.context.FacesContext facesContext,
                                                               javax.faces.component.UIComponent uiComponent)
Retrieve the ComponentChanges available for specified component on this request.

Specified by:
getComponentChanges in class ChangeManager
Returns:
An Iterator of ComponentChanges in the order in which they are associated with the UIComponent. Returns null if there are no such Changes

getComponentIdsWithChanges

public java.util.Iterator<java.lang.String> getComponentIdsWithChanges(javax.faces.context.FacesContext facesContext)
Retrieve the identifiers of all components on this request that have Changes associated with them for the viewId specified in the facesContext.

Specified by:
getComponentIdsWithChanges in class ChangeManager
Returns:
An Iterator that can be used to access the collection of component identifiers. Returns null if there are no such components.

persistDocumentChanges

protected void persistDocumentChanges(javax.faces.context.FacesContext facesContext)

supportsDocumentPersistence

protected boolean supportsDocumentPersistence(javax.faces.context.FacesContext context)
Returns true if we can support Document-based Persistence in this ChangeManager. Subclassers adding Document-based Persistence should override this method and must override getDocument in order to enable Document-based Persistence.

Parameters:
context -
Returns:
true if we can support Document-based Persistence


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.