1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.spi;
20
21 import java.util.List;
22 import java.util.Map;
23 import java.util.ServiceLoader;
24 import javax.faces.FactoryFinder;
25 import javax.faces.context.ExternalContext;
26
27
28
29
30
31
32
33
34
35
36
37
38 public abstract class ServiceProviderFinder
39 {
40 public static final String[] KNOWN_SERVICES =
41 {
42 FactoryFinder.APPLICATION_FACTORY,
43 FactoryFinder.CLIENT_WINDOW_FACTORY,
44 FactoryFinder.EXCEPTION_HANDLER_FACTORY,
45 FactoryFinder.EXTERNAL_CONTEXT_FACTORY,
46 FactoryFinder.FACELET_CACHE_FACTORY,
47 FactoryFinder.FACES_CONTEXT_FACTORY,
48 FactoryFinder.FLASH_FACTORY,
49 FactoryFinder.FLOW_HANDLER_FACTORY,
50 FactoryFinder.LIFECYCLE_FACTORY,
51 FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY,
52 FactoryFinder.RENDER_KIT_FACTORY,
53 FactoryFinder.TAG_HANDLER_DELEGATE_FACTORY,
54 FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY,
55 FactoryFinder.VISIT_CONTEXT_FACTORY,
56 "org.apache.myfaces.spi.AnnotationProvider",
57 "org.apache.myfaces.spi.AnnotationProviderFactory",
58 "org.apache.myfaces.spi.FaceletConfigResourceProvider",
59 "org.apache.myfaces.spi.FaceletConfigResourceProviderFactory",
60 "org.apache.myfaces.spi.FacesConfigResourceProvider",
61 "org.apache.myfaces.spi.FacesConfigResourceProviderFactory",
62 "org.apache.myfaces.spi.FacesConfigurationMerger",
63 "org.apache.myfaces.spi.FacesConfigurationMergerFactory",
64 "org.apache.myfaces.spi.FacesConfigurationProvider",
65 "org.apache.myfaces.spi.FacesConfigurationProviderFactory",
66 "org.apache.myfaces.spi.FacesFlowProvider",
67 "org.apache.myfaces.spi.FacesFlowProviderFactory",
68 "org.apache.myfaces.spi.FactoryFinderProvider",
69 "org.apache.myfaces.spi.FactoryFinderProviderFactory",
70 "org.apache.myfaces.spi.InjectionProvider",
71 "org.apache.myfaces.spi.InjectionProviderFactory",
72 "org.apache.myfaces.spi.ResourceLibraryContractsProvider",
73 "org.apache.myfaces.spi.ResourceLibraryContractsProviderFactory",
74 "org.apache.myfaces.spi.ViewScopeProvider",
75 "org.apache.myfaces.spi.ViewScopeProviderFactory",
76 "org.apache.myfaces.spi.WebConfigProvider",
77 "org.apache.myfaces.spi.WebConfigProviderFactory",
78 "org.apache.myfaces.config.annotation.LifecycleProvider",
79 "org.apache.myfaces.config.annotation.LifecycleProviderFactory",
80 };
81
82
83
84
85
86
87
88
89 public abstract List<String> getServiceProviderList(String spiClass);
90
91 public <S> ServiceLoader<S> load(Class<S> spiClass)
92 {
93 return ServiceLoader.load(spiClass);
94 }
95
96
97
98
99
100
101
102
103
104
105
106 public void initKnownServiceProviderMapInfo(ExternalContext ectx, Map<String, List<String>> map)
107 {
108 }
109
110 public Map<String, List<String>> calculateKnownServiceProviderMapInfo(ExternalContext ectx,
111 String[] knownServices)
112 {
113
114
115
116
117
118
119 return null;
120 }
121 }