private boolean isFolderStructure(String deploymentFolderPath) { boolean folderStructure; try { if (repository instanceof FolderRepository) { folderStructure = !((FolderRepository) repository).listFolders(deploymentFolderPath + "/").isEmpty(); } else { folderStructure = false; } } catch (IOException e) { throw RuntimeExceptionWrapper.wrap(e); } return folderStructure; } }
public List<ADeploymentProject> getDDProjects() throws RepositoryException { LinkedList<ADeploymentProject> result = new LinkedList<>(); Collection<FileData> fileDatas; try { String path = deploymentConfigurationLocation; if (repository instanceof FolderRepository) { fileDatas = ((FolderRepository) repository).listFolders(path); } else { fileDatas = repository.list(path); } } catch (IOException e) { throw new RepositoryException("Cannot read the deploy repository", e); } for (FileData fileData : fileDatas) { result.add(new ADeploymentProject(getRepository(), fileData)); } return result; }
public Collection<AProject> getProjects() { List<AProject> result = new LinkedList<>(); Collection<FileData> fileDatas; Repository repository = getRepository(); try { String path = rulesLocation; if (repository instanceof FolderRepository) { fileDatas = ((FolderRepository) repository).listFolders(path); } else { fileDatas = repository.list(path); } } catch (IOException ex) { throw RuntimeExceptionWrapper.wrap(ex); } synchronized (projects) { projects.clear(); projectsVersions.clear(); for (FileData fileData : fileDatas) { AProject project = new AProject(repository, fileData); // get from the repository result.add(project); projects.put(project.getName(), project); } } return result; }
if (repository instanceof FolderRepository) { fileDatas = ((FolderRepository) repository).listFolders(deployPath); } else { try { if (repository instanceof FolderRepository) { folderStructure = !((FolderRepository) repository).listFolders(folderPath + "/").isEmpty(); } else { folderStructure = false;
fileDataList = repository.listFolders(folderPath); } else { fileDataList = repository.list(folderPath);
if (repository instanceof FolderRepository) { fileDatas = ((FolderRepository) repository).listFolders(deployPath); } else {