@Test public void testContains() { Path path = mock(Path.class); when(metadata.getPath()).thenReturn(path); doReturn(diagram).when(diagramService).getDiagramByPath(path); assertTrue(diagramService.contains(diagram)); verify(diagramService, times(1)).getDiagramByPath(path); }
public boolean contains(final D item) { return null != getDiagramByPath(item.getMetadata().getPath()); }
AbstractVFSDiagramService implements BaseDiagramService<M, D> { public boolean contains(final D item) { return null != getDiagramByPath(item.getMetadata().getPath()); } }
AbstractVFSDiagramService implements BaseDiagramService<M, D> { public boolean contains(final D item) { return null != getDiagramByPath(item.getMetadata().getPath()); } AbstractVFSDiagramService(final DefinitionManager definitionManager,
                                     final FactoryManager factoryManager,
                                     final Instance<DefinitionSetService> definitionSetServiceInstances,
                                     final BackendRegistryFactory registryFactory,
                                     final User identity); }
AbstractVFSDiagramService implements BaseDiagramService<M, D> { public boolean contains(final D item) { return null != getDiagramByPath(item.getMetadata().getPath()); } AbstractVFSDiagramService(final DefinitionManager definitionManager,
                                     final FactoryManager factoryManager,
                                     final Instance<DefinitionSetService> definitionSetServiceInstances,
                                     final BackendRegistryFactory registryFactory,
                                     final User identity); Path create(final Path path,
                       final String name,
                       final String defSetId,
                       final Metadata metadata); @Override String getRawContent(D diagram); @SuppressWarnings("unchecked") D getDiagramByPath(final org.uberfire.backend.vfs.Path file); M saveOrUpdate(final D diagram); @Override Path saveOrUpdateSvg(Path diagramPath, String rawDiagramSvg); boolean delete(final D diagram); boolean contains(final D item); Collection<D> getDiagramsByPath(final org.uberfire.java.nio.file.Path root); boolean accepts(final org.uberfire.backend.vfs.Path path); }
AbstractVFSDiagramService implements BaseDiagramService<M, D> { public boolean contains(final D item) { return null != getDiagramByPath(item.getMetadata().getPath()); } AbstractVFSDiagramService(final DefinitionManager definitionManager,
                                     final FactoryManager factoryManager,
                                     final Instance<DefinitionSetService> definitionSetServiceInstances,
                                     final BackendRegistryFactory registryFactory,
                                     final User identity); Path create(final Path path,
                       final String name,
                       final String defSetId,
                       final Metadata metadata); @Override String getRawContent(D diagram); @SuppressWarnings("unchecked") D getDiagramByPath(final org.uberfire.backend.vfs.Path file); M saveOrUpdate(final D diagram); @Override Path saveOrUpdateSvg(Path diagramPath, String rawDiagramSvg); boolean delete(final D diagram); boolean contains(final D item); Collection<D> getDiagramsByPath(final org.uberfire.java.nio.file.Path root); boolean accepts(final org.uberfire.backend.vfs.Path path); static final String SVG_SUFFIX; }