×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Ali Ben Messaoud
Added: Jan 25, 2017 9:22 PM
Views: 7
Tags: no tags
  1. //            String basicResourceConfigurationInterfaceFilter = "(objectClass=" + basicResourceConfigurationInterfaceFullName + ")";
  2. //            ServiceReference[] serviceReferences = bundleContext.getServiceReferences(null, basicResourceConfigurationInterfaceFilter);
  3. //            if (serviceReferences != null) {
  4. //                for (ServiceReference serviceReference : serviceReferences) {
  5. //                    if (serviceReference != null) {
  6. //                        BasicResourceConfiguration brc = (BasicResourceConfiguration) bundleContext.getService(serviceReference);
  7. //                        Configuration brcConfiguration = brc.getBasicConfiguration("startyourdaymanager", "page");
  8. //                        c = brcConfiguration;
  9. //                    }
  10. //                }
  11. //            }
  12.  
  13.             ServiceReference serviceReference = bundleContext.getServiceReference(basicResourceConfigurationInterfaceFullName);
  14.             System.err.println("serviceReference " + serviceReference);
  15.             if (serviceReference != null) {
  16.                 BasicResourceConfiguration brc = (BasicResourceConfiguration) bundleContext.getService(serviceReference);
  17.                 Configuration brcConfiguration = brc.getBasicConfiguration("startyourdaymanager", "page");
  18.                 c = brcConfiguration;
  19.             }