src/main/java/de/uapcore/lightpit/LightPITModule.java

changeset 31
58f78f0142e8
parent 29
27a0fdd7bca7
child 34
824d4042c857
equal deleted inserted replaced
30:fb30f7b78f9b 31:58f78f0142e8
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 * 27 *
28 */ 28 */
29 package de.uapcore.lightpit; 29 package de.uapcore.lightpit;
30 30
31 import java.lang.annotation.Documented;
32 import java.lang.annotation.ElementType;
33 import java.lang.annotation.Retention;
34 import java.lang.annotation.RetentionPolicy;
35 import java.lang.annotation.Target;
36 import javax.servlet.annotation.WebServlet; 31 import javax.servlet.annotation.WebServlet;
32 import java.lang.annotation.*;
37 33
38 34
39 /** 35 /**
40 * Contains information about a LightPIT module. 36 * Contains information about a LightPIT module.
41 * 37 *
100 * By default this is the same as the menu label. 96 * By default this is the same as the menu label.
101 * 97 *
102 * @return the properties key 98 * @return the properties key
103 */ 99 */
104 String titleKey() default "menuLabel"; 100 String titleKey() default "menuLabel";
105 101
106 /** 102 /**
107 * If set to <code>true</code>, this module is always loaded, but never 103 * If set to <code>true</code>, this module is always loaded, but never
108 * visible in the menu or the Web UI module manager. 104 * visible in the menu or the Web UI module manager.
109 * 105 *
110 * @return true, if this is a system module 106 * @return true, if this is a system module
111 */ 107 */
112 boolean systemModule() default false; 108 boolean systemModule() default false;
113 109
110 /**
111 * Optionally specifies a default priority for this module.
112 * The priority is used to order the menu entries.
113 *
114 * @return an integer priority
115 */
116 int defaultPriority() default 1000;
117
114 /** 118 /**
115 * Class representing the annotation. 119 * Class representing the annotation.
116 * This is necessary, because the EL resolver cannot deal with 120 * This is necessary, because the EL resolver cannot deal with
117 * annotation objects. 121 * annotation objects.
118 * 122 * <p>
119 * Note, that only the properties which are interesting for the JSP pages 123 * Note, that only the properties which are interesting for the JSP pages
120 * are proxied by this object. 124 * are proxied by this object.
121 */ 125 */
122 public static class ELProxy { 126 class ELProxy {
123 private final String bundleBaseName, modulePath, menuKey, titleKey, nameKey, descKey; 127 private final String bundleBaseName, modulePath, menuKey, titleKey, nameKey, descKey;
124 128
125 public static ELProxy convert(LightPITModule annotation) { 129 public static ELProxy convert(LightPITModule annotation) {
126 return new ELProxy( 130 return new ELProxy(
127 annotation.bundleBaseName(), 131 annotation.bundleBaseName(),
128 annotation.modulePath(), 132 annotation.modulePath(),
129 annotation.menuKey(), 133 annotation.menuKey(),

mercurial