View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
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  }