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

changeset 31
58f78f0142e8
parent 29
27a0fdd7bca7
child 34
824d4042c857
--- a/src/main/java/de/uapcore/lightpit/LightPITModule.java	Sat May 09 14:37:15 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/LightPITModule.java	Sat May 09 14:58:20 2020 +0200
@@ -28,12 +28,8 @@
  */
 package de.uapcore.lightpit;
 
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
 import javax.servlet.annotation.WebServlet;
+import java.lang.annotation.*;
 
 
 /**
@@ -102,26 +98,34 @@
      * @return the properties key
      */
     String titleKey() default "menuLabel";
-    
+
     /**
      * If set to <code>true</code>, this module is always loaded, but never
      * visible in the menu or the Web UI module manager.
-     * 
+     *
      * @return true, if this is a system module
      */
     boolean systemModule() default false;
-    
+
+    /**
+     * Optionally specifies a default priority for this module.
+     * The priority is used to order the menu entries.
+     *
+     * @return an integer priority
+     */
+    int defaultPriority() default 1000;
+
     /**
      * Class representing the annotation.
      * This is necessary, because the EL resolver cannot deal with
      * annotation objects.
-     * 
+     * <p>
      * Note, that only the properties which are interesting for the JSP pages
      * are proxied by this object.
      */
-    public static class ELProxy {
+    class ELProxy {
         private final String bundleBaseName, modulePath, menuKey, titleKey, nameKey, descKey;
-        
+
         public static ELProxy convert(LightPITModule annotation) {
             return new ELProxy(
                     annotation.bundleBaseName(),

mercurial