public void removePrivilege(SSOToken token,String orgName,String privilegeName) throws SSOException, DelegationException {
  try {
    if (hasDelegationPermissionsForRealm(token,orgName)) {
      token=(SSOToken)AccessController.doPrivileged(AdminTokenAction.getInstance());
    }
    PolicyManager pm=new PolicyManager(token,POLICY_REPOSITORY_REALM);
    String prefix=null;
    if (orgName != null) {
      prefix=orgName.toLowerCase() + NAME_DELIMITER;
      prefix=prefix.replace(',',REPLACEMENT_FOR_COMMA);
    }
 else {
      prefix=NAME_DELIMITER;
    }
    pm.removePolicy(prefix + privilegeName);
  }
 catch (  Exception e) {
    throw new DelegationException(e);
  }
}

public void removePrivilege ( SSOToken token , String orgName , String privilegeName ) throws SSOException , DelegationException { try { if ( hasDelegationPermissionsForRealm ( token , orgName ) ) { token = ( SSOToken ) AccessController . doPrivileged ( AdminTokenAction . getInstance ( ) ) ; } PolicyManager pm = new PolicyManager ( token , POLICY_REPOSITORY_REALM ) ; String prefix = null ; if ( orgName != null ) { prefix = orgName . toLowerCase ( ) + NAME_DELIMITER ; prefix = prefix . replace ( ',' , REPLACEMENT_FOR_COMMA ) ; } else { prefix = NAME_DELIMITER ; } pm . removePolicy ( prefix + privilegeName ) ; } catch ( Exception e ) { throw new DelegationException ( e ) ; } }
removes a delegation privilege from a specific realm .
