Update the documents managers

Today the documents managers do not work.

This modifications use similar operation of entity media manager to keep consistency in the code.