public void work ( RepositoryHandler repoHandler , DbProduct product ) { if ( ! product . getDeliveries ( ) . isEmpty ( ) ) { product . getDeliveries ( ) . forEach ( delivery -> { final Set < Artifact > artifacts = new HashSet <> ( ) ; final DataFetchingUtils utils = new DataFetchingUtils ( ) ; final DependencyHandler depHandler = new DependencyHandler ( repoHandler ) ; final Set < String > deliveryDependencies = utils . getDeliveryDependencies ( repoHandler , depHandler , delivery ) ; final Set < String > fullGAVCSet = deliveryDependencies . stream ( ) . filter ( DataUtils :: isFullGAVC ) . collect ( Collectors . toSet ( ) ) ; final Set < String > shortIdentiferSet = deliveryDependencies . stream ( ) . filter ( entry -> ! DataUtils . isFullGAVC ( entry ) ) . collect ( Collectors . toSet ( ) ) ; processDependencySet ( repoHandler , shortIdentiferSet , batch -> String . format ( BATCH_TEMPLATE_REGEX , StringUtils . join ( batch , ' ' ) ) , 1 , artifacts :: add ) ; processDependencySet ( repoHandler , fullGAVCSet , batch -> QueryUtils . quoteIds ( batch , BATCH_TEMPLATE ) , 10 , artifacts :: add ) ; if ( ! artifacts . isEmpty ( ) ) { delivery . setAllArtifactDependencies ( new ArrayList <> ( artifacts ) ) ; } } ) ; repoHandler . store ( product ) ; } }
refresh all deliveries dependencies for a particular product