Interface ValidationContext

  • All Known Implementing Classes:
    ArchiveValidationContext, SubPackageInArchiveValidationContext

    @ProviderType
    public interface ValidationContext
    The validation context encapsulates information about the package for which the validation is triggered. This class is used from both validators (SPI) and validation API but for historical reasons is located in (wrong) package org.apache.jackrabbit.vault.validation.spi.
    • Method Detail

      • getFilter

        @NotNull
        @NotNull WorkspaceFilter getFilter()
        Returns the workspace filter
        Returns:
        the filter
      • getProperties

        @NotNull
        @NotNull PackageProperties getProperties()
        Returns the package properties.
        Returns:
        the package properties or some exception in case none could be found (will always point to the root package's properties).
      • getContainerValidationContext

        @Nullable
        @Nullable ValidationContext getContainerValidationContext()
        Returns the validation context of the container package.
        Returns:
        the validation context of the container in case this is the context of a sub package otherwise null.
      • getPackageRootPath

        @NotNull
        @NotNull Path getPackageRootPath()
        Returns the root path of the package.
        Returns:
        either the path to the ZIP file or a directory containing an exploded package.
      • getDependenciesPackageInfo

        @NotNull
        @NotNull Collection<PackageInfo> getDependenciesPackageInfo()
        PackageInfo for all resolved package dependencies. In contrast to PackageProperties.getDependencies() the resolved dependencies also carry the main metadata of the dependencies.
        Returns:
        the package info of all resolved package dependencies (i.e. the ones for which an artifact was found).
      • isIncremental

        default boolean isIncremental()
        Returns:
        true in case the validation is incremental (i.e. does not cover all files in a package). This should relax some validations.