Package ca.carleton.gcrc.couch.user.mail

Examples of ca.carleton.gcrc.couch.user.mail.UserMailNotificationImpl


      if( null == obj ){
        throw new ServletException("Mail delivery is not specified ("+MailDelivery.ConfigAttributeName_MailDelivery+")");
      }
      if( obj instanceof MailDelivery ){
        MailDelivery mailDelivery = (MailDelivery)obj;
        userMailNotification = new UserMailNotificationImpl(mailDelivery);
      } else {
        throw new ServletException("Unexpected object for mail delivery: "+obj.getClass().getName());
      }
    }
   
View Full Code Here


        throw new ServletException("Unexpected object for document database: "+obj.getClass().getName());
      }
    }
   
    // Mail Delivery
    UserMailNotificationImpl userMailNotification = null;
    {
      Object obj = context.getAttribute(MailDelivery.ConfigAttributeName_MailDelivery);
      if( null == obj ){
        throw new ServletException("Mail delivery is not specified ("+MailDelivery.ConfigAttributeName_MailDelivery+")");
      }
      if( obj instanceof MailDelivery ){
        MailDelivery mailDelivery = (MailDelivery)obj;
        userMailNotification = new UserMailNotificationImpl(mailDelivery);
      } else {
        throw new ServletException("Unexpected object for mail delivery: "+obj.getClass().getName());
      }
     
      // Load e-mail templates
      {
        MailMessageGenerator template = new UserCreationGenerator();
        CouchDbTemplateMailMessageGenerator couchTemplate = new CouchDbTemplateMailMessageGenerator(
            documentDb,
            "org.nunaliit.email_template.user_creation",
            template
            );
        userMailNotification.setUserCreationGenerator(couchTemplate);
      }
      {
        MailMessageGenerator template = new PasswordRecoveryGenerator();
        CouchDbTemplateMailMessageGenerator couchTemplate = new CouchDbTemplateMailMessageGenerator(
            documentDb,
            "org.nunaliit.email_template.password_recovery",
            template
            );
        userMailNotification.setPasswordRecoveryGenerator(couchTemplate);
      }
      {
        MailMessageGenerator template = new PasswordReminderGenerator();
        CouchDbTemplateMailMessageGenerator couchTemplate = new CouchDbTemplateMailMessageGenerator(
            documentDb,
            "org.nunaliit.email_template.password_reminder",
            template
            );
        userMailNotification.setPasswordReminderGenerator(couchTemplate);
      }
    }
   
    // Server Key
    {
View Full Code Here

TOP

Related Classes of ca.carleton.gcrc.couch.user.mail.UserMailNotificationImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.