The EditEntity API module needs refactoring. Two steps are suggested:
- Factor individual modifications (like set lable, remove alias) into ChangeOp classes (similar to, maybe even compatible to DiffOp). besides modifying the entity, they should faciliate the creation of summaries and permission checks.
- Move the module's logic into a handler/controller. That controller may be aware of the API, especially of the Request and Result objects. Isolation from that knowledge would be nice, but is not essential at the moment.