Subversion Repositories bacoAlunos

Rev

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