Subversion Repositories bacoAlunos

Rev

Rev 165 | Rev 205 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package pt.estgp.estgweb.services.common;

import pt.estgp.estgweb.services.announcements.AnnouncementsCommonServices;
import pt.estgp.estgweb.services.email.EmailCommonServices;
import pt.estgp.estgweb.services.reminders.RemindersCommonServices;

/**
 * @author Jorge Machado
 * @date 24/Abr/2008
 * @time 15:00:27
 * @see pt.estgp.estgweb.services.common
 */

public enum ModuleEnum
{


    Announcements("module.Announcements", new AnnouncementsCommonServices()),
    Email("module.Email", new EmailCommonServices()),
    Reminders("module.Reminders", new RemindersCommonServices());
//    Questionarios("module.Qustionarios", new QuestionariosCommonServices());

//    Events("module.Events",null),
//    Blogs("module.Blogs",null),
//    Proxy("module.Proxy",null);


    IModuleCommonServices moduleCommonServices;
    1.5.0/docs/api/java/lang/String.html">String messageKey;


    private ModuleEnum(1.5.0/docs/api/java/lang/String.html">String messageKey, IModuleCommonServices moduleCommonServices)
    {
        this.messageKey = messageKey;
        this.moduleCommonServices = moduleCommonServices;
    }

    public static ModuleEnum parse(1.5.0/docs/api/java/lang/String.html">String messageKey)
    {
        for (ModuleEnum module : values())
        {
            if (messageKey.equals(module.getMessageKey()))
                return module;
        }
        return null;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getMessageKey()
    {
        return messageKey;
    }
   
    public IModuleCommonServices getModuleCommonServices()
    {
        return moduleCommonServices;
    }
}