use of org.apereo.portal.groups.EntityGroupImpl in project uPortal by Jasig.
the class GrouperEntityGroupStore method createUportalGroupFromGrouperGroup.
/**
* Construct an IEntityGroup from a Grouper WsGroup.
*
* @param wsGroup
* @return the group
*/
protected IEntityGroup createUportalGroupFromGrouperGroup(WsGroup wsGroup) {
IEntityGroup iEntityGroup = new EntityGroupImpl(wsGroup.getName(), IPerson.class);
// need to set the group name and description to the actual
// display name and description
iEntityGroup.setName(wsGroup.getDisplayName());
iEntityGroup.setDescription(wsGroup.getDescription());
return iEntityGroup;
}
use of org.apereo.portal.groups.EntityGroupImpl in project uPortal by Jasig.
the class SmartLdapGroupStore method hasUndiscoveredChildrenWithinDn.
public boolean hasUndiscoveredChildrenWithinDn(LdapRecord record, String referenceDn, Set<LdapRecord> groupsSet) {
// default
boolean rslt = false;
for (String childKey : record.getKeysOfChildren()) {
if (childKey.endsWith(referenceDn)) {
// Make sure the one we found isn't already in the groupsSet;
// NOTE!... this test takes advantage of the implementation of
// equals() on LdapRecord, which states that 2 records with the
// same group key are equal.
IEntityGroup group = new EntityGroupImpl(childKey, IPerson.class);
List<String> list = Collections.emptyList();
LdapRecord proxy = new LdapRecord(group, list);
if (!groupsSet.contains(proxy)) {
rslt = true;
break;
} else {
log.trace("Child group is already in collection: {}", childKey);
}
}
}
log.trace("Query for children of parent group '{}': {}", record.getGroup().getLocalKey(), rslt);
return rslt;
}
use of org.apereo.portal.groups.EntityGroupImpl in project uPortal by Jasig.
the class LDAPGroupStore method makeGroup.
protected IEntityGroup makeGroup(GroupShadow shadow) throws GroupsException {
IEntityGroup group = null;
if (shadow != null) {
group = new EntityGroupImpl(shadow.key, iperson);
group.setDescription(shadow.description);
group.setName(shadow.name);
}
return group;
}
use of org.apereo.portal.groups.EntityGroupImpl in project uPortal by Jasig.
the class FileSystemGroupStore method newInstance.
/** @return org.apereo.portal.groups.IEntityGroup */
private IEntityGroup newInstance(String newKey, Class newType, String newName) throws GroupsException {
EntityGroupImpl egi = new EntityGroupImpl(newKey, newType);
egi.primSetName(newName);
return egi;
}
Aggregations