@Test void testGetPageComponentFromOsgi_RelativePath() { List<ParsysConfig> configs; configs = Lists.newArrayList(underTest.getParsysConfigs(RESOURCE_PATH_1, context.resourceResolver())); assertEquals(1, configs.size()); assertSame(parsysConfig1, configs.get(0)); configs = Lists.newArrayList(underTest.getParsysConfigs(RESOURCE_PATH_2, context.resourceResolver())); assertEquals(2, configs.size()); assertSame(parsysConfig2, configs.get(0)); assertSame(parsysConfig1, configs.get(1)); }
@Override public @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull String pageComponentPath, @NotNull ResourceResolver resolver) { Resource pageComponentResource = resolver.getResource(pageComponentPath); if (pageComponentResource != null) { return ImmutableList.copyOf(getParsysConfigsWithInheritance(pageComponentResource, resolver)); } else { return ImmutableList.<ParsysConfig>of(); } }
ParsysConfigManagerImpl implements ParsysConfigManager { @Override public @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull String pageComponentPath, @NotNull ResourceResolver resolver) { Resource pageComponentResource = resolver.getResource(pageComponentPath); if (pageComponentResource != null) { return ImmutableList.copyOf(getParsysConfigsWithInheritance(pageComponentResource, resolver)); } else { return ImmutableList.<ParsysConfig>of(); } } }
ParsysConfigManagerImpl implements ParsysConfigManager { @Override public @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull String pageComponentPath, @NotNull ResourceResolver resolver) { Resource pageComponentResource = resolver.getResource(pageComponentPath); if (pageComponentResource != null) { return ImmutableList.copyOf(getParsysConfigsWithInheritance(pageComponentResource, resolver)); } else { return ImmutableList.<ParsysConfig>of(); } }  }
ParsysConfigManagerImpl implements ParsysConfigManager { @Override public @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull String pageComponentPath, @NotNull ResourceResolver resolver) { Resource pageComponentResource = resolver.getResource(pageComponentPath); if (pageComponentResource != null) { return ImmutableList.copyOf(getParsysConfigsWithInheritance(pageComponentResource, resolver)); } else { return ImmutableList.<ParsysConfig>of(); } }  @Override @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull String pageComponentPath, @NotNull ResourceResolver resolver); @Override @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull final String pageComponentPath, @NotNull final String relativePath,
      @NotNull final ResourceResolver resolver); }
ParsysConfigManagerImpl implements ParsysConfigManager { @Override public @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull String pageComponentPath, @NotNull ResourceResolver resolver) { Resource pageComponentResource = resolver.getResource(pageComponentPath); if (pageComponentResource != null) { return ImmutableList.copyOf(getParsysConfigsWithInheritance(pageComponentResource, resolver)); } else { return ImmutableList.<ParsysConfig>of(); } }  @Override @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull String pageComponentPath, @NotNull ResourceResolver resolver); @Override @NotNull Iterable<ParsysConfig> getParsysConfigs(@NotNull final String pageComponentPath, @NotNull final String relativePath,
      @NotNull final ResourceResolver resolver);  }