1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.myfaces.orchestra.viewController;
22
23 /***
24 * Route per-view lifecycle events to the correct user methods.
25 *
26 * <p>The ViewControllerPhaseListener retrieves a concrete implementation of this interface then
27 * invokes it at various processing phases. The concrete implementation is responsible for
28 * determining which methods on which objects (backing beans) should be invoked.</p>
29 *
30 * <p>Orchestra provides a couple of different implementations; see
31 * {@link DefaultViewControllerManager} and {@link ReflectiveViewControllerExecutor}.</p>
32 *
33 * <h2>Defining your own ViewControllerManager</h2>
34 *
35 * <p>If you would like to use your own naming scheme or executor just implement your own {@link ViewControllerManager} or
36 * derive from {@link DefaultViewControllerManager} (the recommended way) and overload
37 * {@link AbstractViewControllerManager#getViewControllerNameMapper()} or
38 * {@link AbstractViewControllerManager#getViewControllerExecutor()} }.</p>
39 *
40 * <p>To activate your manager just configure it as managed bean in your faces-config.xml or your spring
41 * configuration, preferably in application scope or as singleton.</p>
42 *
43 * <p>The managed-bean-name has to be "<code>org.apache.myfaces.orchestra.viewController.ViewControllerManager</code>"
44 * (see constant {@link ViewControllerManager#VIEW_CONTROLLER_MANAGER_NAME})</p>
45 */
46 public interface ViewControllerManager
47 {
48 public final static String VIEW_CONTROLLER_MANAGER_NAME = ViewControllerManager.class.getName();
49
50 public Object getViewController(String viewId);
51 public String getViewControllerName(String viewId);
52
53 public void assertConversationState(String viewId);
54 public void executeInitView(String viewId);
55 public void executePreProcess(String viewId);
56 public void executePreRenderView(String viewId);
57 }