Oracle Application Development Framework Lifecycle Java API Reference 10g Release 3 (10.1.3) B25779-01


oracle.adf.controller.v2.lifecycle
Class Lifecycle

java.lang.Object
  extended byoracle.adf.controller.v2.lifecycle.Lifecycle

Direct Known Subclasses:
ADFPhaseListener, LifecycleProcessor

public abstract class Lifecycle
extends java.lang.Object

Processing of the Lifecycle.

It handle the registration of PagePhaseListener and make sure that during execution the listeners are notified of the beforePhase and afterPhase event. This class also delegate the implementation of each of the phase to the PageController.

Since:
10.1.3

Nested Class Summary
protected static class Lifecycle.Phase
          Typesafe enumeration of all existing phases of the Lifecycle.

 

Field Summary
protected static Lifecycle.Phase APPLY_INPUT_VALUES
          The applyInputValues phase.
static int APPLY_INPUT_VALUES_ID
          id of the APPLY_INPUT_VALUES phase.
protected static Lifecycle.Phase INIT_CONTEXT
          The initContext phase.
static int INIT_CONTEXT_ID
          id of the INIT_CONTEXT phase.
protected  java.util.List listeners
          The set of PagePhaseListener registered with this Lifecycle instance
protected static Lifecycle.Phase METADATA_COMMIT
          The metadataCommit phase.
protected static Lifecycle.Phase PREPARE_MODEL
          The prepareModel phase.
static int PREPARE_MODEL_ID
          id of the PREPARE_MODEL phase.
protected static Lifecycle.Phase PREPARE_RENDER
          The prepareRender phase.
static int PREPARE_RENDER_ID
          id of the PREPARE_RENDER phase.
protected static Lifecycle.Phase PROCESS_COMPONENT_EVENTS
          The processComponentEvents phase.
static int PROCESS_COMPONENT_EVENTS_ID
          id of the PROCESS_COMPONENT_EVENTS phase.
protected static Lifecycle.Phase PROCESS_UPDATE_MODEL
          The processUpdateModel phase.
static int PROCESS_UPDATE_MODEL_ID
          id of the PROCESS_UPDATE_MODEL phase.
protected static Lifecycle.Phase VALIDATE_INPUT_VALUES
          The validateInputValues phase.
static int VALIDATE_INPUT_VALUES_ID
          id of the VALIDATE_INPUT_VALUES phase.
protected static Lifecycle.Phase VALIDATE_MODEL_UPDATES
          The validateModelUpdates phase.
static int VALIDATE_MODEL_UPDATES_ID
          id of the VALIDATE_MODEL_UPDATES phase.

 

Constructor Summary
Lifecycle()
           

 

Method Summary
 void addPagePhaseListener(PagePhaseListener listener)
          Add a new PagePhaseListener to the set of registered listeners.
abstract  void execute(java.util.Map envMap)
          Execute all the phases of the Lifecycle and define the order in which each phase is going to be executed.
protected  void executePhase(Lifecycle.Phase phase, LifecycleContext context)
          Helper method to execute a phase.
 PagePhaseListener[] getPagePhaseListeners()
          Return the array of registred PagePhaseListener for this instance of the Lifecycle.
 void removePagePhaseListener(PagePhaseListener listener)
          Deregister an existing PagePhaseListener instance.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

listeners

protected java.util.List listeners
The set of PagePhaseListener registered with this Lifecycle instance

INIT_CONTEXT

protected static final Lifecycle.Phase INIT_CONTEXT
The initContext phase.

PREPARE_MODEL

protected static final Lifecycle.Phase PREPARE_MODEL
The prepareModel phase.

APPLY_INPUT_VALUES

protected static final Lifecycle.Phase APPLY_INPUT_VALUES
The applyInputValues phase.

VALIDATE_INPUT_VALUES

protected static final Lifecycle.Phase VALIDATE_INPUT_VALUES
The validateInputValues phase.

PROCESS_UPDATE_MODEL

protected static final Lifecycle.Phase PROCESS_UPDATE_MODEL
The processUpdateModel phase.

VALIDATE_MODEL_UPDATES

protected static final Lifecycle.Phase VALIDATE_MODEL_UPDATES
The validateModelUpdates phase.

PROCESS_COMPONENT_EVENTS

protected static final Lifecycle.Phase PROCESS_COMPONENT_EVENTS
The processComponentEvents phase.

METADATA_COMMIT

protected static final Lifecycle.Phase METADATA_COMMIT
The metadataCommit phase.

PREPARE_RENDER

protected static final Lifecycle.Phase PREPARE_RENDER
The prepareRender phase.

INIT_CONTEXT_ID

public static final int INIT_CONTEXT_ID
id of the INIT_CONTEXT phase.

PREPARE_MODEL_ID

public static final int PREPARE_MODEL_ID
id of the PREPARE_MODEL phase.

APPLY_INPUT_VALUES_ID

public static final int APPLY_INPUT_VALUES_ID
id of the APPLY_INPUT_VALUES phase.

VALIDATE_INPUT_VALUES_ID

public static final int VALIDATE_INPUT_VALUES_ID
id of the VALIDATE_INPUT_VALUES phase.

PROCESS_UPDATE_MODEL_ID

public static final int PROCESS_UPDATE_MODEL_ID
id of the PROCESS_UPDATE_MODEL phase.

VALIDATE_MODEL_UPDATES_ID

public static final int VALIDATE_MODEL_UPDATES_ID
id of the VALIDATE_MODEL_UPDATES phase.

PROCESS_COMPONENT_EVENTS_ID

public static final int PROCESS_COMPONENT_EVENTS_ID
id of the PROCESS_COMPONENT_EVENTS phase.

PREPARE_RENDER_ID

public static final int PREPARE_RENDER_ID
id of the PREPARE_RENDER phase.

Constructor Detail

Lifecycle

public Lifecycle()

Method Detail

addPagePhaseListener

public void addPagePhaseListener(PagePhaseListener listener)

Add a new PagePhaseListener to the set of registered listeners.

The PagePhaseListener will be notified of each phase with an event before and an event after the execution of the phase.


removePagePhaseListener

public void removePagePhaseListener(PagePhaseListener listener)
Deregister an existing PagePhaseListener instance.

getPagePhaseListeners

public PagePhaseListener[] getPagePhaseListeners()

Return the array of registred PagePhaseListener for this instance of the Lifecycle.


execute

public abstract void execute(java.util.Map envMap)
                      throws java.lang.Exception

Execute all the phases of the Lifecycle and define the order in which each phase is going to be executed.

The current environment is passed anonymously, it contain data the Lifecycle will use to build the LifecycleContext.

Throws:
java.lang.Exception

executePhase

protected void executePhase(Lifecycle.Phase phase,
                            LifecycleContext context)
Helper method to execute a phase. For each listener registered, a beforePhase and afterPhase event is propagated.
Parameters:
phase - the phase to execute
context - the LifecycleContext that will use to call the phase.

Oracle Application Development Framework Lifecycle Java API Reference 10g Release 3 (10.1.3) B25779-01


Copyright © 1997, 2005, Oracle. All rights reserved.