@Test public void visit_should_filter_lot_effectivity() throws EntityConstraintException, NotAllowedException, PartMasterNotFoundException { String workspaceId = "workspace01"; ConfigurationItem configurationItem = createConfigurationItem(workspaceId); ProductConfigSpec filter = new LotBasedEffectivityConfigSpec("50", configurationItem); PartMaster designItem = createPartMaster(configurationItem, "1", "A", true, ProductBaselineType.EFFECTIVE_LOT_ID); visit(workspaceId, filter, designItem); Assert.assertNotNull(filter); Assert.assertNotNull(filter.getRetainedPartIterations()); Assert.assertEquals(filter.getRetainedPartIterations().size(), 2); }
public Component visit(String workspaceId, ProductStructureFilter pFilter, PartMaster pNodeFrom, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks) throws PartMasterNotFoundException, EntityConstraintException, NotAllowedException { init(workspaceId, pStopAtDepth, pFilter, callbacks); return visit(pNodeFrom, new ArrayList<PartLink>() {{ add(createVirtualRootLink(pNodeFrom)); }}, new ArrayList<PartMaster>() {{ add(pNodeFrom); }} ); }
PSFilterVisitor { public Component visit(String workspaceId, ProductStructureFilter pFilter, PartMaster pNodeFrom, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks) throws PartMasterNotFoundException, EntityConstraintException, NotAllowedException { init(workspaceId, pStopAtDepth, pFilter, callbacks); return visit(pNodeFrom, new ArrayList<PartLink>() {{ add(createVirtualRootLink(pNodeFrom)); }}, new ArrayList<PartMaster>() {{ add(pNodeFrom); }} ); } }
PSFilterVisitor { public Component visit(String workspaceId, ProductStructureFilter pFilter, PartMaster pNodeFrom, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks) throws PartMasterNotFoundException, EntityConstraintException, NotAllowedException { init(workspaceId, pStopAtDepth, pFilter, callbacks); return visit(pNodeFrom, new ArrayList<PartLink>() {{ add(createVirtualRootLink(pNodeFrom)); }}, new ArrayList<PartMaster>() {{ add(pNodeFrom); }} ); }  }
PSFilterVisitor { public Component visit(String workspaceId, ProductStructureFilter pFilter, PartMaster pNodeFrom, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks) throws PartMasterNotFoundException, EntityConstraintException, NotAllowedException { init(workspaceId, pStopAtDepth, pFilter, callbacks); return visit(pNodeFrom, new ArrayList<PartLink>() {{ add(createVirtualRootLink(pNodeFrom)); }}, new ArrayList<PartMaster>() {{ add(pNodeFrom); }} ); }  Component visit(String workspaceId, ProductStructureFilter pFilter, PartMaster pNodeFrom, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks); Component visit(String workspaceId, ProductStructureFilter pFilter, List<PartLink> pStartingPath, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks); void stop(); }
PSFilterVisitor { public Component visit(String workspaceId, ProductStructureFilter pFilter, PartMaster pNodeFrom, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks) throws PartMasterNotFoundException, EntityConstraintException, NotAllowedException { init(workspaceId, pStopAtDepth, pFilter, callbacks); return visit(pNodeFrom, new ArrayList<PartLink>() {{ add(createVirtualRootLink(pNodeFrom)); }}, new ArrayList<PartMaster>() {{ add(pNodeFrom); }} ); }  Component visit(String workspaceId, ProductStructureFilter pFilter, PartMaster pNodeFrom, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks); Component visit(String workspaceId, ProductStructureFilter pFilter, List<PartLink> pStartingPath, Integer pStopAtDepth, PSFilterVisitorCallbacks callbacks); void stop();  }