public static void deleteRealmPrivileges(SSOToken token,String realmName) throws SSOException, DelegationException {
  DelegationManager dm=new DelegationManager(token,realmName);
  Set privs=dm.getPrivileges();
  if ((privs == null) || privs.isEmpty()) {
    return;
  }
  Iterator it=privs.iterator();
  while (it.hasNext()) {
    DelegationPrivilege dp=(DelegationPrivilege)it.next();
    String privName=dp.getName();
    dm.removePrivilege(privName);
    if (debug.messageEnabled()) {
      debug.message("removed " + privName + " privilege from realm "+ realmName);
    }
  }
}

public static void deleteRealmPrivileges ( SSOToken token , String realmName ) throws SSOException , DelegationException { DelegationManager dm = new DelegationManager ( token , realmName ) ; Set privs = dm . getPrivileges ( ) ; if ( ( privs == null ) || privs . isEmpty ( ) ) { return ; } Iterator it = privs . iterator ( ) ; while ( it . hasNext ( ) ) { DelegationPrivilege dp = ( DelegationPrivilege ) it . next ( ) ; String privName = dp . getName ( ) ; dm . removePrivilege ( privName ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "removed " + privName + " privilege from realm " + realmName ) ; } } }
deletes all the delegation privileges of a specific realm
