Package uk.ac.bbsrc.tgac.miso.core.manager

Examples of uk.ac.bbsrc.tgac.miso.core.manager.IssueTrackerManager


      ServiceLoader<IssueTrackerManager> consumerLoader = ServiceLoader.load(IssueTrackerManager.class);
      Iterator<IssueTrackerManager> consumerIterator = consumerLoader.iterator();

      managerMap = new HashMap<String, IssueTrackerManager>();
      while (consumerIterator.hasNext()) {
        IssueTrackerManager p = consumerIterator.next();

        if (!managerMap.containsKey(p.getType())) {
          managerMap.put(p.getType(), p);
        }
        else {
          if (managerMap.get(p.getType()) != p) {
            String msg = "Multiple different IssueTrackerManager with the same issue tracker type name " +
                         "('" + p.getType() + "') are present on the classpath. Issue tracker types names must be unique.";
            log.error(msg);
            throw new ServiceConfigurationError(msg);
          }
        }
      }
View Full Code Here


    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);
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.manager.IssueTrackerManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.