Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.myfaces.orchestra.viewController
Class AbstractViewControllerManager

    java.lang.Object
      org.apache.myfaces.orchestra.viewController.AbstractViewControllerManager

All Implemented Interfaces:
  ViewControllerManager

Direct Known Subclasses:
  AbstractAnnotationsViewControllerManager, DefaultViewControllerManager

    public abstract class AbstractViewControllerManager

extends Object
implements ViewControllerManager

A partial implementation of the ViewControllerManager interface which allows subclasses to just implement two simple abstract methods in order to provide a fully functional ViewControllerManager implementation.

This implementation splits responsibility for invoking view lifecycle events into three parts:

- A "name mapper" that maps a view identifier to a bean name
- An "executor" that decides which methods on a bean to invoke, and
- A controller that invokes the mapper and executor.

This class implements the "controller" bit itself, and leaves subclasses to just choose the "name mapper" and "executor" to use by overriding the abstract methods defined here.

Field Summary

Fields inherited from interface org.apache.myfaces.orchestra.viewController.ViewControllerManager
`VIEW_CONTROLLER_MANAGER_NAME`

Constructor Summary
`AbstractViewControllerManager()`

Method Summary
`void` | `assertConversationState(String viewId)` Check whether any conversations required for the specified view currently exist.
`void` | `executeInitView(String viewId)` This method is guaranteed to be called before any other lifecycle method (ie any of the other execute* methods on this interface.
`void` | `executePreProcess(String viewId)` This method is called at most once per request for each view.
`void` | `executePreRenderView(String viewId)` This method is called just before a view is required to render its representation back to the user.
`Object` | `getViewController(String viewId)`
`protected abstract ViewControllerExecutor` | `getViewControllerExecutor()`
`String` | `getViewControllerName(String viewId)`
`protected abstract ViewControllerNameMapper` | `getViewControllerNameMapper()`

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

Constructor Detail

### AbstractViewControllerManager

    public AbstractViewControllerManager()

Method Detail

### getViewControllerNameMapper

    protected abstract ViewControllerNameMapper getViewControllerNameMapper()

### getViewControllerExecutor

    protected abstract ViewControllerExecutor getViewControllerExecutor()

### getViewControllerName

    public String getViewControllerName(String viewId)

  Specified by:
    `getViewControllerName` in interface `ViewControllerManager`

### getViewController

    public Object getViewController(String viewId)

  Specified by:
    `getViewController` in interface `ViewControllerManager`

### assertConversationState

    public void assertConversationState(String viewId)

  Description copied from interface: `ViewControllerManager`
  Check whether any conversations required for the specified view currently exist.

  TODO: Consider renaming this method. It is very Orchestra-specific, although this ViewController framework is supposed to be generic. In fact this method is really just a "validate view" hook, and one of the validations that can be hooked in here is a conversation-check.

  Specified by:
    `assertConversationState` in interface `ViewControllerManager`

### executeInitView

    public void executeInitView(String viewId)

  Description copied from interface: `ViewControllerManager`
  This method is guaranteed to be called before any other lifecycle method (ie any of the other execute* methods on this interface. It is also guaranteed to be called before any expression in a page is evaluated.

  For component-based frameworks, the component tree may not yet exist.

  Specified by:
    `executeInitView` in interface `ViewControllerManager`

### executePreProcess

    public void executePreProcess(String viewId)

  Description copied from interface: `ViewControllerManager`
  This method is called at most once per request for each view.

  For component-based frameworks, this method gets called after all components have transferred their state into associated backing beans. If validation errors have occurred within the view, then this method is not invoked.

  Specified by:
    `executePreProcess` in interface `ViewControllerManager`

### executePreRenderView

    public void executePreRenderView(String viewId)

  Description copied from interface: `ViewControllerManager`
  This method is called just before a view is required to render its representation back to the user.

  If a view X handles a "postback" event, and then navigates to a different view Y then this callback does not occur for the controller bean for view X, but does get invoked for the controller bean for view Y.

  For component-based frameworks, the component tree may not yet exist at the time this method is invoked.

  Specified by:
    `executePreRenderView` in interface `ViewControllerManager`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation. All Rights Reserved.