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

changeset 21
b213fef2539e
parent 20
bd1a76c91d5b
child 24
8137ec335416
equal deleted inserted replaced
20:bd1a76c91d5b 21:b213fef2539e
58 * @return an array of class names of required modules 58 * @return an array of class names of required modules
59 */ 59 */
60 String[] requires() default {}; 60 String[] requires() default {};
61 61
62 /** 62 /**
63 * The path for this module, which will be used for the menu entry. 63 * The path for this module, which will also be used for the menu entry.
64 * 64 *
65 * This path must adhere to the URL pattern of the Servlet but must not 65 * This path must adhere to the URL pattern of the Servlet but must not
66 * contain any starting or trailing slashes. 66 * contain any starting or trailing slashes.
67 * 67 *
68 * @return the relative module path 68 * @return the relative module path
69 */ 69 */
70 String modulePath(); 70 String modulePath();
71
72 /**
73 * Returns the properties key for the module name.
74 *
75 * @return the properties key
76 */
77 String nameKey() default "name";
78
79 /**
80 * Returns the properties key for the module description.
81 *
82 * @return the properties key
83 */
84 String descKey() default "description";
85
71 86
72 /** 87 /**
73 * Returns the properties key for the menu label. 88 * Returns the properties key for the menu label.
74 * 89 *
75 * Set this string to empty string, if the module should be hidden from 90 * Set this string to empty string, if the module should be hidden from
103 * 118 *
104 * Note, that only the properties which are interesting for the JSP pages 119 * Note, that only the properties which are interesting for the JSP pages
105 * are proxied by this object. 120 * are proxied by this object.
106 */ 121 */
107 public static class ELProxy { 122 public static class ELProxy {
108 private final String bundleBaseName, modulePath, menuKey, titleKey; 123 private final String bundleBaseName, modulePath, menuKey, titleKey, nameKey, descKey;
109 124
110 public static ELProxy convert(LightPITModule annotation) { 125 public static ELProxy convert(LightPITModule annotation) {
111 return new ELProxy( 126 return new ELProxy(
112 annotation.bundleBaseName(), 127 annotation.bundleBaseName(),
113 annotation.modulePath(), 128 annotation.modulePath(),
114 annotation.menuKey(), 129 annotation.menuKey(),
115 annotation.titleKey() 130 annotation.titleKey(),
131 annotation.nameKey(),
132 annotation.descKey()
116 ); 133 );
117 } 134 }
118 135
119 private ELProxy(String bundleBaseName, String modulePath, String menuKey, String titleKey) { 136 private ELProxy(String bundleBaseName, String modulePath, String menuKey, String titleKey, String nameKey, String descKey) {
120 this.bundleBaseName = bundleBaseName; 137 this.bundleBaseName = bundleBaseName;
121 this.modulePath = modulePath; 138 this.modulePath = modulePath;
122 this.menuKey = menuKey; 139 this.menuKey = menuKey;
123 this.titleKey = titleKey; 140 this.titleKey = titleKey;
141 this.nameKey = nameKey;
142 this.descKey = descKey;
124 } 143 }
125 144
126 public String getBundleBaseName() { 145 public String getBundleBaseName() {
127 return bundleBaseName; 146 return bundleBaseName;
128 } 147 }
136 } 155 }
137 156
138 public String getTitleKey() { 157 public String getTitleKey() {
139 return titleKey; 158 return titleKey;
140 } 159 }
160
161 public String getNameKey() {
162 return nameKey;
163 }
164
165 public String getDescKey() {
166 return descKey;
167 }
168
141 } 169 }
142 } 170 }

mercurial