@Test public void findJobUsingEntity_Found() throws Exception { assertEquals(job, manager.findDependentJob(spawn, "my-macro")); }
@Override protected Job findDependentJob(Spawn spawn, String entityKey) { for (Job job : spawn.listJobs()) { String rawconf = spawn.getJobConfig(job.getId()); if (rawconf != null && rawconf.contains("%{" + entityKey + "}%")) { return job; } } return null; }
JobMacroManager extends AbstractJobEntityManager<JobMacro> { @Override protected Job findDependentJob(Spawn spawn, String entityKey) { for (Job job : spawn.listJobs()) { String rawconf = spawn.getJobConfig(job.getId()); if (rawconf != null && rawconf.contains("%{" + entityKey + "}%")) { return job; } } return null; } }
JobMacroManager extends AbstractJobEntityManager<JobMacro> { @Override protected Job findDependentJob(Spawn spawn, String entityKey) { for (Job job : spawn.listJobs()) { String rawconf = spawn.getJobConfig(job.getId()); if (rawconf != null && rawconf.contains("%{" + entityKey + "}%")) { return job; } } return null; } JobMacroManager(Spawn spawn); }
JobMacroManager extends AbstractJobEntityManager<JobMacro> { @Override protected Job findDependentJob(Spawn spawn, String entityKey) { for (Job job : spawn.listJobs()) { String rawconf = spawn.getJobConfig(job.getId()); if (rawconf != null && rawconf.contains("%{" + entityKey + "}%")) { return job; } } return null; } JobMacroManager(Spawn spawn);  }
JobMacroManager extends AbstractJobEntityManager<JobMacro> { @Override protected Job findDependentJob(Spawn spawn, String entityKey) { for (Job job : spawn.listJobs()) { String rawconf = spawn.getJobConfig(job.getId()); if (rawconf != null && rawconf.contains("%{" + entityKey + "}%")) { return job; } } return null; } JobMacroManager(Spawn spawn);   }