1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.services.information;
18
19 import java.util.Map;
20
21 import javax.servlet.ServletConfig;
22
23 import org.apache.pluto.factory.Factory;
24 import org.apache.pluto.services.information.DynamicInformationProvider;
25 import org.apache.pluto.services.information.InformationProviderService;
26 import org.apache.pluto.services.information.StaticInformationProvider;
27
28 /***
29 * Factory class for getting Information Provider access
30 *
31 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
32 * @version $Id: InformationProviderServiceImpl.java 517124 2007-03-12 08:10:25Z ate $
33 */
34 public class InformationProviderServiceImpl implements Factory, InformationProviderService
35 {
36 private javax.servlet.ServletConfig servletConfig;
37 private final StaticInformationProvider staticInformationProvider;
38
39 public InformationProviderServiceImpl(StaticInformationProvider staticInformationProvider, ServletConfig config)
40 {
41 this.staticInformationProvider = staticInformationProvider;
42
43 }
44
45 public void init(ServletConfig config, Map properties) throws Exception
46 {
47
48 }
49
50 public StaticInformationProvider getStaticProvider()
51 {
52 return staticInformationProvider;
53 }
54
55 public DynamicInformationProvider getDynamicProvider(javax.servlet.http.HttpServletRequest request)
56 {
57 DynamicInformationProvider provider =
58 (DynamicInformationProvider) request.getAttribute("org.apache.jetspeed.engine.core.DynamicInformationProvider");
59
60 if (provider == null)
61 {
62 provider = new DynamicInformationProviderImpl(request, servletConfig);
63 request.setAttribute("org.apache.jetspeed.engine.core.DynamicInformationProvider", provider);
64 }
65
66 return provider;
67 }
68
69 /***
70 * <p>
71 * destroy
72 * </p>
73 *
74 * @see org.apache.pluto.factory.Factory#destroy()
75 * @throws java.lang.Exception
76 */
77 public void destroy() throws Exception
78 {
79
80 }
81 }