private boolean isRulesDeployed(String deploymentName) throws IOException { List<FileData> deployments = deployRepo.list(DeploymentUtils.DEPLOY_PATH + deploymentName + "/"); return !deployments.isEmpty(); }
private boolean isRulesDeployed(String deploymentName) throws IOException { List<FileData> deployments = deployRepo.list(deployPath + deploymentName + "/"); return !deployments.isEmpty(); }
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; }
Collection<FileData> fileDatas; try { fileDatas = repository.list(DeployUtils.DEPLOY_PATH); } catch (IOException ex) { throw RuntimeExceptionWrapper.wrap(ex);
} else { fileDatas = repository.list(deployPath);
} else { fileDatas = repository.list(deployPath);
if (!deployRepo.list(deployPath + deploymentName + "/").isEmpty()) { return;
protected Map<String, AProjectArtefact> createInternalArtefacts() { HashMap<String, AProjectArtefact> internalArtefacts = new HashMap<>(); Collection<FileData> fileDatas; try { String folderPath = getFolderPath(); if (!folderPath.isEmpty() && !folderPath.endsWith("/")) { folderPath += "/"; } if (isHistoric()) { if (getRepository() instanceof FolderRepository) { fileDatas = ((FolderRepository) getRepository()).listFiles(folderPath, getFileData().getVersion()); } else { throw new UnsupportedOperationException("Can't get internal artifacts for historic project version"); } } else { fileDatas = getRepository().list(folderPath); } } catch (IOException ex) { throw RuntimeExceptionWrapper.wrap(ex); } for (FileData fileData : fileDatas) { if (!fileData.getName().equals(folderPath) && !fileData.isDeleted()) { String artefactName = fileData.getName().substring(folderPath.length() + 1); internalArtefacts.put(artefactName, new AProjectResource(getProject(), getRepository(), fileData)); } } return internalArtefacts; }
List<FileData> existingProjects = deployRepo.list(deploymentPath + "/"); List<FileData> projectsToDelete = findProjectsToDelete(existingProjects, projectDescriptors); for (FileData fileData : projectsToDelete) {
List<FileData> existingProjects = deployRepo.list(deploymentPath); List<FileData> projectsToDelete = findProjectsToDelete(existingProjects, projectDescriptors); for (FileData fileData : projectsToDelete) {