protected Properties createFaxClientSpiConfiguration ( ) { //get configuration Map < String , String > configuration = this . getConfiguration ( ) ; //create new configuration Properties internalSPIConfiguration = new Properties ( ) ; Properties overrideConfiguration = new Properties ( ) ; //go over current configuration Iterator < Entry < String , String > > iterator = configuration . entrySet ( ) . iterator ( ) ; Entry < String , String > entry = null ; String key = null ; String value = null ; String overrideKey = null ; String overridePrefix = FaxClientSpiConfigurationConstants . SPI_CONFIGURATION_OVERRIDE_PROPERTY_KEY_PREFIX . toString ( ) ; int prefixLength = overridePrefix . length ( ) ; while ( iterator . hasNext ( ) ) { //get next entry entry = iterator . next ( ) ; //get key/value key = entry . getKey ( ) ; value = entry . getValue ( ) ; //override internal configuration if ( ( key . startsWith ( overridePrefix ) ) ) { if ( key . length ( ) != prefixLength ) { overrideKey = key . substring ( prefixLength ) ; //put in override configuration overrideConfiguration . setProperty ( overrideKey , value ) ; } } //put in new configuration internalSPIConfiguration . setProperty ( key , value ) ; } //override configuration internalSPIConfiguration . putAll ( overrideConfiguration ) ; return internalSPIConfiguration ; }
This function creates and returns the internal fax client SPI configuration .