if ( accountType = "admin" )
return admin view
if ( accountType = "customer" )
return customer view
if ( accountType = "user" )
return user view
if ( accountType = "merketing" )
return marketing view
and so on .......
Use a map where you register your views with the given key:
viewsMap.put("admin", admin_view);
viewsMap.put("customer", customer_view);
...
and then, just do:
View view = viewsMap.get(accountType);
if (view == null) {
return error_view;
}
return view;