Package com.sparc.knappsack.models

Examples of com.sparc.knappsack.models.EmailModel


    public boolean sendApplicationVersionErrorEmail(Long applicationVersionId, List<Long> users) {
        boolean success = false;
        if (applicationVersionId != null && users != null) {
            List<EmailModel> emailModels = new ArrayList<EmailModel>();
            for (Long user : users) {
                EmailModel model = new EmailModel();
                model.setEventType(EventType.APPLICATION_VERSION_STATE_CHANGED);
                model.getParams().put("applicationVersionId", applicationVersionId);
                model.getParams().put("userId", user);

                emailModels.add(model);
            }

            int numSent = sendBatchMessagesToQueue(emailModels);
View Full Code Here


    public boolean sendApplicationVersionResignCompleteEmail(Long applicationVersionId, boolean resignSuccess, ResignErrorType resignErrorType, List<Long> users) {
        boolean success = false;
        if (applicationVersionId != null && users != null) {
            List<EmailModel> emailModels = new ArrayList<EmailModel>();
            for (Long user : users) {
                EmailModel model = new EmailModel();
                model.setEventType(EventType.APPLICATION_VERSION_RESIGN_COMPLETE);
                model.getParams().put("applicationVersionId", applicationVersionId);
                model.getParams().put("resignSuccess", resignSuccess);
                model.getParams().put("resignErrorType", resignErrorType);
                model.getParams().put("userId", user);

                emailModels.add(model);
            }

            int numSent = sendBatchMessagesToQueue(emailModels);
View Full Code Here

    @Override
    public boolean sendDomainAccessRequestEmail(Long domainRequestId) {
        boolean success = false;
        if (domainRequestId != null) {
            EmailModel model = new EmailModel();
            model.setEventType(EventType.DOMAIN_ACCESS_REQUEST);
            model.getParams().put("domainRequestId", domainRequestId);

            success = sendMessageToQueue(model);
        }
        return success;
    }
View Full Code Here

        String threadName = Thread.currentThread().getName();
        log.info(String.format("SQS thread working: %s", threadName));

        for (Message message : receiveMessagesFromQueue(10)) {
            boolean success = false;
            EmailModel emailModel = JsonUtil.unmarshall(message.getBody(), EmailModel.class);
            convertIntegersToLongs(emailModel);
            if (emailModel != null) {
                SQSEventDelivery deliveryMechanism = sqsEventDeliveryFactory.getEventDelivery(emailModel.getEventType());
                if (deliveryMechanism != null) {
                    success = deliveryMechanism.sendNotifications(emailModel);
                }

                if (success) {
View Full Code Here

    @Override
    public boolean sendDomainUserAccessRequestEmail(Long domainUserRequestId) {
        boolean success = false;
        if (domainUserRequestId != null) {
            EmailModel model = new EmailModel();
            model.setEventType(EventType.DOMAIN_USER_ACCESS_REQUEST);
            model.getParams().put("domainUserRequestId", domainUserRequestId);

            success = sendMessageToQueue(model);
        }
        return success;
    }
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.models.EmailModel

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.