public final class OakMachine extends Object
ProgressCheck
for the event listener interface.Modifier and Type | Class and Description |
---|---|
static class |
OakMachine.Builder
Use the builder to construct the
OakMachine . |
static interface |
OakMachine.InspectBody<E extends Throwable>
Functional interface for
initAndInspect(InspectBody) . |
static interface |
OakMachine.JcrCustomizer |
static interface |
OakMachine.RepoInitProcessor
Functional interface for a repoinit processor that unifies the RepoInitParser and JcrRepoInitOpsProcessor
signatures.
|
static interface |
OakMachine.SubpackageSilencer
Functional interface for
Builder.withSubpackageSilencer(SubpackageSilencer) . |
Modifier and Type | Field and Description |
---|---|
static String |
LN_UNDECLARED |
static String |
NS_PREFIX_OAKPAL |
static String |
NS_URI_OAKPAL |
static String |
NT_UNDECLARED |
Modifier and Type | Method and Description |
---|---|
<E extends Throwable> |
adminInitAndInspect(OakMachine.InspectBody<E> inspectBody)
Run arbitrary admin session logic against a post-InitStage OakPAL session.
|
ErrorListener |
getErrorListener() |
List<File> |
getPreInstallFiles()
Deprecated.
1.3.1 pre-install packages are now handled as URIs. use
getPreInstallUrls() . |
List<URL> |
getPreInstallUrls()
Return the urls for preinstall packages.
|
List<net.adamcin.oakpal.api.ProgressCheck> |
getProgressChecks() |
<E extends Throwable> |
initAndInspect(OakMachine.InspectBody<E> inspectBody)
Run arbitrary read-only session logic against a post-InitStage OakPAL session.
|
static org.apache.jackrabbit.vault.packaging.Packaging |
newOakpalPackagingService() |
static org.apache.jackrabbit.vault.packaging.Packaging |
newOakpalPackagingService(@NotNull ClassLoader classLoader) |
List<CheckReport> |
scanPackage(File... file)
Perform a scan of the provided package file or files.
|
List<CheckReport> |
scanPackages(List<File> files)
Execute a scan by installing each of the provided package files in sequence.
|
public static final String NS_URI_OAKPAL
public static final String NS_PREFIX_OAKPAL
public static final String LN_UNDECLARED
public static final String NT_UNDECLARED
public List<net.adamcin.oakpal.api.ProgressCheck> getProgressChecks()
public ErrorListener getErrorListener()
@Deprecated public List<File> getPreInstallFiles()
getPreInstallUrls()
.public List<URL> getPreInstallUrls()
public <E extends Throwable> void initAndInspect(OakMachine.InspectBody<E> inspectBody) throws AbortedScanException, javax.jcr.RepositoryException, E extends Throwable
E
- an error type thrown by the inspectBodyinspectBody
- arbitrary logic to run against a SessionAbortedScanException
- for preinstall errorsjavax.jcr.RepositoryException
- for repository errorsE
- for any number of other reasonsE extends Throwable
public <E extends Throwable> void adminInitAndInspect(OakMachine.InspectBody<E> inspectBody) throws AbortedScanException, javax.jcr.RepositoryException, E extends Throwable
E
- an error type thrown by the inspectBodyinspectBody
- arbitrary logic to run against a SessionAbortedScanException
- for preinstall errorsjavax.jcr.RepositoryException
- for repository errorsE
- for any number of other reasonsE extends Throwable
public List<CheckReport> scanPackage(@NotNull File... file) throws AbortedScanException
file
- the file or files to scanAbortedScanException
- if the scan was aborted because of an unrecoverable exceptionthis is an alias for the plurally-named method
public List<CheckReport> scanPackages(List<File> files) throws AbortedScanException
initRepository()
creates an fresh Oak repository.loginAdmin(Repository)
opens an admin user JCR session.InitStage.initSession(Session, ErrorListener, RepoInitProcessor)
is called for each registered InitStage
processPackageFile(Session, JcrPackageManager, boolean, File)
is performed for each of the
preInstallUrls
ProgressCheck
receives a ScanListener.startedScan()
event.processPackageFile(Session, JcrPackageManager, boolean, File)
is performed for each of the elements
of the files
array.ProgressCheck
receives a ScanListener.finishedScan()
event.files
- a list of FileVault content package files to be installed in sequence.AbortedScanException
- for any errors that terminate the scan.public static org.apache.jackrabbit.vault.packaging.Packaging newOakpalPackagingService()
public static org.apache.jackrabbit.vault.packaging.Packaging newOakpalPackagingService(@NotNull @NotNull ClassLoader classLoader)
Copyright © 2017–2020. All rights reserved.