Reputation: 4444
I'm using OSGi ConfigurationAdmin to return a list of configurations:
Configuration[] configurations = configAdmin.listConfigurations(null);
I can then iterate through that list to get the Persistent IDs (group of configuration properties):
for (Configuration configuration : configurations) {
System.out.println(configuration.getPid());
}
How do i now iterate through the properties in each PID/Configuration?
Upvotes: 0
Views: 141
Reputation: 4444
Found the answer here: Iterate Dictionary in Java. See answer that states:
If you have to use a dictionary (for example osgi felix framework ManagedService) then the following works...
I ended up using an iterator, as described there. Interestingly, that answer pertains to OSGi's use of Dictionary, which is also what raised the question for me.
Upvotes: 1