Java API
//Add the reference
@Reference
org.osgi.service.cm.ConfigurationAdmin configAdmin;
//Reterive/Update the configration
org.osgi.service.cm.Configuration config = configAdmin.getConfiguration("com.day.cq.mailer.DefaultMailService");
Dictionary d = config.getProperties();
String fromAddress=(String)d.get("from.address");
d.put("from.address", "albin.issac1@gmail.com");
config.update(d);
@Reference
org.osgi.service.cm.ConfigurationAdmin configAdmin;
//Reterive/Update the configration
org.osgi.service.cm.Configuration config = configAdmin.getConfiguration("com.day.cq.mailer.DefaultMailService");
Dictionary d = config.getProperties();
String fromAddress=(String)d.get("from.address");
d.put("from.address", "albin.issac1@gmail.com");
config.update(d);
No comments:
Post a Comment
If you have any doubts or questions, please let us know.