this is very specific for the sulu restcontroller. i don't see the need for extracting it.