1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package info.magnolia.module.admininterface;
35
36 import info.magnolia.cms.gui.controlx.RenderKitFactory;
37 import info.magnolia.cms.gui.dialog.ControlsManager;
38 import info.magnolia.module.ModuleLifecycle;
39 import info.magnolia.module.ModuleLifecycleContext;
40 import info.magnolia.module.admininterface.config.SecurityConfiguration;
41
42
43
44
45
46
47
48 public class AdminInterfaceModule implements ModuleLifecycle {
49
50 private SecurityConfiguration securityConfiguration;
51
52 private static AdminInterfaceModule instance;
53
54 public AdminInterfaceModule() {
55 instance = this;
56 }
57
58 public void start(ModuleLifecycleContext ctx) {
59 ctx.registerModuleObservingComponent("controls", ControlsManager.getInstance());
60 ctx.registerModuleObservingComponent("dialogs", DialogHandlerManager.getInstance());
61 ctx.registerModuleObservingComponent("pages", PageHandlerManager.getInstance());
62 ctx.registerModuleObservingComponent("trees", TreeHandlerManager.getInstance());
63
64
65 RenderKitFactory.registerRenderKit(RenderKitFactory.ADMIN_INTERFACE_RENDER_KIT, new AdminInterfaceRenderKit());
66 }
67
68 public void stop(ModuleLifecycleContext moduleLifecycleContext) {
69 }
70
71 public SecurityConfiguration getSecurityConfiguration() {
72 return this.securityConfiguration;
73 }
74
75 public void setSecurityConfiguration(SecurityConfiguration securityConfiguration) {
76 this.securityConfiguration = securityConfiguration;
77 }
78
79 public static AdminInterfaceModule getInstance() {
80 return instance;
81 }
82
83 }