@Test public void testHasChildrenOnConfiguration() { context.currentResource(context.resourceResolver().getResource(CONFIGURATION_PATH)); ConfigurationColumnViewItem columnViewItem = context.request().adaptTo(ConfigurationColumnViewItem.class); Assert.assertFalse("Configuration doesn't have children", columnViewItem.hasChildren()); }
public boolean hasChildren() { if (isCommerceBucket()) return false; boolean isContainer = isConfigurationContainer(); boolean hasChildren = resource.hasChildren(); boolean hasMoreChildren = getChildCount(resource) > 1; boolean hasSettings = resource.getChild("settings") != null; return isContainer && (hasCommerceSetting || hasMoreChildren) || !isContainer && !hasCommerceSetting && (hasChildren && !hasSettings || hasMoreChildren && hasSettings); }
ConfigurationColumnViewItem { public boolean hasChildren() { if (isCommerceBucket()) return false; boolean isContainer = isConfigurationContainer(); boolean hasChildren = resource.hasChildren(); boolean hasMoreChildren = getChildCount(resource) > 1; boolean hasSettings = resource.getChild("settings") != null; return isContainer && (hasCommerceSetting || hasMoreChildren) || !isContainer && !hasCommerceSetting && (hasChildren && !hasSettings || hasMoreChildren && hasSettings); } }
ConfigurationColumnViewItem { public boolean hasChildren() { if (isCommerceBucket()) return false; boolean isContainer = isConfigurationContainer(); boolean hasChildren = resource.hasChildren(); boolean hasMoreChildren = getChildCount(resource) > 1; boolean hasSettings = resource.getChild("settings") != null; return isContainer && (hasCommerceSetting || hasMoreChildren) || !isContainer && !hasCommerceSetting && (hasChildren && !hasSettings || hasMoreChildren && hasSettings); }  }
ConfigurationColumnViewItem { public boolean hasChildren() { if (isCommerceBucket()) return false; boolean isContainer = isConfigurationContainer(); boolean hasChildren = resource.hasChildren(); boolean hasMoreChildren = getChildCount(resource) > 1; boolean hasSettings = resource.getChild("settings") != null; return isContainer && (hasCommerceSetting || hasMoreChildren) || !isContainer && !hasCommerceSetting && (hasChildren && !hasSettings || hasMoreChildren && hasSettings); }  @PostConstruct void initModel(); String getTitle(); boolean hasChildren(); List<String> getQuickActionsRel(); }
ConfigurationColumnViewItem { public boolean hasChildren() { if (isCommerceBucket()) return false; boolean isContainer = isConfigurationContainer(); boolean hasChildren = resource.hasChildren(); boolean hasMoreChildren = getChildCount(resource) > 1; boolean hasSettings = resource.getChild("settings") != null; return isContainer && (hasCommerceSetting || hasMoreChildren) || !isContainer && !hasCommerceSetting && (hasChildren && !hasSettings || hasMoreChildren && hasSettings); }  @PostConstruct void initModel(); String getTitle(); boolean hasChildren(); List<String> getQuickActionsRel();  }