private List < BundleContentGeneratorDefinition > getRequestedDefinitions ( List < String > generators ) { Stream < BundleContentGeneratorDefinition > stream = definitions . stream ( ) ; if ( generators == null || generators . isEmpty ( ) ) { // Filter out default generators stream = stream . filter ( BundleContentGeneratorDefinition :: isEnabledByDefault ) ; } else { stream = stream . filter ( def -> generators . contains ( def . getId ( ) ) ) ; } return stream . sorted ( Comparator . comparingInt ( BundleContentGeneratorDefinition :: getOrder ) ) . collect ( Collectors . toList ( ) ) ; }
Orchestrate what definitions should be used for this bundle .