@Test public void testPerspectiveRecursiveIssue() throws Exception { LayoutComponent layoutComponentB = new LayoutComponent("PerspectiveDrag"); layoutComponentB.addProperty(PERSPECTIVE_ID, "B"); layoutColumnA.add(layoutComponentB); LayoutComponent layoutComponentA = new LayoutComponent("PerspectiveDrag"); layoutComponentB.addProperty(PERSPECTIVE_ID, "A"); layoutColumnB.add(layoutComponentA); when(navigationServices.loadNavTree()).thenReturn(new NavTreeBuilder().build()); LayoutRecursionIssue info = layoutTemplateAnalyzer.analyzeRecursion(layoutA); assertEquals(info.getRefList().size(), 3); assertEquals(info.getRefList().get(0), new LayoutNavigationRef(PERSPECTIVE, "A")); assertEquals(info.getRefList().get(1), new LayoutNavigationRef(NAV_COMPONENT, "PerspectiveDrag")); assertEquals(info.getRefList().get(2), new LayoutNavigationRef(PERSPECTIVE, "A")); }
public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); }
LayoutTemplateAnalyzer { public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); } }
LayoutTemplateAnalyzer { public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); } LayoutTemplateAnalyzer(); @Inject  LayoutTemplateAnalyzer(PerspectivePluginServicesImpl pluginServices, NavigationServicesImpl navigationServices); }
LayoutTemplateAnalyzer { public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); } LayoutTemplateAnalyzer(); @Inject  LayoutTemplateAnalyzer(PerspectivePluginServicesImpl pluginServices, NavigationServicesImpl navigationServices); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutTemplate layoutTemplate, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutRow row, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(NavGroup navGroup, LayoutNavigationRefType navGroupRefType, LayoutRecursionIssue issue); boolean analyzeRecursion(String perspectiveId, LayoutRecursionIssue issue); boolean hasNavigationComponents(LayoutTemplate layoutTemplate); boolean hasNavigationComponents(LayoutRow row); }
LayoutTemplateAnalyzer { public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); } LayoutTemplateAnalyzer(); @Inject  LayoutTemplateAnalyzer(PerspectivePluginServicesImpl pluginServices, NavigationServicesImpl navigationServices); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutTemplate layoutTemplate, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutRow row, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(NavGroup navGroup, LayoutNavigationRefType navGroupRefType, LayoutRecursionIssue issue); boolean analyzeRecursion(String perspectiveId, LayoutRecursionIssue issue); boolean hasNavigationComponents(LayoutTemplate layoutTemplate); boolean hasNavigationComponents(LayoutRow row);  }