Rev 165 | Rev 205 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
90 | jmachado | 1 | package pt.estgp.estgweb.services.common; |
2 | |||
163 | jmachado | 3 | import pt.estgp.estgweb.services.announcements.AnnouncementsCommonServices; |
4 | import pt.estgp.estgweb.services.email.EmailCommonServices; |
||
165 | jmachado | 5 | import pt.estgp.estgweb.services.reminders.RemindersCommonServices; |
163 | jmachado | 6 | |
90 | jmachado | 7 | /** |
8 | * @author Jorge Machado |
||
9 | * @date 24/Abr/2008 |
||
10 | * @time 15:00:27 |
||
11 | * @see pt.estgp.estgweb.services.common |
||
12 | */ |
||
13 | public enum ModuleEnum |
||
14 | { |
||
15 | |||
156 | jmachado | 16 | |
163 | jmachado | 17 | Announcements("module.Announcements", new AnnouncementsCommonServices()), |
165 | jmachado | 18 | Email("module.Email", new EmailCommonServices()), |
19 | Reminders("module.Reminders", new RemindersCommonServices()); |
||
169 | jmachado | 20 | // Questionarios("module.Qustionarios", new QuestionariosCommonServices()); |
165 | jmachado | 21 | |
163 | jmachado | 22 | // Events("module.Events",null), |
23 | // Blogs("module.Blogs",null), |
||
24 | // Proxy("module.Proxy",null); |
||
156 | jmachado | 25 | |
90 | jmachado | 26 | |
163 | jmachado | 27 | IModuleCommonServices moduleCommonServices; |
90 | jmachado | 28 | 1.5.0/docs/api/java/lang/String.html">String messageKey; |
29 | |||
30 | |||
163 | jmachado | 31 | private ModuleEnum(1.5.0/docs/api/java/lang/String.html">String messageKey, IModuleCommonServices moduleCommonServices) |
90 | jmachado | 32 | { |
33 | this.messageKey = messageKey; |
||
163 | jmachado | 34 | this.moduleCommonServices = moduleCommonServices; |
90 | jmachado | 35 | } |
36 | |||
37 | public static ModuleEnum parse(1.5.0/docs/api/java/lang/String.html">String messageKey) |
||
38 | { |
||
163 | jmachado | 39 | for (ModuleEnum module : values()) |
90 | jmachado | 40 | { |
163 | jmachado | 41 | if (messageKey.equals(module.getMessageKey())) |
90 | jmachado | 42 | return module; |
43 | } |
||
44 | return null; |
||
45 | } |
||
46 | |||
47 | public 1.5.0/docs/api/java/lang/String.html">String getMessageKey() |
||
48 | { |
||
49 | return messageKey; |
||
50 | } |
||
163 | jmachado | 51 | |
52 | public IModuleCommonServices getModuleCommonServices() |
||
90 | jmachado | 53 | { |
163 | jmachado | 54 | return moduleCommonServices; |
90 | jmachado | 55 | } |
56 | } |