Package org.olat.admin.user.delete.service

Examples of org.olat.admin.user.delete.service.UserDeletionManager


   * @param identityList List of Identities to delete
   */
  public void deletIdentities(List<Identity> identityList) {
    Manager securityManager = ManagerFactory.getManager();
    Identity identity;
    UserDeletionManager deletionManager = UserDeletionManager.getInstance();
    SecurityGroup secGroup = securityManager.findSecurityGroupByName(LDAPConstants.SECURITY_GROUP_LDAP);
    for (Iterator<Identity> itr = identityList.iterator(); itr.hasNext();) {
      identity = itr.next();
      securityManager.removeIdentityFromSecurityGroup(identity, secGroup);
      deletionManager.deleteIdentity(identity);
    }
  }
View Full Code Here


    assertEquals(1, result.size());
    // find identity 1-3 via institutional id
    result = ManagerFactory.getManager().getIdentitiesByPowerSearch(null, searchValue, false, null, null, null, null, null, null);
    assertEquals(3, result.size());
    // delete user now
    UserDeletionManager udm = UserDeletionManager.getInstance();
    udm.deleteIdentity(i1);
    DBFactory.getInstance().commitAndCloseSession();
    // check if deleted successfully
    result = ManagerFactory.getManager().getVisibleIdentitiesByPowerSearch("judihui", null, true, null, null, null, null, null);
    assertEquals(0, result.size());
    // not visible, but still there when using power search
View Full Code Here

TOP

Related Classes of org.olat.admin.user.delete.service.UserDeletionManager

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.