private Map < String , String > loadProperties ( ServiceReference reference ) { log . trace ( "loadProperties" ) ; Map < String , String > properties = new HashMap < String , String > ( ) ; properties . put ( "id" , OsgiUtil . toString ( reference . getProperty ( Constants . SERVICE_ID ) , "" ) ) ; properties . put ( "class" , OsgiUtil . toString ( reference . getProperty ( Constants . SERVICE_PID ) , "" ) ) ; properties . put ( "description" , OsgiUtil . toString ( reference . getProperty ( Constants . SERVICE_DESCRIPTION ) , "" ) ) ; properties . put ( "vendor" , OsgiUtil . toString ( reference . getProperty ( Constants . SERVICE_VENDOR ) , "" ) ) ; properties . put ( "resourceTypes" , Arrays . toString ( OsgiUtil . toStringArray ( reference . getProperty ( ComponentBindingsProvider . RESOURCE_TYPE_PROP ) , new String [ 0 ] ) ) ) ; properties . put ( "priority" , OsgiUtil . toString ( reference . getProperty ( ComponentBindingsProvider . PRIORITY ) , "" ) ) ; properties . put ( "bundle_id" , String . valueOf ( reference . getBundle ( ) . getBundleId ( ) ) ) ; properties . put ( "bundle_name" , reference . getBundle ( ) . getSymbolicName ( ) ) ; log . debug ( "Loaded properties {}" , properties ) ; return properties ; }
Loads the properties from the specified Service Reference into a map .