if ("true".equals(misoProperties.get("miso.issuetracker.enabled"))) {
String trackerType = misoProperties.get("miso.issuetracker.tracker");
if (trackerType != null && !"".equals(trackerType)) {
try {
IssueTrackerManager manager = IssueTrackerFactory.newInstance().getTrackerManager(trackerType);
if (manager != null) {
for (String key : misoProperties.keySet()) {
if (key.startsWith("miso.issuetracker."+trackerType)) {
String prop = key.substring(key.lastIndexOf(".")+1);
String methodName = "set"+ LimsUtils.capitalise(prop); //prop.substring(0,1).toUpperCase() + prop.substring(1);
Method m = manager.getClass().getDeclaredMethod(methodName, String.class);
m.invoke(manager, misoProperties.get(key));
}
}
((DefaultListableBeanFactory)context.getBeanFactory()).removeBeanDefinition("issueTrackerManager");
context.getBeanFactory().registerSingleton("issueTrackerManager", manager);