Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle
11g Release 1 (11.1.1.4.0)

E10652-05

oracle.adf.controller.v2.lifecycle
Class PageLifecycle

java.lang.Object
  extended by oracle.adf.controller.v2.lifecycle.Phases
      extended by oracle.adf.controller.v2.lifecycle.PageLifecycle
Direct Known Subclasses:
PageController, PageLifecycleImpl, StubPageLifecycleImpl

public abstract class PageLifecycle
extends Phases

The PageLifecycle class is the base class for any ADF Lifecycle. It defines a set of behavior that an ADF Lifecycle needs in addition to the Phases.

Since:
10.1.3

Field Summary
protected  java.lang.Class clazz
          The Class instance for this class (PageLifecycle).
protected  java.lang.Class[] eventParam
          The set of argument type classes for the reflected event method call.
protected  java.util.Map events
          Cache the set of event methods as they are introspected.
 
Constructor Summary
PageLifecycle()
           
 
Method Summary
abstract  void executeEvent(PageLifecycleContext context, java.lang.String event, oracle.adf.model.OperationBinding actionBinding)
          Execute a single event.
abstract  void findForward(PageLifecycleContext context)
          The path of the next web page is identified using the forwardPath property on the PageLifecycleContext.
protected static java.lang.reflect.Method getEventMethodFromCache(java.util.Map events, java.lang.Class clazz, java.lang.Class[] eventParams, java.lang.String eventName)
          Internal Event methods are cached so that introspection is only done once.
 java.lang.Class getLifecycleContextClass()
          Returns the LifecycleContext class used by this PageLifecycle.
abstract  void handleError(PageLifecycleContext context, java.lang.Exception ex)
          Handles any exceptions that occurred during the PageLifecycle processing.
abstract  boolean hasErrors(PageLifecycleContext context)
          Return true if an error occured during validation.
abstract  void initializeMethodParameters(PageLifecycleContext context, oracle.adf.model.OperationBinding actionBinding)
          This method is invoked before any ControlBinding or custom method is being executed.
abstract  void reportErrors(PageLifecycleContext context)
          Provide the opportunity to build an error list in a format appropriate to the view layer.
abstract  boolean shouldAllowModelUpdate(PageLifecycleContext context)
          This method is called during the processUpdateModel phase.
 
Methods inherited from class oracle.adf.controller.v2.lifecycle.Phases
applyInputValues, initContext, metadataCommit, prepareModel, prepareRender, processComponentEvents, processUpdateModel, validateInputValues, validateModelUpdates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

events

protected java.util.Map events
Cache the set of event methods as they are introspected.


clazz

protected java.lang.Class clazz
The Class instance for this class (PageLifecycle).


eventParam

protected java.lang.Class[] eventParam
The set of argument type classes for the reflected event method call.

Constructor Detail

PageLifecycle

public PageLifecycle()
Method Detail

getLifecycleContextClass

public java.lang.Class getLifecycleContextClass()
Returns the LifecycleContext class used by this PageLifecycle. Any PageLifecycle subclass can have their own context by subclassing PageLifecycleContext.


executeEvent

public abstract void executeEvent(PageLifecycleContext context,
                                  java.lang.String event,
                                  oracle.adf.model.OperationBinding actionBinding)
Execute a single event.

See Also:
handleEvent.

handleError

public abstract void handleError(PageLifecycleContext context,
                                 java.lang.Exception ex)
Handles any exceptions that occurred during the PageLifecycle processing. Clients have an opportunity to merge the exception with the model errors stored in the BindingContainer.


hasErrors

public abstract boolean hasErrors(PageLifecycleContext context)
Return true if an error occured during validation.


reportErrors

public abstract void reportErrors(PageLifecycleContext context)
Provide the opportunity to build an error list in a format appropriate to the view layer.


shouldAllowModelUpdate

public abstract boolean shouldAllowModelUpdate(PageLifecycleContext context)
This method is called during the processUpdateModel phase. It provides a way to programmatically by-pass model updates. The data model updates are disabled when specific action like 'rollback' will be executed during the lifecycle. This is done by calling the ignoreUpdates method or each action in the event list. The custom method ignoreUpdates is also called. Bypassing update might be necessary for operations such as rollback or custom methods that want to veto the change.
Overide this method if you need to add logic to skip data model updates.

See Also:
JUCtrlActionBinding.ignoreUpdates()

initializeMethodParameters

public abstract void initializeMethodParameters(PageLifecycleContext context,
                                                oracle.adf.model.OperationBinding actionBinding)
This method is invoked before any ControlBinding or custom method is being executed. Overriding this method gives an opportunity to set the parameters.

Parameters:
context - the PageLifecycle context
actionBinding - the action binding object to initialize

findForward

public abstract void findForward(PageLifecycleContext context)
                          throws java.lang.Exception
The path of the next web page is identified using the forwardPath property on the PageLifecycleContext. If the redirect property on the PageLifecycleContext is true, the response will be redirected to the specified path. Otherwise, the request will be forwarded to the specified path.

Throws:
java.lang.Exception

getEventMethodFromCache

protected static final java.lang.reflect.Method getEventMethodFromCache(java.util.Map events,
                                                                        java.lang.Class clazz,
                                                                        java.lang.Class[] eventParams,
                                                                        java.lang.String eventName)
Internal Event methods are cached so that introspection is only done once.


Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle
11g Release 1 (11.1.1.4.0)

E10652-05

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