Show TOC

Deleting RolesLocate this document in the navigation structure

Prerequisites

You have imported the required interfaces and gotten the required factories.

More information: User Management Functions for Roles .

Context

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.

Procedure

  1. Use the IRole interface to get the role object.
  2. Use the deleteRole() method to delete the role.

Example

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) {
                

        }
}