isMappingOnly = true;
internalUser = new InternalUserPrincipalImpl(UserPrincipalImpl.getFullPathFromPrincipalName(username));
}
Collection internalRoles = internalUser.getRolePrincipals();
// This should not be null. Check for null should be made by the caller.
InternalRolePrincipal internalRole = commonQueries.getInternalRolePrincipal(RolePrincipalImpl
.getFullPathFromPrincipalName(roleFullPathName));
// Check anyway.
if (null == internalRole)
{
throw new SecurityException(SecurityException.ROLE_DOES_NOT_EXIST + " " + roleFullPathName);