private void updateGroups( IndexingContext context, ArtifactContext ac ) throws IOException { String rootGroup = ac.getArtifactInfo().getRootGroup(); Set<String> rootGroups = context.getRootGroups(); if ( !rootGroups.contains( rootGroup ) ) { rootGroups.add( rootGroup ); context.setRootGroups( rootGroups ); } Set<String> allGroups = context.getAllGroups(); if ( !allGroups.contains( ac.getArtifactInfo().groupId ) ) { allGroups.add( ac.getArtifactInfo().groupId ); context.setAllGroups( allGroups ); } }
Set<String> allGroups = request.getFactory().getIndexingContext().getAllGroups();