private Map < String , ProvisioningFeatureDefinition > getUsrProductFeatureDefinitions ( ) { Map < String , ProvisioningFeatureDefinition > features = null ; File userDir = Utils . getUserDir ( ) ; if ( userDir != null && userDir . exists ( ) ) { File userFeatureDir = new File ( userDir , USER_FEATURE_DIR ) ; if ( userFeatureDir . exists ( ) ) { features = new TreeMap < String , ProvisioningFeatureDefinition > ( ) ; File [ ] userManifestFiles = userFeatureDir . listFiles ( MFFilter ) ; if ( userManifestFiles != null ) { for ( File file : userManifestFiles ) { try { ProvisioningFeatureDefinition fd = new SubsystemFeatureDefinitionImpl ( USR_PRODUCT_EXT_NAME , file ) ; features . put ( fd . getSymbolicName ( ) , fd ) ; } catch ( IOException e ) { // TODO: PROPER NLS MESSAGE throw new FeatureToolException ( "Unable to read feature manifest from user extension: " + file , ( String ) null , e , ReturnCode . BAD_FEATURE_DEFINITION ) ; } } } } } return features ; }
Retrieves a Map of feature definitions in default usr product extension location