use of com.odysseusinc.arachne.storage.model.QuerySpec in project ArachneCentralAPI by OHDSI.
the class BaseSubmissionServiceImpl method getResultFiles.
@Override
public List<ArachneFileMeta> getResultFiles(IUser user, Long submissionId, ResultFileSearch resultFileSearch) throws PermissionDeniedException {
Submission submission = submissionRepository.findById(submissionId, EntityUtils.fromAttributePaths("dataSource", "dataSource.dataNode"));
checkSubmissionPermission(user, submission);
String resultFilesPath = contentStorageHelper.getResultFilesDir(submission, resultFileSearch.getPath());
QuerySpec querySpec = new QuerySpec();
querySpec.setName(resultFileSearch.getRealName());
querySpec.setPath(resultFilesPath);
return contentStorageService.searchFiles(querySpec);
}
use of com.odysseusinc.arachne.storage.model.QuerySpec in project ArachneCentralAPI by OHDSI.
the class SubmissionHelper method searchFiles.
private List<ArachneFileMeta> searchFiles(Submission submission, String fileNameLike) {
QuerySpec querySpec = new QuerySpec();
querySpec.setPath(contentStorageHelper.getResultFilesDir(submission));
querySpec.setName(fileNameLike);
querySpec.setNameLike(true);
querySpec.setSearchSubfolders(true);
return contentStorageService.searchFiles(querySpec);
}
Aggregations