You have imported the required interfaces and gotten the required factories.
More information: User Management Functions for Roles .
This procedure describes how to delete a role programmatically. Use this procedure if you cannot use the existing user administration tools to perform role deletion and need to customize your tools to delete roles programmatically.
This example gets the role object, "demo_role" , then deletes it.
public static void deleteRole(String roleUniqueName) { try { } catch (NoSuchRoleException nsrex) { } catch (UMException umex) { } catch (UMRuntimeException umrex) { } }