Package org.jasig.portal.groups.pags

Examples of org.jasig.portal.groups.pags.GroupDefinition


         this.applicationContext = ApplicationContextLocator.getApplicationContext();
         this.personAttributesGroupDefinitionDao = applicationContext.getBean("personAttributesGroupDefinitionDao", IPersonAttributesGroupDefinitionDao.class);
    }

    public boolean contains(IEntityGroup group, IGroupMember member) {
        GroupDefinition groupDef = convertEntityToGroupDef(group);
        if (member.isGroup())
        {
           String key = ((IEntityGroup)member).getLocalKey();
           return groupDef.hasMember(key);
        }
        else
        {
           if (member.getEntityType() != IPERSON_CLASS)
               { return false; }
View Full Code Here


            logger.error("No PAGS group with name {} found. Check your PAGS group definitions for possible error"
                + " in member group name");
            return null;
        }
        IPersonAttributesGroupDefinition pagsGroup = groups.iterator().next();
        GroupDefinition groupDef = initGroupDef(pagsGroup);
        IEntityGroup group = new EntityTestingGroupImpl(groupDef.getKey(), IPERSON_CLASS);
        group.setName(groupDef.getName());
        group.setDescription(groupDef.getDescription());
        return group;
    }
View Full Code Here

                Set<IEntityGroup> allParents = primGetAllContainingGroups(group, new HashSet<IEntityGroup>());
                boolean testPassed = true;
                for (Iterator<IEntityGroup> i=allParents.iterator(); i.hasNext() && testPassed;)
                {
                    parentGroup = i.next();
                    GroupDefinition parentGroupDef = (GroupDefinition) convertEntityToGroupDef(parentGroup);
                    testPassed = parentGroupDef.test(person);
                }
               
                if (!testPassed && logger.isWarnEnabled()) {
                    StringBuffer sb = new StringBuffer();
                    sb.append("PAGS group=").append(group.getKey());
View Full Code Here

    }

    public String[] findMemberGroupKeys(IEntityGroup group) throws GroupsException {

        List<String> keys = new ArrayList<String>();
        GroupDefinition groupDef = convertEntityToGroupDef(group);
        if (groupDef != null)
        {
             for (Iterator<String> i = groupDef.getMembers().iterator(); i.hasNext(); )
                  { keys.add(i.next()); }
        }
        return keys.toArray(new String[]{});
    }
View Full Code Here

    public EntityIdentifier[] searchForEntities(String query, int method, Class type) throws GroupsException {
        return EMPTY_SEARCH_RESULTS;
    }

    private GroupDefinition initGroupDef(IPersonAttributesGroupDefinition group) {
        GroupDefinition groupDef = new GroupDefinition();
        groupDef.setKey(group.getName());
        groupDef.setName(group.getName());
        groupDef.setDescription(group.getDescription());
        addMemberKeys(groupDef, group.getMembers());
        Set<IPersonAttributesGroupTestGroupDefinition> testGroups = group.getTestGroups();
        for(IPersonAttributesGroupTestGroupDefinition testGroup : testGroups) {
            TestGroup tg = new TestGroup();
            Set<IPersonAttributesGroupTestDefinition> tests = testGroup.getTests();
            for(IPersonAttributesGroupTestDefinition test : tests) {
                IPersonTester testerInst = initializeTester(test.getTesterClassName(), test.getAttributeName(), test.getTestValue());
                tg.addTest(testerInst);
            }
            groupDef.addTestGroup(tg);
        }
        return groupDef;
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.groups.pags.GroupDefinition

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.