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

changeset 21
b213fef2539e
parent 20
bd1a76c91d5b
child 24
8137ec335416
--- a/src/java/de/uapcore/lightpit/LightPITModule.java	Sat Mar 31 19:35:04 2018 +0200
+++ b/src/java/de/uapcore/lightpit/LightPITModule.java	Sun Apr 01 18:16:47 2018 +0200
@@ -60,7 +60,7 @@
     String[] requires() default {};
     
     /**
-     * The path for this module, which will be used for the menu entry.
+     * The path for this module, which will also be used for the menu entry.
      * 
      * This path must adhere to the URL pattern of the Servlet but must not
      * contain any starting or trailing slashes.
@@ -70,6 +70,21 @@
     String modulePath();
     
     /**
+     * Returns the properties key for the module name.
+     * 
+     * @return the properties key
+     */
+    String nameKey() default "name";
+    
+    /**
+     * Returns the properties key for the module description.
+     * 
+     * @return the properties key
+     */
+    String descKey() default "description";
+    
+    
+    /**
      * Returns the properties key for the menu label.
      * 
      * Set this string to empty string, if the module should be hidden from
@@ -105,22 +120,26 @@
      * are proxied by this object.
      */
     public static class ELProxy {
-        private final String bundleBaseName, modulePath, menuKey, titleKey;
+        private final String bundleBaseName, modulePath, menuKey, titleKey, nameKey, descKey;
         
         public static ELProxy convert(LightPITModule annotation) {
             return new ELProxy(
                     annotation.bundleBaseName(),
                     annotation.modulePath(),
                     annotation.menuKey(),
-                    annotation.titleKey()
+                    annotation.titleKey(),
+                    annotation.nameKey(),
+                    annotation.descKey()
             );
         }
 
-        private ELProxy(String bundleBaseName, String modulePath, String menuKey, String titleKey) {
+        private ELProxy(String bundleBaseName, String modulePath, String menuKey, String titleKey, String nameKey, String descKey) {
             this.bundleBaseName = bundleBaseName;
             this.modulePath = modulePath;
             this.menuKey = menuKey;
             this.titleKey = titleKey;
+            this.nameKey = nameKey;
+            this.descKey = descKey;
         }
 
         public String getBundleBaseName() {
@@ -138,5 +157,14 @@
         public String getTitleKey() {
             return titleKey;
         }
+
+        public String getNameKey() {
+            return nameKey;
+        }
+
+        public String getDescKey() {
+            return descKey;
+        }
+        
     }
 }

mercurial