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

changeset 11
737ab27e37b3
parent 10
89e3e6e28b69
child 18
a94b172c3a93
equal deleted inserted replaced
10:89e3e6e28b69 11:737ab27e37b3
69 */ 69 */
70 String modulePath(); 70 String modulePath();
71 71
72 /** 72 /**
73 * Returns the properties key for the menu label. 73 * Returns the properties key for the menu label.
74 * @return the properties key relative to the base name 74 * @return the properties key
75 */ 75 */
76 String menuKey() default "menuLabel"; 76 String menuKey() default "menuLabel";
77
78 /**
79 * Returns the properties key for the page title.
80 *
81 * By default this is the same as the menu label.
82 *
83 * @return the properties key
84 */
85 String titleKey() default "menuLabel";
86
87 /**
88 * Class representing the annotation.
89 * This is necessary, because the EL resolver cannot deal with
90 * annotation objects.
91 *
92 * Note, that only the properties which are interesting for the JSP pages
93 * are proxied by this object.
94 */
95 public static class ELProxy {
96 private final String bundleBaseName, modulePath, menuKey, titleKey;
97
98 public static ELProxy convert(LightPITModule annotation) {
99 return new ELProxy(
100 annotation.bundleBaseName(),
101 annotation.modulePath(),
102 annotation.menuKey(),
103 annotation.titleKey()
104 );
105 }
106
107 private ELProxy(String bundleBaseName, String modulePath, String menuKey, String titleKey) {
108 this.bundleBaseName = bundleBaseName;
109 this.modulePath = modulePath;
110 this.menuKey = menuKey;
111 this.titleKey = titleKey;
112 }
113
114 public String getBundleBaseName() {
115 return bundleBaseName;
116 }
117
118 public String getMenuKey() {
119 return menuKey;
120 }
121
122 public String getModulePath() {
123 return modulePath;
124 }
125
126 public String getTitleKey() {
127 return titleKey;
128 }
129 }
77 } 130 }

mercurial