@Test public void testRequisition() throws Exception { createRequisition(); Requisition r = m_foreignSourceRepository.getRequisition(m_defaultForeignSourceName); TestVisitor v = new TestVisitor(); r.visit(v); assertEquals("number of nodes visited", 2, v.getNodeReqs().size()); assertEquals("node name matches", "apknd", v.getNodeReqs().get(0).getNodeLabel()); }
@Override public Requisition getRequisition(final String foreignSourceName) throws ForeignSourceRepositoryException { readLock(); try { return getRequisitionMap().get(foreignSourceName); } finally { readUnlock(); } }
CachingForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { @Override public Requisition getRequisition(final String foreignSourceName) throws ForeignSourceRepositoryException { readLock(); try { return getRequisitionMap().get(foreignSourceName); } finally { readUnlock(); } } }
CachingForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { @Override public Requisition getRequisition(final String foreignSourceName) throws ForeignSourceRepositoryException { readLock(); try { return getRequisitionMap().get(foreignSourceName); } finally { readUnlock(); } } CachingForeignSourceRepository(); }
CachingForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { @Override public Requisition getRequisition(final String foreignSourceName) throws ForeignSourceRepositoryException { readLock(); try { return getRequisitionMap().get(foreignSourceName); } finally { readUnlock(); } } CachingForeignSourceRepository(); ForeignSourceRepository getForeignSourceRepository(); void setForeignSourceRepository(final ForeignSourceRepository fsr); void afterPropertiesSet(); @Override Set<String> getActiveForeignSourceNames(); @Override int getForeignSourceCount(); @Override Set<ForeignSource> getForeignSources(); @Override ForeignSource getForeignSource(final String foreignSourceName); @Override void save(final ForeignSource foreignSource); @Override void delete(final ForeignSource foreignSource); @Override ForeignSource getDefaultForeignSource(); @Override void putDefaultForeignSource(final ForeignSource foreignSource); @Override void resetDefaultForeignSource(); @Override Requisition importResourceRequisition(final Resource resource); @Override Set<Requisition> getRequisitions(); @Override Requisition getRequisition(final String foreignSourceName); @Override Requisition getRequisition(final ForeignSource foreignSource); @Override Date getRequisitionDate(final String foreignSource); @Override URL getRequisitionURL(final String foreignSource); @Override void save(final Requisition requisition); @Override void delete(final Requisition requisition); @Override OnmsNodeRequisition getNodeRequisition(final String foreignSource, final String foreignId); @Override void validate(final ForeignSource foreignSource); @Override void validate(final Requisition requisition); @Override void flush(); }
CachingForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { @Override public Requisition getRequisition(final String foreignSourceName) throws ForeignSourceRepositoryException { readLock(); try { return getRequisitionMap().get(foreignSourceName); } finally { readUnlock(); } } CachingForeignSourceRepository(); ForeignSourceRepository getForeignSourceRepository(); void setForeignSourceRepository(final ForeignSourceRepository fsr); void afterPropertiesSet(); @Override Set<String> getActiveForeignSourceNames(); @Override int getForeignSourceCount(); @Override Set<ForeignSource> getForeignSources(); @Override ForeignSource getForeignSource(final String foreignSourceName); @Override void save(final ForeignSource foreignSource); @Override void delete(final ForeignSource foreignSource); @Override ForeignSource getDefaultForeignSource(); @Override void putDefaultForeignSource(final ForeignSource foreignSource); @Override void resetDefaultForeignSource(); @Override Requisition importResourceRequisition(final Resource resource); @Override Set<Requisition> getRequisitions(); @Override Requisition getRequisition(final String foreignSourceName); @Override Requisition getRequisition(final ForeignSource foreignSource); @Override Date getRequisitionDate(final String foreignSource); @Override URL getRequisitionURL(final String foreignSource); @Override void save(final Requisition requisition); @Override void delete(final Requisition requisition); @Override OnmsNodeRequisition getNodeRequisition(final String foreignSource, final String foreignId); @Override void validate(final ForeignSource foreignSource); @Override void validate(final Requisition requisition); @Override void flush();  }