Package com.sparc.knappsack.comparators

Examples of com.sparc.knappsack.comparators.LanguageComparator


                    regions.add(regionModel);
                }
            }
            model.addAttribute("regions", regions);
            List<Language> languages = Arrays.asList(Language.values());
            Collections.sort(languages, new LanguageComparator());
            model.addAttribute("languages", languages);

            return "domain_public_requestTH";
        } else {
            return "redirect:/auth/register";
View Full Code Here


                        ctx.setVariable("requesterDeviceType", domainRequest.getDeviceType());
                        ctx.setVariable("requesterRegion", domainRequest.getRegion());

                        List<Language> languages = new ArrayList<Language>();
                        languages.addAll(domainRequest.getLanguages());
                        Collections.sort(languages, new LanguageComparator());
                        ctx.setVariable("requesterLanguages", languages);
                        applyBranding(domainRequest.getDomain(), ctx);

                        // Create the HTML body using Thymeleaf
                        final String htmlContent = this.templateEngine.process("email-domainAccessRequestTH", ctx);
                        message.setText(htmlContent, true /* isHtml */);
                        message.setTo(email);

                        if (sendMessage(mimeMessage)) {
                            numberOfEmails += 1;
                        }
                    }
                } else {
                    List<User> users = domainService.getAllAdmins(domainRequest.getDomain(), true);
                    emailCount = (users == null ? 0 : users.size());

                    if (users != null) {
                        for (User user : users) {
                            Context ctx = new Context(locale);
                            ctx.setVariable("url", webRequest.generateURL("/manager/requestsPending/" + domainRequest.getDomain().getId()));
                            ctx.setVariable("domain", domainRequest.getDomain());
                            ctx.setVariable("requesterFirstName", domainRequest.getFirstName());
                            ctx.setVariable("requesterLastName", domainRequest.getLastName());
                            ctx.setVariable("requesterEmail", domainRequest.getEmailAddress());
                            ctx.setVariable("requesterAddress", domainRequest.getAddress());
                            ctx.setVariable("requesterCompanyName", domainRequest.getCompanyName());
                            ctx.setVariable("requesterPhone", domainRequest.getPhoneNumber());
                            ctx.setVariable("requesterDeviceType", domainRequest.getDeviceType());
                            ctx.setVariable("requesterRegion", domainRequest.getRegion());

                            List<Language> languages = new ArrayList<Language>();
                            languages.addAll(domainRequest.getLanguages());
                            Collections.sort(languages, new LanguageComparator());
                            ctx.setVariable("requesterLanguages", languages);

                            ctx.setVariable("user", user);

                            // Create the HTML body using Thymeleaf
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.comparators.LanguageComparator

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.