use of org.uberfire.backend.vfs.Path in project kie-wb-common by kiegroup.
the class CalledElementFormProvider method getBusinessProcessIDs.
public Map<Object, String> getBusinessProcessIDs() {
final Set<ValueIndexTerm> queryTerms = new HashSet<ValueIndexTerm>() {
{
add(new ValueResourceIndexTerm("*", ResourceType.BPMN2, ValueIndexTerm.TermSearchType.WILDCARD));
}
};
List<RefactoringPageRow> results = queryService.query(FindBpmnProcessIdsQuery.NAME, queryTerms);
Map<Object, String> businessProcessIDs = new TreeMap<Object, String>();
for (RefactoringPageRow row : results) {
Map<String, Path> mapRow = (Map<String, Path>) row.getValue();
for (String rKey : mapRow.keySet()) {
businessProcessIDs.put(rKey, rKey);
}
}
return businessProcessIDs;
}
use of org.uberfire.backend.vfs.Path in project kie-wb-common by kiegroup.
the class WorkItemDefinitionMetadataRegistry method load.
public void load(final Metadata metadata, final Command callback) {
final Path rootPath = rootPathMetadataSupplier.apply(metadata);
workItemsByPathSupplier.accept(rootPath, workItemDefinitions -> {
workItemDefinitions.forEach(getMemoryRegistry()::register);
callback.execute();
});
}
use of org.uberfire.backend.vfs.Path in project kie-wb-common by kiegroup.
the class WorkItemDefinitionMetadataRegistryTest method testLoad.
@Test
@SuppressWarnings("unchecked")
public void testLoad() {
Path path = mock(Path.class);
Metadata metadata = mock(Metadata.class);
Command callback = mock(Command.class);
when(metadata.getRoot()).thenReturn(path);
tested.load(metadata, callback);
verify(workItemsByPathSupplier, times(1)).accept(eq(path), any(Consumer.class));
}
use of org.uberfire.backend.vfs.Path in project kie-wb-common by kiegroup.
the class PackageNameWhiteListServiceImplTest method testSave.
@Test
public void testSave() throws Exception {
final PackageNameWhiteListService service = makeService("");
final Path path = mock(Path.class);
final WhiteList whiteList = new WhiteList();
final Metadata metadata = new Metadata();
final String comment = "comment";
service.save(path, whiteList, metadata, comment);
verify(saver).save(path, whiteList, metadata, comment);
}
use of org.uberfire.backend.vfs.Path in project drools-wb by kiegroup.
the class GuidedDecisionTableGraphEditorServiceImpl method findDecisionTables.
private List<Path> findDecisionTables(final org.uberfire.java.nio.file.Path nioRootPath) {
final List<Path> paths = new ArrayList<>();
final DirectoryStream<org.uberfire.java.nio.file.Path> directoryStream = ioService.newDirectoryStream(nioRootPath);
for (org.uberfire.java.nio.file.Path nioPath : directoryStream) {
final Path path = Paths.convert(nioPath);
if (!dotFileFilter.accept(nioPath) && resourceType.accept(path)) {
paths.add(path);
}
}
return paths;
}
Aggregations