Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Lifecycle Java API Reference 10g Release 3 (10.1.3) B25779-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.adf.controller.v2.context
Class LifecycleContext

`java.lang.Object
oracle.adf.controller.v2.context.LifecycleContext`

Direct Known Subclasses:
  PageLifecycleContext

public class LifecycleContext
extends java.lang.Object

`LifecycleContext` is the base class for all context classes used in the ADF Lifecycle. It contains all the state information that will be kept during the execution of the ADF Lifecycle. It is passed as a parameter of each phase execution.

This context object lives for the duration of the current Lifecycle.

Since:
  10.1.3

Field Summary
`protected java.util.Map` | `envMap` The map used to store the context.
`static java.lang.String` | `PAGE_LIFECYCLE_KEY` Key used to store the PageLifecycle instance in the context map.

Constructor Summary
`LifecycleContext(java.util.Map envMap)` Constructor using a Map.

Method Summary
`RegionBinding` | `getBindingContainer()` Retrieve the RegionBinding instance for the current page.
`BindingContext` | `getBindingContext()` Retrieve the BindingContext object for the current session.
`Environment` | `getEnvironment()` Retrieve the anonymous environment.
`static LifecycleContext` | `getInstance(java.util.Map envMap)` Instanciate the LifecycleContext associated with a PageLifecycle.
`static LifecycleContext` | `getInstance(java.util.Map envMap, PageLifecycle lifecycle)` Instanciate the LifecycleContext associated with a PageLifecycle.
`PageLifecycle` | `getPageController()` Retrieve the PageController from the context map.
`PageLifecycle` | `getPageLifecycle()` Retrieve the PageLifecycle object from the context map.
`PagePhaseListener` | `getPagePhaseListener()` Retrieve the PagePhaseListener from the context map.
`protected java.lang.String` | `getPath()` Retrieve the path info for the current page.
`boolean` | `getPrepareRender()` Return `true` if the `prepareRender` method has been called.
`protected void` | `initControllerClass()` Initialize the `PageController` instance that will be used during this PageLifecycle.
`void` | `prepareRender()` Indicate to the Lifecycle that the next phase to be executed should be PREPARE_RENDER, by-passing any other phase left in the lifecycle.
`void` | `setPageController(PageLifecycle lifeCycle)` Store the PageController Object in the Lifecycle context map.
`void` | `setPageLifecycle(PageLifecycle lifeCycle)` Store a PageLifecycle object in the context map.
`void` | `setPagePhaseListener(PagePhaseListener pagePhaseListener)` Store the PagePhaseListener Object in the Lifecycle context map.

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

Field Detail

### envMap

    protected final java.util.Map envMap

  The map used to store the context.

### PAGE_LIFECYCLE_KEY

    public static final java.lang.String PAGE_LIFECYCLE_KEY

  Key used to store the PageLifecycle instance in the context map.
  See Also:
    Constant Field Values

Constructor Detail

### LifecycleContext

    public LifecycleContext(java.util.Map envMap)

  Constructor using a Map.

Method Detail

### getInstance

    public static LifecycleContext getInstance(java.util.Map envMap)
                                        throws java.lang.Exception

  Instanciate the LifecycleContext associated with a PageLifecycle. The PageLifecycle is stored in the map using the PAGE_LIFECYCLE_KEY key.
  Parameters:
    `envMap` - map containing the lifecycle object
  Returns:
    the LifecycleContext
  Throws:
    `java.lang.Exception`

### getInstance

    public static LifecycleContext getInstance(java.util.Map envMap,
                                               PageLifecycle lifecycle)
                                        throws java.lang.Exception

  Instanciate the LifecycleContext associated with a PageLifecycle. The LifecycleContext class to instanciate is retrieve from the Lifecycle using getLifecycleContextClass().
  Parameters:
    `envMap` - The map of properties that will be used to initialize the context.
    `lifecycle` - The PageLifecycle instance.
  Returns:
    the LifecycleContext
  Throws:
    `java.lang.Exception`

### getEnvironment

    public Environment getEnvironment()

  Retrieve the anonymous environment. Simply delegate to the ADFContext routine.
  See Also:
    `ADFContext.getEnvironment()`

### getBindingContext

    public BindingContext getBindingContext()

  Retrieve the BindingContext object for the current session.

### getBindingContainer

    public RegionBinding getBindingContainer()

  Retrieve the RegionBinding instance for the current page.

### getPath

    protected java.lang.String getPath()

  Retrieve the path info for the current page. Currently using the pathInfo or the servletPath from the request.
  Returns:
    the path for the current page.

### getPageLifecycle

    public PageLifecycle getPageLifecycle()

  Retrieve the PageLifecycle object from the context map.
  Returns:
    Lifecycle object in use for the current request.

### setPageLifecycle

    public void setPageLifecycle(PageLifecycle lifeCycle)

  Store a PageLifecycle object in the context map.
  Parameters:
    `lifeCycle` - Lifecycle object to use for the current request.

### getPageController

    public PageLifecycle getPageController()

  Retrieve the PageController from the context map.
  Returns:
    PageController object in use for the current request.

### setPageController

    public void setPageController(PageLifecycle lifeCycle)

  Store the PageController Object in the Lifecycle context map.
  Parameters:
    `lifeCycle` - PageLifecycle object to use for the current request.

### getPagePhaseListener

    public PagePhaseListener getPagePhaseListener()

  Retrieve the PagePhaseListener from the context map.
  Returns:
    PagePhaseListener object in use for the current request.

### setPagePhaseListener

    public void setPagePhaseListener(PagePhaseListener pagePhaseListener)

  Store the PagePhaseListener Object in the Lifecycle context map.
  Parameters:
    `pagePhaseListener` - PagePhaseListener object to use for the current request.

### getPrepareRender

    public boolean getPrepareRender()

  Return `true` if the `prepareRender` method has been called.

### prepareRender

    public void prepareRender()

  Indicate to the Lifecycle that the next phase to be executed should be PREPARE_RENDER, by-passing any other phase left in the lifecycle.

### initControllerClass

    protected void initControllerClass()

  Initialize the `PageController` instance that will be used during this PageLifecycle. First retrieve the instance, then store it in the context map. The object to use is specified using the ControllerClass property of the PageDefinition xml file. This object can be specified in one of two ways:
  - By using the className of the PageController in which case the object will be created.
  - Using an EL expression pointing to an existing instance of the PageController.
  If the ControllerClass property of the PageDefinition is empty or not of correct type, uses the default PageLifecycle for PageController. The PageController instance is stored in the context using PageController property. If the ControllerClass property is a `PagePhaseListener`, instanciate it and store it in the PagePhaseListener property of the context.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Lifecycle Java API Reference 10g Release 3 (10.1.3) B25779-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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