2012/10/30 Bertrand Delacretaz <[email protected]>: >> ...I also don't see a need to do it in the same way as JCR does - we >> should do it what fits best in our resource api and what is the best >> way to cover the use cases :)... > > Of course, but some consistency wouldn't hurt either, I don't see what > makes the multiple methods better than the single method + permission > name, and we already have that latter pattern in our codebase.
It's slower as it requires checking of the permission check :) More serious, a string is open, it allows for typos (even if we provide constants) and unexpected values which you also have to check in your implementation. So instead of a serious of "if permission is this" and "else throw/do nothing", separate methods make it imho easier to use and implement. But I don't really have a strong preference and would leave it up to Mike providing the patch :) Carsten -- Carsten Ziegeler [email protected]
