Package org.jabusuite.core.modules

Examples of org.jabusuite.core.modules.ModuleGroup


        //ModuleGroupsLocal moduleGroupsManagement = (ModuleGroupsLocal) context.lookup("ModuleGroupsBean/local");
        List<ModuleGroup> groups = moduleGroupsManagement.getAllModuleGroups(user, company);
       
        Iterator<ModuleGroup> it = groups.iterator();
        while (it.hasNext()) {
            ModuleGroup group = it.next();
            Element groupElement = new Element("group");
            groupElement.setAttribute("id",String.valueOf(group.getId()));
            groupElement.setAttribute("name",group.getName());
            addModulesToXml(groupElement, group);
            doc.getRootElement().addContent(groupElement);
        }
       
        XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());
View Full Code Here


        Iterator<Element> it = elements.iterator();
        //ModuleGroupsLocal moduleGroupsManagement = (ModuleGroupsLocal) context.lookup("ModuleGroupsBean/local");
       
        while (it.hasNext()) {
            Element elGroup = it.next();
            ModuleGroup group = new ModuleGroup();
           
            group.setId(elGroup.getAttribute("id").getLongValue());
            group.setName(elGroup.getAttribute("name").getValue());

            //If the group doesn't exist then create it
            ModuleGroup existingGroup = moduleGroupsManagement.find(group.getId());
            if (existingGroup==null) {
                logger.debug("Creating group "+group.getName());
                group.setOwner(user);
                group.setGroup(user.getMainGroup());
                moduleGroupsManagement.createDataset(group);
View Full Code Here

        Query q = manager.createQuery(query);

        List<ModuleGroup> moduleGroups = q.getResultList();
        ArrayList<ModuleGroup> availableGroups = new ArrayList<ModuleGroup>();
        for (int i = 0; i < moduleGroups.size(); i++) {
            ModuleGroup group = moduleGroups.get(i);
            if (user.canRead(group)) {
                if (logger.isDebugEnabled()) {
                    logger.debug(group.getName());
                }
                availableGroups.add(group);
            }
        }
        return availableGroups;
View Full Code Here

TOP

Related Classes of org.jabusuite.core.modules.ModuleGroup

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.