@Test public void testActiveForeignSourceNames() throws Exception { FileSystemBuilder bldr = new FileSystemBuilder("target", "testActiveForeignSourceNames"); File fsDir = bldr.dir("foreignSource").file("test.xml").file("noreq.xml").pop(); File reqDir = bldr.dir("requisitions").file("test.xml").file("pending.xml").pop(); FasterFilesystemForeignSourceRepository repo = repo(fsDir, reqDir); assertEquals(set("test", "pending", "noreq"), repo.getActiveForeignSourceNames()); }
public Set<String> getActiveForeignSourceNames() { m_readLock.lock(); try { Set<String> activeForeignSourceNames = new LinkedHashSet<String>(); activeForeignSourceNames.addAll(m_foreignSources.getBaseNamesWithExtension(".xml")); activeForeignSourceNames.addAll(m_requisitions.getBaseNamesWithExtension(".xml")); return activeForeignSourceNames; } finally { m_readLock.unlock(); } }
FasterFilesystemForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { public Set<String> getActiveForeignSourceNames() { m_readLock.lock(); try { Set<String> activeForeignSourceNames = new LinkedHashSet<String>(); activeForeignSourceNames.addAll(m_foreignSources.getBaseNamesWithExtension(".xml")); activeForeignSourceNames.addAll(m_requisitions.getBaseNamesWithExtension(".xml")); return activeForeignSourceNames; } finally { m_readLock.unlock(); } } }
FasterFilesystemForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { public Set<String> getActiveForeignSourceNames() { m_readLock.lock(); try { Set<String> activeForeignSourceNames = new LinkedHashSet<String>(); activeForeignSourceNames.addAll(m_foreignSources.getBaseNamesWithExtension(".xml")); activeForeignSourceNames.addAll(m_requisitions.getBaseNamesWithExtension(".xml")); return activeForeignSourceNames; } finally { m_readLock.unlock(); } } FasterFilesystemForeignSourceRepository(); }
FasterFilesystemForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { public Set<String> getActiveForeignSourceNames() { m_readLock.lock(); try { Set<String> activeForeignSourceNames = new LinkedHashSet<String>(); activeForeignSourceNames.addAll(m_foreignSources.getBaseNamesWithExtension(".xml")); activeForeignSourceNames.addAll(m_requisitions.getBaseNamesWithExtension(".xml")); return activeForeignSourceNames; } finally { m_readLock.unlock(); } } FasterFilesystemForeignSourceRepository(); @Override void afterPropertiesSet(); Set<String> getActiveForeignSourceNames(); int getForeignSourceCount(); Set<ForeignSource> getForeignSources(); ForeignSource getForeignSource(final String foreignSourceName); void save(final ForeignSource foreignSource); void delete(final ForeignSource foreignSource); Set<Requisition> getRequisitions(); Requisition getRequisition(final String foreignSourceName); Requisition getRequisition(final ForeignSource foreignSource); void save(final Requisition requisition); void delete(final Requisition requisition); void setRequisitionPath(final String path); void setForeignSourcePath(final String path); @Override Date getRequisitionDate(final String foreignSource); @Override URL getRequisitionURL(final String foreignSource); @Override void flush(); }
FasterFilesystemForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { public Set<String> getActiveForeignSourceNames() { m_readLock.lock(); try { Set<String> activeForeignSourceNames = new LinkedHashSet<String>(); activeForeignSourceNames.addAll(m_foreignSources.getBaseNamesWithExtension(".xml")); activeForeignSourceNames.addAll(m_requisitions.getBaseNamesWithExtension(".xml")); return activeForeignSourceNames; } finally { m_readLock.unlock(); } } FasterFilesystemForeignSourceRepository(); @Override void afterPropertiesSet(); Set<String> getActiveForeignSourceNames(); int getForeignSourceCount(); Set<ForeignSource> getForeignSources(); ForeignSource getForeignSource(final String foreignSourceName); void save(final ForeignSource foreignSource); void delete(final ForeignSource foreignSource); Set<Requisition> getRequisitions(); Requisition getRequisition(final String foreignSourceName); Requisition getRequisition(final ForeignSource foreignSource); void save(final Requisition requisition); void delete(final Requisition requisition); void setRequisitionPath(final String path); void setForeignSourcePath(final String path); @Override Date getRequisitionDate(final String foreignSource); @Override URL getRequisitionURL(final String foreignSource); @Override void flush();  }