Set findRemovableAciList(Set aciList) throws AMException, SSOException {
  Set resultSet=new HashSet();
  if (aciList == null) {
    return resultSet;
  }
  Iterator iter=aciList.iterator();
  while (iter.hasNext()) {
    String aci=(String)iter.next();
    Set objs=dsServices.search(token,AMStoreConnection.getAMSdkBaseDN(),"(&" + AMSearchFilterManager.getGlobalSearchFilter(AMObject.GROUP) + "(iplanet-am-role-aci-list="+ aci+ "))",AMConstants.SCOPE_SUB);
    if (objs.size() < 2) {
      resultSet.add(aci);
    }
  }
  return resultSet;
}

Set findRemovableAciList ( Set aciList ) throws AMException , SSOException { Set resultSet = new HashSet ( ) ; if ( aciList == null ) { return resultSet ; } Iterator iter = aciList . iterator ( ) ; while ( iter . hasNext ( ) ) { String aci = ( String ) iter . next ( ) ; Set objs = dsServices . search ( token , AMStoreConnection . getAMSdkBaseDN ( ) , "(&" + AMSearchFilterManager . getGlobalSearchFilter ( AMObject . GROUP ) + "(iplanet-am-role-aci-list=" + aci + "))" , AMConstants . SCOPE_SUB ) ; if ( objs . size ( ) < 2 ) { resultSet . add ( aci ) ; } } return resultSet ; }
gets the dn : aci that is not shared by more that 1 role .
