LPS-51358 create util class to avoid duplication

The new RepositoryUserUtil class will avoid the duplication of the
BaseServiceImpl.getUserId() method all over the place.

As it will be only called from deprecated methods, we'll deprecate the
new class and method to avoid other people using it.
LPS-51358 ant format-javadoc autogenerated