JSF-Spring

de.mindmatters.faces.lifecycle
Class AbstractPhase

java.lang.Object
  extended by de.mindmatters.faces.lifecycle.AbstractPhase
All Implemented Interfaces:
Phase
Direct Known Subclasses:
ApplyRequestValuesPhase, InvokeApplicationPhase, ProcessValidationsPhase, RenderResponsePhase, RestoreViewPhase, UpdateModelValuesPhase

public abstract class AbstractPhase
extends java.lang.Object
implements Phase

Convenience superclass for phase implementations, using the Template Method design pattern which invokes beforePhase(FacesContext) at the beginning and afterPhase(FacesContext) at the end of phase execution.

Author:
Andreas Kuhrwahl

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.mindmatters.faces.lifecycle.Phase
Phase.PhaseIdName
 
Constructor Summary
AbstractPhase()
           
 
Method Summary
protected  void afterPhase(FacesContext context)
          Template method.
protected  void beforePhase(FacesContext context)
          Template method.
 void execute(FacesContext context)
          Perform all state transitions required by the current phase of the request processing Lifecycle for a particular request.
protected abstract  void executePhase(FacesContext context)
          Perform all state transitions required by the current phase of the request processing Lifecycle for a particular request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.mindmatters.faces.lifecycle.Phase
getId
 

Constructor Detail

AbstractPhase

public AbstractPhase()
Method Detail

execute

public final void execute(FacesContext context)
Perform all state transitions required by the current phase of the request processing Lifecycle for a particular request.

Specified by:
execute in interface Phase
Parameters:
context - FacesContext for the current request being processed

executePhase

protected abstract void executePhase(FacesContext context)
Perform all state transitions required by the current phase of the request processing Lifecycle for a particular request.

Parameters:
context - FacesContext for the current request being processed
Throws:
FacesException - if a processing error occurred while executing this phase
See Also:
Phase.execute(FacesContext)

beforePhase

protected void beforePhase(FacesContext context)
Template method. Subclasses can override this. This method will be invoked before the concrete phase is executed. Default implementation does nothing.

Parameters:
context - FacesContext for the current request being processed
Throws:
FacesException - if a processing error occurred while executing this phase

afterPhase

protected void afterPhase(FacesContext context)
Template method. Subclasses can override this. This method will be invoked after the concrete phase is executed. Default implementation does nothing.

Parameters:
context - FacesContext for the current request being processed
Throws:
FacesException - if a processing error occurred while executing this phase

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG