@Override public Locations getLocations(String application, String profile, String label) { List<String> locations = new ArrayList<>(); for(EnvironmentRepository repo : this.environmentRepositories) { if(repo instanceof SearchPathLocator) { locations.addAll(Arrays.asList(((SearchPathLocator) repo).getLocations(application, profile, label).getLocations())); } } return new Locations(application, profile, label, null, locations.toArray(new String[locations.size()])); } }
return new Locations(application, profile, label, this.version, output.toArray(new String[0]));
@Override public synchronized Locations getLocations(String application, String profile, String label) { if (label == null) { label = this.defaultLabel; } SvnOperationFactory svnOperationFactory = new SvnOperationFactory(); if (hasText(getUsername())) { svnOperationFactory .setAuthenticationManager(new DefaultSVNAuthenticationManager(null, false, getUsername(), getPassword())); } try { String version; if (new File(getWorkingDirectory(), ".svn").exists()) { version = update(svnOperationFactory, label); } else { version = checkout(svnOperationFactory); } return new Locations(application, profile, label, version, getPaths(application, profile, label)); } catch (SVNException e) { throw new IllegalStateException("Cannot checkout repository", e); } finally { svnOperationFactory.dispose(); } }
@Override public synchronized Locations getLocations(String application, String profile, String label) { if (label == null) { label = this.defaultLabel; } String version = refresh(label); return new Locations(application, profile, label, version, getSearchLocations(getWorkingDirectory(), application, profile, label)); }