public Collection < ProvisioningFeatureDefinition > isUninstallable ( UninstallAsset uninstallAsset , Collection < ProvisioningFeatureDefinition > installedFeatureDefinitions , Collection < String > uninstallInstallFeatures , boolean isChecking ) { Collection < ProvisioningFeatureDefinition > requiredByTheseFeatures = requiresThisFeature ( uninstallAsset . getProvisioningFeatureDefinition ( ) . getSymbolicName ( ) , installedFeatureDefinitions , uninstallInstallFeatures , isChecking ) ; Collection < ProvisioningFeatureDefinition > temp = new ArrayList < ProvisioningFeatureDefinition > ( ) ; while ( requiredByTheseFeatures . size ( ) > temp . size ( ) ) { temp . addAll ( requiredByTheseFeatures ) ; for ( ProvisioningFeatureDefinition p : temp ) { InstallLogUtils . getInstallLogger ( ) . log ( Level . FINEST , "The uninstalling feature : " + uninstallAsset . getProvisioningFeatureDefinition ( ) . getSymbolicName ( ) + " is required by " + p . getSymbolicName ( ) ) ; InstallLogUtils . getInstallLogger ( ) . log ( Level . FINEST , "Determine additional dependency for feature : " + p . getSymbolicName ( ) ) ; Collection < ProvisioningFeatureDefinition > required = requiresThisFeature ( p . getSymbolicName ( ) , installedFeatureDefinitions , uninstallInstallFeatures , isChecking ) ; if ( ! ! ! required . isEmpty ( ) ) { for ( ProvisioningFeatureDefinition pp : required ) { if ( ! ! ! requiredByTheseFeatures . contains ( pp ) ) { InstallLogUtils . getInstallLogger ( ) . log ( Level . FINEST , "Found additional dependent feature : " + pp . getSymbolicName ( ) ) ; requiredByTheseFeatures . add ( pp ) ; } } } } } return requiredByTheseFeatures ; }
Verfiy whether the feature is uninstallable and there is no other installed features still require this feature .