@ConsumerType public interface ProgressCheck extends ScanListener, ViolationReporter
ProgressTrackerListener.
Some constraints for behavior:
OakMachine will call these methods synchronously and in a single-threaded fashion.Session is not allowed.ProgressCheckFactory in order to be loaded successfully.| Modifier and Type | Method and Description |
|---|---|
default void |
afterExtract(org.apache.jackrabbit.vault.packaging.PackageId packageId,
javax.jcr.Session inspectSession)
Provides an opportunity to inspect repository state between packages.
|
default void |
beforeExtract(org.apache.jackrabbit.vault.packaging.PackageId packageId,
javax.jcr.Session inspectSession,
org.apache.jackrabbit.vault.packaging.PackageProperties packageProperties,
org.apache.jackrabbit.vault.fs.config.MetaInf metaInf,
List<org.apache.jackrabbit.vault.packaging.PackageId> subpackages)
Called for each package before it is extracted.
|
default void |
deletedPath(org.apache.jackrabbit.vault.packaging.PackageId packageId,
String path,
javax.jcr.Session inspectSession)
Notified when package importer deletes an existing node.
|
default String |
getCheckName()
Return an optional label for displaying reports made by this reporter.
|
default void |
identifyPackage(org.apache.jackrabbit.vault.packaging.PackageId packageId,
File file)
Called after the package is uploaded to the package manager at the beginning of the scan.
|
default void |
identifySubpackage(org.apache.jackrabbit.vault.packaging.PackageId packageId,
org.apache.jackrabbit.vault.packaging.PackageId parentId)
Called after each subpackage is opened.
|
default void |
importedPath(org.apache.jackrabbit.vault.packaging.PackageId packageId,
String path,
javax.jcr.Node node)
Deprecated.
2.0.0 implement
importedPath(PackageId, String, Node, PathAction) instead |
default void |
importedPath(org.apache.jackrabbit.vault.packaging.PackageId packageId,
String path,
javax.jcr.Node node,
PathAction action)
Notified when package importer adds, modifies, or leaves a node untouched.
|
default void |
readManifest(org.apache.jackrabbit.vault.packaging.PackageId packageId,
Manifest manifest)
If the package provides a
Manifest, it will be provided to the check using this method, prior to calling
beforeExtract(PackageId, Session, PackageProperties, MetaInf, List). |
finishedScan, startedScangetReportedViolations, getResourceBundleBaseName, setResourceBundledefault String getCheckName()
default void identifyPackage(org.apache.jackrabbit.vault.packaging.PackageId packageId,
File file)
OakMachine.scanPackage(File...).packageId - the package ID of the newly opened packagefile - the package file that will be openeddefault void identifySubpackage(org.apache.jackrabbit.vault.packaging.PackageId packageId,
org.apache.jackrabbit.vault.packaging.PackageId parentId)
packageId - the package ID of the newly opened subpackageparentId - the package ID of the parent package.default void readManifest(org.apache.jackrabbit.vault.packaging.PackageId packageId,
Manifest manifest)
Manifest, it will be provided to the check using this method, prior to calling
beforeExtract(PackageId, Session, PackageProperties, MetaInf, List).packageId - the package ID of the newly opened packagemanifest - the parsed manifestdefault void beforeExtract(org.apache.jackrabbit.vault.packaging.PackageId packageId,
javax.jcr.Session inspectSession,
org.apache.jackrabbit.vault.packaging.PackageProperties packageProperties,
org.apache.jackrabbit.vault.fs.config.MetaInf metaInf,
List<org.apache.jackrabbit.vault.packaging.PackageId> subpackages)
throws javax.jcr.RepositoryException
packageId - the package ID of the newly opened packageinspectSession - session providing access to repository statepackageProperties - the package propertiesmetaInf - the package meta informationsubpackages - extracted subpackagesjavax.jcr.RepositoryException - because of access to a Session@Deprecated default void importedPath(org.apache.jackrabbit.vault.packaging.PackageId packageId, String path, javax.jcr.Node node) throws javax.jcr.RepositoryException
importedPath(PackageId, String, Node, PathAction) insteadimportedPath(PackageId, String, Node, PathAction) is overridden.packageId - the current packagepath - the imported pathnode - the imported nodejavax.jcr.RepositoryException - because of access to a Nodedefault void importedPath(org.apache.jackrabbit.vault.packaging.PackageId packageId,
String path,
javax.jcr.Node node,
PathAction action)
throws javax.jcr.RepositoryException
packageId - the current packagepath - the imported pathnode - the imported nodeaction - the reported path action typejavax.jcr.RepositoryException - because of access to a Nodedefault void deletedPath(org.apache.jackrabbit.vault.packaging.PackageId packageId,
String path,
javax.jcr.Session inspectSession)
throws javax.jcr.RepositoryException
packageId - the current packagepath - deleted pathinspectSession - session providing access to repository statejavax.jcr.RepositoryException - because of access to a Sessiondefault void afterExtract(org.apache.jackrabbit.vault.packaging.PackageId packageId,
javax.jcr.Session inspectSession)
throws javax.jcr.RepositoryException
packageId - the current packageinspectSession - session providing access to repository statejavax.jcr.RepositoryException - because of access to a SessionCopyright © 2017–2020. All rights reserved.