@Test public void testScanWithSubpackages() throws Exception { final File testPackage = TestPackageUtil.prepareTestPackage("subsubtest.zip"); final Map<PackageId, PackageId> expectIds = new LinkedHashMap<>(); final PackageId root = PackageId.fromString("my_packages:subsubtest"); final PackageId sub1 = PackageId.fromString("my_packages:subtest"); final PackageId suba = PackageId.fromString("my_packages:sub_a"); final PackageId subb = PackageId.fromString("my_packages:sub_b"); expectIds.put(sub1, root); expectIds.put(suba, sub1); expectIds.put(subb, sub1); final Map<PackageId, PackageId> subToParent = new LinkedHashMap<>(); final ProgressCheck check = mock(ProgressCheck.class); doAnswer(call -> subToParent.put(call.getArgument(0), call.getArgument(1))) .when(check).identifySubpackage(any(PackageId.class), any(PackageId.class)); builder().withProgressCheck(check).build().scanPackage(testPackage); assertEquals("expect ids", expectIds, subToParent); }
public List<CheckReport> scanPackage(final @NotNull File... file) throws AbortedScanException { return scanPackages(Arrays.asList(file)); }
OakMachine { public List<CheckReport> scanPackage(final @NotNull File... file) throws AbortedScanException { return scanPackages(Arrays.asList(file)); } }
OakMachine { public List<CheckReport> scanPackage(final @NotNull File... file) throws AbortedScanException { return scanPackages(Arrays.asList(file)); } private  OakMachine(final Packaging packagingService,
                       final List<ProgressCheck> progressChecks,
                       final ErrorListener errorListener,
                       final List<URL> preInstallUrls,
                       final List<InitStage> initStages,
                       final JcrCustomizer jcrCustomizer,
                       final InstallHookProcessorFactory installHookProcessorFactory,
                       final ClassLoader installHookClassLoader,
                       final boolean enablePreInstallHooks,
                       final InstallHookPolicy scanInstallHookPolicy,
                       final Supplier<NodeStore> nodeStoreSupplier,
                       final SubpackageSilencer subpackageSilencer,
                       final RepoInitProcessor repoInitProcessor,
                       final SlingSimulatorBackend slingSimulator,
                       final Set<String> runModes); }
OakMachine { public List<CheckReport> scanPackage(final @NotNull File... file) throws AbortedScanException { return scanPackages(Arrays.asList(file)); } private  OakMachine(final Packaging packagingService,
                       final List<ProgressCheck> progressChecks,
                       final ErrorListener errorListener,
                       final List<URL> preInstallUrls,
                       final List<InitStage> initStages,
                       final JcrCustomizer jcrCustomizer,
                       final InstallHookProcessorFactory installHookProcessorFactory,
                       final ClassLoader installHookClassLoader,
                       final boolean enablePreInstallHooks,
                       final InstallHookPolicy scanInstallHookPolicy,
                       final Supplier<NodeStore> nodeStoreSupplier,
                       final SubpackageSilencer subpackageSilencer,
                       final RepoInitProcessor repoInitProcessor,
                       final SlingSimulatorBackend slingSimulator,
                       final Set<String> runModes); List<ProgressCheck> getProgressChecks(); ErrorListener getErrorListener(); @Deprecated List<File> getPreInstallFiles(); List<URL> getPreInstallUrls(); @SuppressWarnings("WeakerAccess") void initAndInspect(final InspectBody<E> inspectBody); void adminInitAndInspect(final InspectBody<E> inspectBody); List<CheckReport> scanPackage(final @NotNull File... file); List<CheckReport> scanPackages(final List<File> files); static Packaging newOakpalPackagingService(); static Packaging newOakpalPackagingService(final @NotNull ClassLoader classLoader); }
OakMachine { public List<CheckReport> scanPackage(final @NotNull File... file) throws AbortedScanException { return scanPackages(Arrays.asList(file)); } private  OakMachine(final Packaging packagingService,
                       final List<ProgressCheck> progressChecks,
                       final ErrorListener errorListener,
                       final List<URL> preInstallUrls,
                       final List<InitStage> initStages,
                       final JcrCustomizer jcrCustomizer,
                       final InstallHookProcessorFactory installHookProcessorFactory,
                       final ClassLoader installHookClassLoader,
                       final boolean enablePreInstallHooks,
                       final InstallHookPolicy scanInstallHookPolicy,
                       final Supplier<NodeStore> nodeStoreSupplier,
                       final SubpackageSilencer subpackageSilencer,
                       final RepoInitProcessor repoInitProcessor,
                       final SlingSimulatorBackend slingSimulator,
                       final Set<String> runModes); List<ProgressCheck> getProgressChecks(); ErrorListener getErrorListener(); @Deprecated List<File> getPreInstallFiles(); List<URL> getPreInstallUrls(); @SuppressWarnings("WeakerAccess") void initAndInspect(final InspectBody<E> inspectBody); void adminInitAndInspect(final InspectBody<E> inspectBody); List<CheckReport> scanPackage(final @NotNull File... file); List<CheckReport> scanPackages(final List<File> files); static Packaging newOakpalPackagingService(); static Packaging newOakpalPackagingService(final @NotNull ClassLoader classLoader); static final String NS_URI_OAKPAL; static final String NS_PREFIX_OAKPAL; static final String LN_UNDECLARED; static final String NT_UNDECLARED; }