示例#1
0
 private DependencyEngine getDependencyEngine(String id) {
   for (DependencyEngine dependencyEngine : dependencyEngines) {
     if (dependencyEngine == null || dependencyEngine.getDependencyEngineId() == null) continue;
     if (dependencyEngine.getDependencyEngineId().equalsIgnoreCase(id)) return dependencyEngine;
   }
   return null;
 }
示例#2
0
 public synchronized List<String> getDependencyEngineIds() {
   List<String> list = new ArrayList<String>();
   for (DependencyEngine dependencyEngine : dependencyEngines) {
     if (dependencyEngine == null || dependencyEngine.getDependencyEngineId() == null) continue;
     list.add(new String(dependencyEngine.getDependencyEngineId()));
   }
   return list;
 }
示例#3
0
 public DependencyEnginePool(DependencyEngine... dependencyEngines) {
   if (dependencyEngines != null) {
     for (DependencyEngine dependencyEngine : dependencyEngines) {
       if (dependencyEngine.getDependencyEngineId() == null)
         dependencyEngine.setDependencyEngineId(dependencyEngine.getClass().getSimpleName());
       add(dependencyEngine.getDependencyEngineId(), dependencyEngine);
     }
   }
 }
示例#4
0
 public synchronized DependencyEngine get(Arguments arguments) {
   DependencyEngine dependencyEngine = null;
   try {
     dependencyEngine = findEngine(arguments);
   } catch (DtException ex) {
     dependencyEngine = getDefaultEngine();
   }
   if (arguments.getDependencyEngineId() != null
       && arguments.getDependencyEngineId().length() > 0) {
     if (!(dependencyEngine != null
         && dependencyEngine.getDependencyEngineId() != null
         && dependencyEngine
             .getDependencyEngineId()
             .equalsIgnoreCase(arguments.getDependencyEngineId()))) {
       throw new DtException(
           "unable to find a dependency engine with id: " + arguments.getDependencyEngineId());
     }
   }
   ;
   return dependencyEngine;
 }