private ConfigurationAdmin getConfigurationAdmin ( final BundleContext bundleContext ) { final ServiceReference ref = bundleContext . getServiceReference ( ConfigurationAdmin . class . getName ( ) ) ; if ( ref == null ) { throw new IllegalStateException ( "Cannot find a configuration admin service" ) ; } return ( ConfigurationAdmin ) bundleContext . getService ( ref ) ; }
Gets Configuration Admin service from service registry .