org.kuali.rice.krad.uif.lifecycle
Class LifecyclePhaseFactory

java.lang.Object
  extended by org.kuali.rice.krad.uif.lifecycle.LifecyclePhaseFactory

public final class LifecyclePhaseFactory
extends Object

Responsible for creating lifecycle phases.

This factory recycles completed phases to reduce object creation during the lifecycle.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
static ApplyModelComponentPhase applyModel(Component component, Object model, Component parent, String path, List<String> refreshPaths)
          Creates a new lifecycle phase processing task for applying the model to a component.
static ApplyModelComponentPhase applyModel(Component component, Object model, String path, List<String> refreshPaths)
          Creates a new lifecycle phase processing task for applying the model to a component.
static ApplyModelComponentPhase applyModel(LifecycleElement element, Object model, String path, List<String> refreshPaths, Component parent, FinalizeComponentPhase nextPhase, Set<String> visitedIds)
          Creates a new lifecycle phase processing task for applying the model to a element.
static FinalizeComponentPhase finalize(Component component, Object model, String path, List<String> refreshPaths)
          Creates a new lifecycle phase processing task for finalizing a nested component.
static FinalizeComponentPhase finalize(LifecycleElement element, Object model, String path, List<String> refreshPaths, Component parent)
          Creates a new lifecycle phase processing task for finalizing a nested component.
static InitializeComponentPhase initialize(Component component, Object model, String path, List<String> refreshPaths)
          Creates a new lifecycle phase processing task for performing initialization on a component.
static InitializeComponentPhase initialize(LifecycleElement element, Object model, String path, List<String> refreshPaths, Component parent, ApplyModelComponentPhase nextPhase)
          Creates a new lifecycle phase processing task for performing initialization on a element.
static PreProcessElementPhase preProcess(LifecycleElement element, String path)
          Creates a new lifecycle phase processing task for pre-processing a lifecycle element.
static PreProcessElementPhase preProcess(LifecycleElement element, String path, Component parent)
          Creates a new lifecycle phase processing task for pre-processing a lifecycle element.
static RenderComponentPhase render(Component component, Object model, String path, List<String> refreshPaths)
          Creates a new lifecycle phase processing task for rendering a component.
static RenderComponentPhase render(FinalizeComponentPhase finalizePhase, List<String> refreshPaths, RenderComponentPhase renderParent, Set<String> pendingChildren)
          Creates a new lifecycle phase processing task for rendering a component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

preProcess

public static PreProcessElementPhase preProcess(LifecycleElement element,
                                                String path)
Creates a new lifecycle phase processing task for pre-processing a lifecycle element.

Parameters:
element - The element.
path - Path to the component relative to its parent component.
Returns:
lifecycle processing task for processing the initialize phase on the component

preProcess

public static PreProcessElementPhase preProcess(LifecycleElement element,
                                                String path,
                                                Component parent)
Creates a new lifecycle phase processing task for pre-processing a lifecycle element.

Parameters:
element - The element.
path - Path to the component relative to its parent component.
parent - The parent component.
Returns:
lifecycle processing task for processing the initialize phase on the component

initialize

public static InitializeComponentPhase initialize(Component component,
                                                  Object model,
                                                  String path,
                                                  List<String> refreshPaths)
Creates a new lifecycle phase processing task for performing initialization on a component.

Parameters:
component - The component.
model - The model
path - Path to the component relative to its parent component.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
Returns:
lifecycle processing task for processing the initialize phase on the component

initialize

public static InitializeComponentPhase initialize(LifecycleElement element,
                                                  Object model,
                                                  String path,
                                                  List<String> refreshPaths,
                                                  Component parent,
                                                  ApplyModelComponentPhase nextPhase)
Creates a new lifecycle phase processing task for performing initialization on a element.

Parameters:
element - The element
model - The model
parent - The parent element.
path - Path to the component relative to its parent component.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
nextPhase - The applyModel phase to spawn after the successful completion of the initialize phase.
Returns:
lifecycle processing task for processing the initialize phase on the component

applyModel

public static ApplyModelComponentPhase applyModel(Component component,
                                                  Object model,
                                                  String path,
                                                  List<String> refreshPaths)
Creates a new lifecycle phase processing task for applying the model to a component.

Parameters:
component - The component.
model - The model
path - Path to the component relative to its parent component.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
Returns:
lifecycle processing task for processing the apply model phase on the component

applyModel

public static ApplyModelComponentPhase applyModel(Component component,
                                                  Object model,
                                                  Component parent,
                                                  String path,
                                                  List<String> refreshPaths)
Creates a new lifecycle phase processing task for applying the model to a component.

Parameters:
component - The component.
model - The model
parent - The component.
path - Path to the component relative to its parent component.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
Returns:
lifecycle processing task for processing the apply model phase on the component

applyModel

public static ApplyModelComponentPhase applyModel(LifecycleElement element,
                                                  Object model,
                                                  String path,
                                                  List<String> refreshPaths,
                                                  Component parent,
                                                  FinalizeComponentPhase nextPhase,
                                                  Set<String> visitedIds)
Creates a new lifecycle phase processing task for applying the model to a element.

Parameters:
element - The element.
model - The model
parent - The parent component.
path - Path to the component relative to its parent component.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
nextPhase - The applyModel phase to spawn after the successful completion of the initialize phase.
visitedIds - The set of visited IDs to track while applying model.
Returns:
lifecycle processing task for processing the apply model phase on the component

finalize

public static FinalizeComponentPhase finalize(Component component,
                                              Object model,
                                              String path,
                                              List<String> refreshPaths)
Creates a new lifecycle phase processing task for finalizing a nested component.

Parameters:
component - The component.
model - The model
path - Path to the component relative to its parent component.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
Returns:
lifecycle processing task for processing the finalize phase on the component

finalize

public static FinalizeComponentPhase finalize(LifecycleElement element,
                                              Object model,
                                              String path,
                                              List<String> refreshPaths,
                                              Component parent)
Creates a new lifecycle phase processing task for finalizing a nested component.

Parameters:
element - The component.
model - The model
parent - The parent component.
path - Path to the component relative to its parent component.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
Returns:
lifecycle processing task for processing the finalize phase on the component

render

public static RenderComponentPhase render(Component component,
                                          Object model,
                                          String path,
                                          List<String> refreshPaths)
Creates a new lifecycle phase processing task for rendering a component.

Parameters:
component - The component to render.
model - The model associated with the component.
path - Path to the component relative to its parent component.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
Returns:
lifecycle processing task for processing the render phase on the component

render

public static RenderComponentPhase render(FinalizeComponentPhase finalizePhase,
                                          List<String> refreshPaths,
                                          RenderComponentPhase renderParent,
                                          Set<String> pendingChildren)
Creates a new lifecycle phase processing task for rendering a component.

Parameters:
finalizePhase - The finalize component phase associated with this rendering phase.
refreshPaths - list of paths to run lifecycle on when executing a refresh lifecycle
renderParent - The rendering phase for the parent of the component associated with this phase.
pendingChildren - The number of child phases to expect to be queued with this phase as their rendering parent.
Returns:
lifecycle processing task for processing the render phase on the component


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.