use of org.uberfire.java.nio.base.SegmentedPath in project kie-wb-common by kiegroup.
the class AssetsUsageServiceImpl method getQueryList.
protected List<Path> getQueryList(Path assetPath, RefactorOperationBuilder<QueryOperationRequest>.RequiresModule builder) {
KieModule project = moduleService.resolveModule(assetPath);
String branch = "master";
org.uberfire.java.nio.file.Path nioPath = Paths.convert(assetPath);
if (nioPath instanceof SegmentedPath) {
branch = ((SegmentedPath) nioPath).getSegmentId();
}
QueryOperationRequest request = builder.inModuleRootPathURI(project.getRootPath().toURI()).onBranch(branch);
return refactoringQueryService.queryToList(request).stream().map(row -> (Path) row.getValue()).collect(Collectors.toList());
}
Aggregations