src/java/de/uapcore/lightpit/ModuleManager.java

Sun, 31 Dec 2017 17:43:39 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 31 Dec 2017 17:43:39 +0100
changeset 18
a94b172c3a93
parent 11
737ab27e37b3
child 20
bd1a76c91d5b
permissions
-rw-r--r--

user friendly error pages for codes 404, 403 and 500

6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 /*
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 *
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 * Copyright 2017 Mike Becker. All rights reserved.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 *
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 * Redistribution and use in source and binary forms, with or without
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 * modification, are permitted provided that the following conditions are met:
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 *
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 * 1. Redistributions of source code must retain the above copyright
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 * notice, this list of conditions and the following disclaimer.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 *
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 * 2. Redistributions in binary form must reproduce the above copyright
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 * notice, this list of conditions and the following disclaimer in the
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 * documentation and/or other materials provided with the distribution.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 *
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 * POSSIBILITY OF SUCH DAMAGE.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 *
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 */
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 package de.uapcore.lightpit;
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
31 import java.util.ArrayList;
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
32 import java.util.Collections;
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
33 import java.util.List;
18
a94b172c3a93 user friendly error pages for codes 404, 403 and 500
Mike Becker <universe@uap-core.de>
parents: 11
diff changeset
34 import java.util.Objects;
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
35 import java.util.Optional;
7
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
36 import javax.servlet.Registration;
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 import javax.servlet.ServletContext;
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 import javax.servlet.ServletContextEvent;
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 import javax.servlet.ServletContextListener;
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 import javax.servlet.annotation.WebListener;
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
41 import org.slf4j.Logger;
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
42 import org.slf4j.LoggerFactory;
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 /**
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 * Scans registered servlets for LightPIT modules.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 */
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 @WebListener
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
48 public final class ModuleManager implements ServletContextListener {
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
50 private static final Logger LOG = LoggerFactory.getLogger(ModuleManager.class);
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 /**
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53 * The attribute name in the servlet context under which an instance of this class can be found.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 */
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 public static final String SC_ATTR_NAME = ModuleManager.class.getName();
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
56 private ServletContext sc;
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
58 private final List<Menu> mainMenu = new ArrayList<>();
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
59 private final List<Menu> immutableMainMenu = Collections.unmodifiableList(mainMenu);
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 @Override
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 public void contextInitialized(ServletContextEvent sce) {
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 sc = sce.getServletContext();
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 reloadAll();
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 sc.setAttribute(SC_ATTR_NAME, this);
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 LOG.info("Module manager injected into ServletContext.");
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 }
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 @Override
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 public void contextDestroyed(ServletContextEvent sce) {
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 unloadAll();
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 }
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
74 private Optional<LightPITModule> getModuleInfo(Registration reg) {
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 try {
7
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
76 final Class scclass = Class.forName(reg.getClassName());
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
77
9
20a9b2bc9063 makes LightPITServlet abstract
Mike Becker <universe@uap-core.de>
parents: 8
diff changeset
78 final boolean lpservlet = AbstractLightPITServlet.class.isAssignableFrom(scclass);
7
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
79 final boolean lpmodule = scclass.isAnnotationPresent(LightPITModule.class);
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
80
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
81 if (lpservlet && !lpmodule) {
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
82 LOG.warn(
9
20a9b2bc9063 makes LightPITServlet abstract
Mike Becker <universe@uap-core.de>
parents: 8
diff changeset
83 "{} is a LightPIT Servlet but is missing the module annotation.",
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
84 reg.getClassName()
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
85 );
7
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
86 } else if (!lpservlet && lpmodule) {
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
87 LOG.warn(
9
20a9b2bc9063 makes LightPITServlet abstract
Mike Becker <universe@uap-core.de>
parents: 8
diff changeset
88 "{} is annotated as a LightPIT Module but does not extend {}.",
20a9b2bc9063 makes LightPITServlet abstract
Mike Becker <universe@uap-core.de>
parents: 8
diff changeset
89 reg.getClassName(),
20a9b2bc9063 makes LightPITServlet abstract
Mike Becker <universe@uap-core.de>
parents: 8
diff changeset
90 AbstractLightPITServlet.class.getSimpleName()
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
91 );
7
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
92 }
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
93
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
94 if (lpservlet && lpmodule) {
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
95 final Class<? extends AbstractLightPITServlet> clazz = scclass;
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
96 final LightPITModule moduleInfo = clazz.getAnnotation(LightPITModule.class);
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
97 return Optional.of(moduleInfo);
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
98 } else {
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
99 return Optional.empty();
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
100 }
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101 } catch (ClassNotFoundException ex) {
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
102 LOG.error(
9
20a9b2bc9063 makes LightPITServlet abstract
Mike Becker <universe@uap-core.de>
parents: 8
diff changeset
103 "Servlet registration refers to class {} which cannot be found by the class loader (Reason: {})",
20a9b2bc9063 makes LightPITServlet abstract
Mike Becker <universe@uap-core.de>
parents: 8
diff changeset
104 reg.getClassName(),
20a9b2bc9063 makes LightPITServlet abstract
Mike Becker <universe@uap-core.de>
parents: 8
diff changeset
105 ex.getMessage()
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
106 );
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
107 return Optional.empty();
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108 }
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 }
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110
11
737ab27e37b3 implements simple request mapper
Mike Becker <universe@uap-core.de>
parents: 10
diff changeset
111 private void addModuleToMenu(String moduleClassName, LightPITModule moduleInfo) {
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
112 final Menu menu = new Menu(
11
737ab27e37b3 implements simple request mapper
Mike Becker <universe@uap-core.de>
parents: 10
diff changeset
113 moduleClassName,
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
114 new ResourceKey(moduleInfo.bundleBaseName(), moduleInfo.menuKey()),
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
115 moduleInfo.modulePath()
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
116 );
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
117 mainMenu.add(menu);
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
118 }
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
119
7
598670d5b0b8 core functionality should also use the modules system, changed the code structure accordingly
Mike Becker <universe@uap-core.de>
parents: 6
diff changeset
120 private void handleServletRegistration(String name, Registration reg) {
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
121 final Optional<LightPITModule> moduleInfo = getModuleInfo(reg);
18
a94b172c3a93 user friendly error pages for codes 404, 403 and 500
Mike Becker <universe@uap-core.de>
parents: 11
diff changeset
122 if (moduleInfo.isPresent()) {
a94b172c3a93 user friendly error pages for codes 404, 403 and 500
Mike Becker <universe@uap-core.de>
parents: 11
diff changeset
123 // TODO: implement dependency resolver
11
737ab27e37b3 implements simple request mapper
Mike Becker <universe@uap-core.de>
parents: 10
diff changeset
124
18
a94b172c3a93 user friendly error pages for codes 404, 403 and 500
Mike Becker <universe@uap-core.de>
parents: 11
diff changeset
125 if (!moduleInfo.get().menuKey().isEmpty()) {
a94b172c3a93 user friendly error pages for codes 404, 403 and 500
Mike Becker <universe@uap-core.de>
parents: 11
diff changeset
126 addModuleToMenu(reg.getClassName(), moduleInfo.get());
a94b172c3a93 user friendly error pages for codes 404, 403 and 500
Mike Becker <universe@uap-core.de>
parents: 11
diff changeset
127 }
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
128
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
129 LOG.info("Module detected: {}", name);
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130 } else {
8
2dfdb79b5344 adds slf4j to project as netbeans library (make sure to have it configured in your environment)
Mike Becker <universe@uap-core.de>
parents: 7
diff changeset
131 LOG.debug("Servlet {} is no module, skipping.", name);
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132 }
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133 }
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 /**
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 * Scans for modules and reloads them all.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137 */
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138 public void reloadAll() {
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 sc.getServletRegistrations().forEach(this::handleServletRegistration);
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140 LOG.info("Modules loaded.");
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
141 }
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 /**
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 * Unloads all found modules.
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145 */
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
146 public void unloadAll() {
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
147 mainMenu.clear();
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 LOG.info("All modules unloaded.");
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 }
10
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
150
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
151 /**
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
152 * Returns the main menu.
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
153 * @return a list of menus belonging to the main menu
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
154 */
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
155 public List<Menu> getMainMenu() {
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
156 return immutableMainMenu;
89e3e6e28b69 implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents: 9
diff changeset
157 }
6
da61a1646eba adds module manager
Mike Becker <universe@uap-core.de>
parents:
diff changeset
158 }

mercurial