Modify getAllHostedCollectionByType of Managedelement class.