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 import javax.faces.context.FacesContext;
24
25 /***
26 * <p>Various utilities used by the viewController framework</p>
27 * <p>Notice: this class is not meant to be used outside of this library</p>
28 */
29 public final class _ViewControllerUtils
30 {
31 private final static ViewControllerManager DEFAULT_VCM = new DefaultViewControllerManager();
32
33 private _ViewControllerUtils()
34 {
35 }
36
37 public static ViewControllerManager getViewControllerManager(FacesContext context)
38 {
39 ViewControllerManager manager = (ViewControllerManager) context.getApplication().getVariableResolver().resolveVariable(context, ViewControllerManager.VIEW_CONTROLLER_MANAGER_NAME);
40 if (manager != null)
41 {
42 return manager;
43 }
44
45 return DEFAULT_VCM;
46 }
47 }