Rev 205 | Rev 215 | 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; |
214 | jmachado | 4 | import pt.estgp.estgweb.services.announcements.TodoAnnouncementsCommonServices; |
163 | jmachado | 5 | import pt.estgp.estgweb.services.email.EmailCommonServices; |
165 | jmachado | 6 | import pt.estgp.estgweb.services.reminders.RemindersCommonServices; |
205 | jmachado | 7 | import pt.estgp.estgweb.services.blogs.BlogsCommonServices; |
8 | import pt.estgp.estgweb.services.blogs.BlogPostsCommonServices; |
||
9 | import pt.estgp.estgweb.services.courseunits.CourseUnitsCommonServices; |
||
214 | jmachado | 10 | import pt.estgp.estgweb.services.courses.CoursesCommonServices; |
163 | jmachado | 11 | |
90 | jmachado | 12 | /** |
13 | * @author Jorge Machado |
||
14 | * @date 24/Abr/2008 |
||
15 | * @time 15:00:27 |
||
16 | * @see pt.estgp.estgweb.services.common |
||
17 | */ |
||
18 | public enum ModuleEnum |
||
19 | { |
||
20 | |||
156 | jmachado | 21 | |
214 | jmachado | 22 | TodoAnnouncements("module.TodoAnnouncements", new TodoAnnouncementsCommonServices()), |
163 | jmachado | 23 | Announcements("module.Announcements", new AnnouncementsCommonServices()), |
165 | jmachado | 24 | Email("module.Email", new EmailCommonServices()), |
205 | jmachado | 25 | Reminders("module.Reminders", new RemindersCommonServices()), |
26 | Blogs("module.Blogs", new BlogsCommonServices()), |
||
27 | BlogPosts("module.BlogPosts", new BlogPostsCommonServices()), |
||
214 | jmachado | 28 | CourseUnits("module.CourseUnits", new CourseUnitsCommonServices()), |
29 | Courses("module.Courses", new CoursesCommonServices()); |
||
169 | jmachado | 30 | // Questionarios("module.Qustionarios", new QuestionariosCommonServices()); |
165 | jmachado | 31 | |
163 | jmachado | 32 | // Events("module.Events",null), |
33 | // Blogs("module.Blogs",null), |
||
34 | // Proxy("module.Proxy",null); |
||
156 | jmachado | 35 | |
90 | jmachado | 36 | |
163 | jmachado | 37 | IModuleCommonServices moduleCommonServices; |
90 | jmachado | 38 | 1.5.0/docs/api/java/lang/String.html">String messageKey; |
39 | |||
40 | |||
163 | jmachado | 41 | private ModuleEnum(1.5.0/docs/api/java/lang/String.html">String messageKey, IModuleCommonServices moduleCommonServices) |
90 | jmachado | 42 | { |
43 | this.messageKey = messageKey; |
||
163 | jmachado | 44 | this.moduleCommonServices = moduleCommonServices; |
90 | jmachado | 45 | } |
46 | |||
47 | public static ModuleEnum parse(1.5.0/docs/api/java/lang/String.html">String messageKey) |
||
48 | { |
||
163 | jmachado | 49 | for (ModuleEnum module : values()) |
90 | jmachado | 50 | { |
163 | jmachado | 51 | if (messageKey.equals(module.getMessageKey())) |
90 | jmachado | 52 | return module; |
53 | } |
||
54 | return null; |
||
55 | } |
||
56 | |||
57 | public 1.5.0/docs/api/java/lang/String.html">String getMessageKey() |
||
58 | { |
||
59 | return messageKey; |
||
60 | } |
||
163 | jmachado | 61 | |
62 | public IModuleCommonServices getModuleCommonServices() |
||
90 | jmachado | 63 | { |
163 | jmachado | 64 | return moduleCommonServices; |
90 | jmachado | 65 | } |
66 | } |