Package com.sparc.knappsack.comparators

Examples of com.sparc.knappsack.comparators.InvitationDomainNameComparator


                // Create Map separating domains for the email addresses invitations
                Map<String, Set<Invitation>> invitationsMap = new HashMap<String, Set<Invitation>>();
                for (Invitation invitation : emailMap.get(emailAddress)) {
                    if (DomainType.ORGANIZATION.equals(invitation.getDomain().getDomainType())) {
                        if (invitationsMap.get(DomainType.ORGANIZATION.name()) == null) {
                            invitationsMap.put(DomainType.ORGANIZATION.name(), new TreeSet<Invitation>(new InvitationDomainNameComparator()));
                        }
                        invitationsMap.get(DomainType.ORGANIZATION.name()).add(invitation);
                        parentDomain = (Organization) invitation.getDomain();
                    } else if (DomainType.GROUP.equals(invitation.getDomain().getDomainType())) {
                        if (invitationsMap.get(DomainType.GROUP.name()) == null) {
                            invitationsMap.put(DomainType.GROUP.name(), new TreeSet<Invitation>(new InvitationDomainNameComparator()));
                        }
                        invitationsMap.get(DomainType.GROUP.name()).add(invitation);
                        if(parentDomain == null) {
                            Group group = (Group) invitation.getDomain();
                            parentDomain = group.getOrganization();
View Full Code Here

TOP

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

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.