@Test public void testSimpleRecursion() throws Exception { when(navigationServices.loadNavTree()).thenReturn(new NavTreeBuilder() .group("groupA", "", "", true) .item("layout", "", "", true, NavWorkbenchCtx.perspective("A")) .endGroup() .build()); LayoutRecursionIssue info = layoutTemplateAnalyzer.analyzeRecursion(layoutA); assertEquals(info.getRefList().size(), 4); assertEquals(info.getRefList().get(0), new LayoutNavigationRef(PERSPECTIVE, "A")); assertEquals(info.getRefList().get(1), new LayoutNavigationRef(NAV_COMPONENT, CAROUSEL.getFQClassName())); assertEquals(info.getRefList().get(2), new LayoutNavigationRef(NAV_GROUP_DEFINED, "groupA")); assertEquals(info.getRefList().get(3), 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);  }