Issue #2159051 by wodenx, mhrabovcin, joachim: Added support for controller per entity type, refactored code to abstract base controller.