3.1.1.1.42.2.3 GetPolicyMapEntriesForPolicyId
The GetPolicyMapEntriesForPolicyId procedure can be used to retrieve all the entries mapping UserRole to corresponding AccessScope for a specific PolicyId.
The following input parameter is used.
Param_policyId: This is a 64-bit signed integer that specifies the PolicyId of the UserAccessPolicy for which the operation is being requested.
The following is the output parameter from this procedure.
Result_policyEntries: A collection of type AccessScopeToUserRoleMapping.
The following processing steps are involved:
Retrieve all the rows in the ADM_PolicyMapTable that have PolicyId as Param_policyId.
Initialize Result_policyEntries as Collection of AccessScopeToUserRoleMapping.
For each row that has been retrieved, perform the following steps:
Create an instance policyEntry of type AccessScopeToUserRoleMapping and assign the following values:
Assign RoleId to policyEntry.UserRoleId.
Call GetUserRoleById of ADM_RoleDefinitionTable by passing the RoleId as Param_roleId. Assign Result_role.Name to policyEntry.UserRoleName.
Assign AccessScopeId to policyEntry.AccessScopeId.
Call GetAccessScopeById of ADM_AccessScopeTable by passing the AccessScopeId as Param_accessScopeId. Assign Result_accessScope.FullScopePath to policyEntry.AccessScopeName.
Add the policyEntry to Result_policyEntries collection.
Return Result_policyEntries as the output of the procedure.