/** * {@inheritDoc} */ public final Group createGroupInstance() { return new GroupImpl(); }
/** * {@inheritDoc} */ final public Group createGroupInstance() { return new GroupImpl(); }
public static List<Group> getActivatedChildrenGroup(Session session, String parentGroupId) throws Exception { List<Group> activatedGroups = new ArrayList<Group>(); NodeIterator groupsNodesIterator = getGroupsFolder(session).getNodes(); while (groupsNodesIterator.hasNext()) { Node groupNode = groupsNodesIterator.nextNode(); String groupId = groupNode.getName(); groupId = groupId.replace(SPECIAL_CHARACTER_REPLACEMENT, "/"); if (!groupId.contains(parentGroupId) || groupId.equals(parentGroupId)) { continue; } GroupImpl group = new GroupImpl(); group.setId(groupId); group.setGroupName(groupId); activatedGroups.add(group); } return activatedGroups; }
protected Group buildGroup(String groupDN, Attributes attrs) throws NamingException { GroupImpl group = new GroupImpl(); // extract group's id, group's name and parent's group from DN StringBuffer idBuffer = new StringBuffer(); String parentId = null; String[] baseParts = explodeDN(ldapAttrMapping.groupsURL, true); String[] membershipParts = explodeDN(groupDN, true); for (int x = (membershipParts.length - baseParts.length - 1); x > -1; x--) { idBuffer.append("/" + membershipParts[x]); if (x == 1) parentId = idBuffer.toString(); } group.setGroupName(membershipParts[0]); group.setId(idBuffer.toString()); if (attrs != null) { group.setDescription(ldapAttrMapping.getAttributeValueAsString(attrs, ldapAttrMapping.ldapDescriptionAttr)); group.setLabel(ldapAttrMapping.getAttributeValueAsString(attrs, ldapAttrMapping.groupLabelAttr)); } group.setParentId(parentId); return group; }
/** * Create group from LDAP attributes. * * @param attrs {@link Attributes} * @return Group */ public final Group attributesToGroup(Attributes attrs) { if (attrs == null || attrs.size() == 0) return null; Group group = new GroupImpl(); group.setGroupName(getAttributeValueAsString(attrs, groupNameAttr)); group.setDescription(getAttributeValueAsString(attrs, ldapDescriptionAttr)); group.setLabel(getAttributeValueAsString(attrs, groupLabelAttr)); return group; }
GroupImpl group = new GroupImpl(groupId); group.setId(groupId); Collection<GroupEventListener> groupDAOListeners = groupDAOListeners_.values();