22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
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 javax.servlet.annotation.WebServlet; |
31 import javax.servlet.annotation.WebServlet; |
32 import java.lang.annotation.*; |
32 import java.lang.annotation.*; |
33 |
33 |
34 |
34 |
35 /** |
35 /** |
36 * Contains information about a LightPIT module. |
36 * Contains information about a LightPIT module. |
37 * |
37 * <p> |
38 * This annotation is typically used to annotate the {@link WebServlet} which |
38 * This annotation is typically used to annotate the {@link WebServlet} which |
39 * implements the module's functionality. |
39 * implements the module's functionality. |
40 */ |
40 */ |
41 @Documented |
41 @Documented |
42 @Retention(RetentionPolicy.RUNTIME) |
42 @Retention(RetentionPolicy.RUNTIME) |
43 @Target(ElementType.TYPE) |
43 @Target(ElementType.TYPE) |
44 public @interface LightPITModule { |
44 public @interface LightPITModule { |
45 /** |
45 /** |
46 * Base name of the module specific resource bundle. |
46 * Base name of the module specific resource bundle. |
|
47 * |
47 * @return a base name suitable for the JSTL tag 'setBundle'. |
48 * @return a base name suitable for the JSTL tag 'setBundle'. |
48 */ |
49 */ |
49 String bundleBaseName(); |
50 String bundleBaseName(); |
50 |
51 |
51 /** |
52 /** |
52 * An array of required modules, identified by the string representation of |
53 * An array of required modules, identified by the string representation of |
53 * their class names. |
54 * their class names. |
|
55 * |
54 * @return an array of class names of required modules |
56 * @return an array of class names of required modules |
55 */ |
57 */ |
56 String[] requires() default {}; |
58 String[] requires() default {}; |
57 |
59 |
58 /** |
60 /** |
59 * The path for this module, which will also be used for the menu entry. |
61 * The path for this module, which will also be used for the menu entry. |
60 * |
62 * <p> |
61 * This path must adhere to the URL pattern of the Servlet but must not |
63 * This path must adhere to the URL pattern of the Servlet but must not |
62 * contain any starting or trailing slashes. |
64 * contain any starting or trailing slashes. |
63 * |
65 * |
64 * @return the relative module path |
66 * @return the relative module path |
65 */ |
67 */ |
66 String modulePath(); |
68 String modulePath(); |
67 |
69 |
68 /** |
70 /** |
69 * Returns the properties key for the module name. |
71 * Returns the properties key for the module name. |
70 * |
72 * |
71 * @return the properties key |
73 * @return the properties key |
72 */ |
74 */ |
73 String nameKey() default "name"; |
75 String nameKey() default "name"; |
74 |
76 |
75 /** |
77 /** |
76 * Returns the properties key for the module description. |
78 * Returns the properties key for the module description. |
77 * |
79 * |
78 * @return the properties key |
80 * @return the properties key |
79 */ |
81 */ |
80 String descKey() default "description"; |
82 String descKey() default "description"; |
81 |
83 |
82 |
84 |
83 /** |
85 /** |
84 * Returns the properties key for the menu label. |
86 * Returns the properties key for the menu label. |
85 * |
87 * <p> |
86 * Set this string to empty string, if the module should be hidden from |
88 * Set this string to empty string, if the module should be hidden from |
87 * the menu. |
89 * the menu. |
88 * |
90 * |
89 * @return the properties key |
91 * @return the properties key |
90 */ |
92 */ |
91 String menuKey() default "menuLabel"; |
93 String menuKey() default "menuLabel"; |
92 |
94 |
93 /** |
95 /** |
94 * Returns the properties key for the page title. |
96 * Returns the properties key for the page title. |
95 * |
97 * <p> |
96 * By default this is the same as the menu label. |
98 * By default this is the same as the menu label. |
97 * |
99 * |
98 * @return the properties key |
100 * @return the properties key |
99 */ |
101 */ |
100 String titleKey() default "menuLabel"; |
102 String titleKey() default "menuLabel"; |
101 |
103 |
102 /** |
104 /** |