public Collection < String > getServerFeaturesToInstall ( Set < ServerAsset > servers , boolean offlineOnly ) throws InstallException , IOException { Set < String > features = new TreeSet < String > ( ) ; Set < String > serverNames = new HashSet < String > ( servers . size ( ) ) ; Set < String > allServerNames = new HashSet < String > ( servers . size ( ) ) ; for ( ServerAsset sa : servers ) { Collection < String > requiredFeatures = sa . getRequiredFeatures ( ) ; if ( ! requiredFeatures . isEmpty ( ) ) { logger . log ( Level . FINEST , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "LOG_DEPLOY_SERVER_FEATURES" , sa . getServerName ( ) , InstallUtils . getFeatureListOutput ( requiredFeatures ) ) ) ; features . addAll ( requiredFeatures ) ; serverNames . add ( sa . getServerName ( ) ) ; } allServerNames . add ( sa . getServerName ( ) ) ; } Collection < String > featuresToInstall = getFeaturesToInstall ( features , offlineOnly ) ; if ( ! featuresToInstall . isEmpty ( ) ) { logger . log ( Level . FINE , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "LOG_DEPLOY_ADDITIONAL_FEATURES_REQUIRED" , serverNames , featuresToInstall ) ) ; } else { logger . log ( Level . FINE , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "LOG_DEPLOY_NO_ADDITIONAL_FEATURES_REQUIRED" , allServerNames ) ) ; } return featuresToInstall ; }
Creates a collection of features required for all servers in the inputed set .