roleSecurityHandler.removeRolePrincipal(new RolePrincipalImpl(RolePrincipalImpl
.getPrincipalNameFromFullPath(roles[i])));
}
catch (Exception e)
{
KeyedMessage msg =
SecurityException.UNEXPECTED.create("RoleManager.removeRole",
"RoleSecurityHandler.removeRolePrincipal("+RolePrincipalImpl.getPrincipalNameFromFullPath(roles[i])+")",
e.getMessage());
log.error(msg, e);
throw new SecurityException(msg, e);
}
// Remove preferences
Preferences rolePref = Preferences.userRoot().node(roles[i]);
try
{
rolePref.removeNode();
}
catch (BackingStoreException bse)
{
KeyedMessage msg =
SecurityException.UNEXPECTED.create("RoleManager.removeRole",
"Preferences.removeNode("+roles[i]+")",
bse.getMessage());
log.error(msg, bse);
throw new SecurityException(msg, bse);