org.apache.myfaces.trinidad.change
Class ChangeManager

java.lang.Object
  extended by org.apache.myfaces.trinidad.change.ChangeManager
Direct Known Subclasses:
ChangeManagerWrapper, NullChangeManager, SessionChangeManager

public abstract class ChangeManager
extends Object

The base class for all ChangeManagers. A ChangeManager should manage accumulation of Changes and also take care of their persistence.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-api/src/main/java/oracle/adf/view/faces/change/ChangeManager.java#0 $) $Date: 10-nov-2005.19:09:58 $

Constructor Summary
ChangeManager()
           
 
Method Summary
abstract  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.
 void addDocumentChange(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, DocumentChange change)
          Add a DocumentChange to this current request for a specified component.
 void applyComponentChangesForCurrentView(javax.faces.context.FacesContext facesContext)
          Applies all the ComponentChanges added so far for the current view.
 void applyComponentChangesForSubtree(javax.faces.context.FacesContext facesContext, javax.faces.component.NamingContainer root)
          Applies the ComponentChanges added so far for components underneath the specified NamingContainer.
 void applySimpleComponentChanges(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Apply non-cross-component changes to a component in its original location.
protected static DocumentChange createDocumentChange(ComponentChange change)
          Use the conversion rules to attempt to retrieve the equivalent document change for a ComponentChange
static void registerDocumentFactory(String targetClassName, String converterClassName)
           
 AttributeComponentChange replaceAttributeChangeIfPresent(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, AttributeComponentChange attributeComponentChange)
          Replace an AttributeComponentChange if it's present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeManager

public ChangeManager()
Method Detail

registerDocumentFactory

public static void registerDocumentFactory(String targetClassName,
                                           String converterClassName)

createDocumentChange

protected static DocumentChange createDocumentChange(ComponentChange change)
Use the conversion rules to attempt to retrieve the equivalent document change for a ComponentChange

Parameters:
change - to convert

addComponentChange

public abstract 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. When called we will disallow changes if the component or its any ancestor is a stamped component by UIXIterator.

Throws:
IllegalArgumentException - if any of the supplied parameters were to be null.

replaceAttributeChangeIfPresent

public AttributeComponentChange replaceAttributeChangeIfPresent(javax.faces.context.FacesContext facesContext,
                                                                javax.faces.component.UIComponent uiComponent,
                                                                AttributeComponentChange attributeComponentChange)
Replace an AttributeComponentChange if it's present.

Parameters:
facesContext -
uiComponent -
attributeComponentChange -
Returns:
the old change instance

addDocumentChange

public void addDocumentChange(javax.faces.context.FacesContext facesContext,
                              javax.faces.component.UIComponent uiComponent,
                              DocumentChange change)
Add a DocumentChange to this current request for a specified component. When called we will allow changes even if the component or its any ancestor is a stamped component by UIXIterator.

Throws:
IllegalArgumentException - if any of the supplied parameters were to be null.

applyComponentChangesForCurrentView

public void applyComponentChangesForCurrentView(javax.faces.context.FacesContext facesContext)
Applies all the ComponentChanges added so far for the current view. Developers should not need to call this method. Internal implementation will call it as the component tree is built and is ready to take changes.

Parameters:
facesContext - The FacesContext instance for the current request.

applyComponentChangesForSubtree

public void applyComponentChangesForSubtree(javax.faces.context.FacesContext facesContext,
                                            javax.faces.component.NamingContainer root)
Applies the ComponentChanges added so far for components underneath the specified NamingContainer. Developers should not need to call this method. Internal implementation will call it as the component tree is built and is ready to take changes.

Parameters:
facesContext - The FacesContext instance for the current request.
root - The NamingContainer that contains the component subtree to which ComponentChanges should be applied. If null, all changes are applied.
Throws:
IllegalArgumentException - if the root NamingContainer is not a UIComponent instance.

applySimpleComponentChanges

public void applySimpleComponentChanges(javax.faces.context.FacesContext context,
                                        javax.faces.component.UIComponent component)
Apply non-cross-component changes to a component in its original location. This is typically only called by tags that need to ensure that a newly created component instance is as up-to-date as possible.

Parameters:
context -
component - Component to apply the simple changes to


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.