Package org.exoplatform.services.organization

Examples of org.exoplatform.services.organization.Group


        Set<Group> exoGroups = new HashSet<Group>();

        MembershipDAOImpl mmm = (MembershipDAOImpl) orgService.getMembershipHandler();

        for (org.picketlink.idm.api.Role role : roles) {
            Group exoGroup = convertGroup(role.getGroup());
            if (mmm.isCreateMembership(role.getRoleType().getName(), exoGroup.getId())) {
                exoGroups.add(exoGroup);
            }
        }

        if (mmm.isAssociationMapped() && mmm.getAssociationMapping().equals(membershipType)) {
View Full Code Here


            }

            return null;
        }

        Group result = convertGroup(jbidGroup);

        if (log.isTraceEnabled()) {
            Tools.logMethodOut(log, LogLevel.TRACE, "findGroupById", result);
        }
View Full Code Here

        org.picketlink.idm.api.Group root = getRootGroup();

        for (org.picketlink.idm.api.Group group : plGroups) {
            if (!group.equals(root)) {
                Group g = convertGroup(group);

                // If membership of mapped types is forced then we need to exclude those that are not direct child
                if (orgService.getConfiguration().isForceMembershipOfMappedTypes()) {
                    String id = g.getParentId();
                    if ((parent == null && id == null) || (parent != null && id != null && id.equals(parent.getId()))
                            || (parent == null && id != null && id.equals("/"))) {
                        exoGroups.add(g);
                        continue;
                    }
View Full Code Here

        MembershipTypeHandler mtHandler = service.getMembershipTypeHandler();
        User user = service.getUserHandler().findUserByName(user_);
        for (Membership membership : membership_) {
            if (user == null)
                user = service.getUserHandler().findUserByName(membership.getUserName());
            Group group = groupHandler.findGroupById(membership.getGroupId());
            MembershipType mt = mtHandler.findMembershipType(membership.getMembershipType());
            if (service.getMembershipHandler() != null) {
                service.getMembershipHandler().linkMembership(user, group, mt, broadcast);
            }
        }
View Full Code Here

    public static String getGroupLabel(String groupId) throws Exception {
        WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
        ExoContainer container = context.getApplication().getApplicationServiceContainer();
        OrganizationService orgService = (OrganizationService) container.getComponentInstanceOfType(OrganizationService.class);
        Group group = orgService.getGroupHandler().findGroupById(groupId);
        if (group == null) {
            return cachedGroupLabel;
        }
        String label = group.getLabel();
        cachedGroupLabel = (label != null && label.trim().length() > 0) ? label : group.getGroupName();
        return cachedGroupLabel;
    }
View Full Code Here

    public static String getGroupDescription(String groupId) throws Exception {
        WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
        ExoContainer container = context.getApplication().getApplicationServiceContainer();
        OrganizationService orgService = (OrganizationService) container.getComponentInstanceOfType(OrganizationService.class);
        String description = "";
        Group group = orgService.getGroupHandler().findGroupById(groupId);
        if (group != null) {
            description = group.getDescription();
        }
        return description;
    }
View Full Code Here

        selectedGroup = service.getGroupHandler().findGroupById(groupId);
        String parentGroupId = null;
        if (selectedGroup != null)
            parentGroupId = selectedGroup.getParentId();
        Group parentGroup = null;
        if (parentGroupId != null)
            parentGroup = service.getGroupHandler().findGroupById(parentGroupId);

        Collection childrenGroup = service.getGroupHandler().findGroups(selectedGroup);
        sibblingGroup = service.getGroupHandler().findGroups(parentGroup);
View Full Code Here

        if (list == null)
            list = new ArrayList<LocalPath>(5);
        if (id == null)
            return list;
        OrganizationService service = getApplicationComponent(OrganizationService.class);
        Group group = service.getGroupHandler().findGroupById(id);
        if (group == null)
            return list;
        list.add(0, new LocalPath(group.getId(), group.getGroupName()));
        getPath(list, group.getParentId());
        return list;
    }
View Full Code Here

        selectGroup_ = service.getGroupHandler().findGroupById(groupId);
        String parentGroupId = null;
        if (selectGroup_ != null)
            parentGroupId = selectGroup_.getParentId();
        Group parentGroup = null;
        if (parentGroupId != null)
            parentGroup = service.getGroupHandler().findGroupById(parentGroupId);

        Collection childrenGroup = service.getGroupHandler().findGroups(selectGroup_);
        sibblingGroup = service.getGroupHandler().findGroups(parentGroup);
View Full Code Here

        if (list == null)
            list = new ArrayList<LocalPath>(5);
        if (id == null)
            return list;
        OrganizationService service = getApplicationComponent(OrganizationService.class);
        Group group = service.getGroupHandler().findGroupById(id);
        if (group == null)
            return list;
        list.add(0, new LocalPath(group.getId(), group.getGroupName()));
        getPath(list, group.getParentId());
        return list;
    }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.organization.Group

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.