public void updateMembers(IEntityGroup group) throws GroupsException {
// assume key is fully qualified group name
String groupName = group.getLocalKey();
GcAddMember gcAddMember = new GcAddMember().assignGroupName(groupName);
Iterator<IGroupMember> membersIterator = group.getMembers();
while (membersIterator != null && membersIterator.hasNext()) {
IGroupMember iGroupMember = membersIterator.next();
EntityIdentifier entityIdentifier = iGroupMember
.getEntityIdentifier();
String identifier = entityIdentifier.getKey();
gcAddMember.addSubjectIdentifier(identifier);
}
gcAddMember.execute();
}