@Override public Job apply(Job job) { job.setClient(client); return job; } }
@Override public Job apply(Job job) { job.setClient(client); return job; } }
@Override public Job apply(Job job) { job.setClient(client); return job; } }
@Override public Job apply(Job job) { job.setClient(client); return job; } }
@Override public String apply(Job job) { job.setClient(client); return job.getName(); } }).get(name);
@Override public String apply(Job job) { job.setClient(client); return job.getName(); } });
@Override public String apply(Job job) { job.setClient(client); return job.getName().toLowerCase(); } });
@Override public String apply(Job job) { job.setClient(client); return job.getName(); } });
@Override public String apply(Job job) { job.setClient(client); return job.getName(); } }).get(name);
@Override public String apply(Job job) { job.setClient(client); return job.getName(); } });
@Override public String apply(View view) { view.setClient(client); // TODO: Think about the following? Does there exists a // simpler/more elegant method? for (Job job : view.getJobs()) { job.setClient(client); } for (View item : view.getViews()) { item.setClient(client); } return view.getName(); } });
/** * Get a single view object from the given folder * * @param folder The name of the folder. * @param name name of the view in Jenkins * @return the view object * @throws IOException in case of an error. */ public View getView(FolderJob folder, String name) throws IOException { try { View resultView = client.get(UrlUtils.toViewBaseUrl(folder, name) + "/", View.class); resultView.setClient(client); // TODO: Think about the following? Does there exists a simpler/more // elegant method? for (Job job : resultView.getJobs()) { job.setClient(client); } for (View view : resultView.getViews()) { view.setClient(client); } return resultView; } catch (HttpResponseException e) { LOGGER.debug("getView(folder={}, name={}) status={}", folder, name, e.getStatusCode()); if (e.getStatusCode() == HttpStatus.SC_NOT_FOUND) { // TODO: Think hard about this. return null; } throw e; } }