{
List<String> observableRepos = getObservableRepos();
List<String> repos = ListUtils.intersection( observableRepos, selectedRepos );
if ( repos == null || repos.isEmpty() )
{
return new GroupIdList( Collections.<String>emptyList() );
}
try
{
return new GroupIdList( new ArrayList<String>( repositorySearch.getAllGroupIds( getPrincipal(), repos ) ) );
}
catch ( RepositorySearchException e )
{
log.error( e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(), e );