try {
ContentClass contentClass =
repositoryTypeRegistry.getRepositoryContentClass(GroupRepository.class, model.getProvider());
RepositoryTemplate template = (RepositoryTemplate) getRepositoryTemplates().getTemplates(
GroupRepository.class, contentClass, new ProviderHint(model.getProvider())
).pick();
template.getConfigurableRepository().setId(model.getId());
template.getConfigurableRepository().setName(model.getName());