@Test public void testDelete() { Path path = mock(Path.class); when(path.toURI()).thenReturn(FILE_URI); when(metadata.getPath()).thenReturn(path); org.uberfire.java.nio.file.Path expectedNioPath = Paths.convert(path); diagramService.delete(diagram); verify(ioService, times(1)).deleteIfExists(eq(expectedNioPath), any(DeleteOption.class)); }
public boolean delete(final Path _path, final String message) { final org.uberfire.java.nio.file.Path path = Paths.convert(_path); return getIoService().deleteIfExists(path, StandardDeleteOption.NON_EMPTY_DIRECTORIES); }
ProjectDiagramServiceController extends AbstractVFSDiagramService<ProjectMetadata, ProjectDiagram> { public boolean delete(final Path _path, final String message) { final org.uberfire.java.nio.file.Path path = Paths.convert(_path); return getIoService().deleteIfExists(path, StandardDeleteOption.NON_EMPTY_DIRECTORIES); } }
ProjectDiagramServiceController extends AbstractVFSDiagramService<ProjectMetadata, ProjectDiagram> { public boolean delete(final Path _path, final String message) { final org.uberfire.java.nio.file.Path path = Paths.convert(_path); return getIoService().deleteIfExists(path, StandardDeleteOption.NON_EMPTY_DIRECTORIES); } ProjectDiagramServiceController(final DefinitionManager definitionManager,
                                    final FactoryManager factoryManager,
                                    final Instance<DefinitionSetService> definitionSetServiceInstances,
                                    final IOService ioService,
                                    final BackendRegistryFactory registryFactory,
                                    final KieModuleService moduleService,
                                    final KieServiceOverviewLoader overviewLoader,
                                    final User identity); }
ProjectDiagramServiceController extends AbstractVFSDiagramService<ProjectMetadata, ProjectDiagram> { public boolean delete(final Path _path, final String message) { final org.uberfire.java.nio.file.Path path = Paths.convert(_path); return getIoService().deleteIfExists(path, StandardDeleteOption.NON_EMPTY_DIRECTORIES); } ProjectDiagramServiceController(final DefinitionManager definitionManager,
                                    final FactoryManager factoryManager,
                                    final Instance<DefinitionSetService> definitionSetServiceInstances,
                                    final IOService ioService,
                                    final BackendRegistryFactory registryFactory,
                                    final KieModuleService moduleService,
                                    final KieServiceOverviewLoader overviewLoader,
                                    final User identity); @Override Path create(final Path path,
                       final String name,
                       final String defSetId); Path create(final Path path,
                       final String name,
                       final String defSetId,
                       final String moduleName,
                       final Package projectPkg,
                       final Optional<String> projectType); @Override ProjectDiagram getDiagramByPath(Path file); Path save(final Path path,
                     final ProjectDiagram diagram,
                     final Map<String, ?> attributes,
                     final OpenOption... comment); Path saveAsXml(final Path path,
                          final String xml,
                          final Map<String, ?> attributes,
                          final OpenOption... comment); boolean delete(final Path _path,
                          final String message); }
ProjectDiagramServiceController extends AbstractVFSDiagramService<ProjectMetadata, ProjectDiagram> { public boolean delete(final Path _path, final String message) { final org.uberfire.java.nio.file.Path path = Paths.convert(_path); return getIoService().deleteIfExists(path, StandardDeleteOption.NON_EMPTY_DIRECTORIES); } ProjectDiagramServiceController(final DefinitionManager definitionManager,
                                    final FactoryManager factoryManager,
                                    final Instance<DefinitionSetService> definitionSetServiceInstances,
                                    final IOService ioService,
                                    final BackendRegistryFactory registryFactory,
                                    final KieModuleService moduleService,
                                    final KieServiceOverviewLoader overviewLoader,
                                    final User identity); @Override Path create(final Path path,
                       final String name,
                       final String defSetId); Path create(final Path path,
                       final String name,
                       final String defSetId,
                       final String moduleName,
                       final Package projectPkg,
                       final Optional<String> projectType); @Override ProjectDiagram getDiagramByPath(Path file); Path save(final Path path,
                     final ProjectDiagram diagram,
                     final Map<String, ?> attributes,
                     final OpenOption... comment); Path saveAsXml(final Path path,
                          final String xml,
                          final Map<String, ?> attributes,
                          final OpenOption... comment); boolean delete(final Path _path,
                          final String message);  }