Package com.sparc.knappsack.models

Examples of com.sparc.knappsack.models.UserDomainModel


    public List<UserDomainModel> getAllOrganizationMembers(Organization organization, boolean includeGuests) {
        Assert.notNull(organization, "Organization cannot be null");
        Map<Long, UserDomainModel> userDomainModels = new HashMap<Long, UserDomainModel>();

        for (UserDomain userDomain : userDomainService.getAll(organization.getId())) {
            UserDomainModel model = userDomainService.createUserDomainModel(userDomain);
            userDomainModels.put(userDomain.getUser().getId(), model);
        }

        if (includeGuests) {
            for (UserDomainModel guest : getAllOrganizationGuests(organization.getId())) {
View Full Code Here


        Map<Long, UserDomainModel> userDomainsModels = new HashMap<Long, UserDomainModel>();

        for (Group group : organization.getGroups()) {
            for (UserDomain userDomain : userDomainService.getAll(group.getId())) {
                if (!userDomainsModels.containsKey(userDomain.getUser().getId()) && userDomainService.get(userDomain.getUser(), organization.getId()) == null) {
                    UserDomainModel model = userDomainService.createUserDomainModel(userDomain);
                    userDomainsModels.put(userDomain.getUser().getId(), model);
                }
            }
        }
View Full Code Here

        }
    }

    @Override
    public UserDomainModel createUserDomainModel(UserDomain userDomain) {
        UserDomainModel model = null;
        if (userDomain != null && userDomain.getDomain() != null) {
            model = new UserDomainModel();
            model.setId(userDomain.getId());
            model.setDomainId(userDomain.getDomain().getId());
            model.setDomainType(userDomain.getDomain().getDomainType());
            model.setUser(userService.createUsermodel(userDomain.getUser()));
            model.setUserRole(userDomain.getRole().getUserRole());
        }
        return model;
    }
View Full Code Here

TOP

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

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.