Class ArchiveValidationContext
java.lang.Object
org.apache.jackrabbit.vault.validation.context.AbstractValidationContext
org.apache.jackrabbit.vault.validation.context.ArchiveValidationContext
- All Implemented Interfaces:
ValidationContext
- Direct Known Subclasses:
SubPackageInArchiveValidationContext
Implements a
ValidationContext based on a given Archive.-
Field Summary
Fields inherited from class org.apache.jackrabbit.vault.validation.context.AbstractValidationContext
attributes -
Constructor Summary
ConstructorsConstructorDescriptionArchiveValidationContext(@NotNull Archive archive, @NotNull Path archivePath, @NotNull DependencyResolver resolver) -
Method Summary
Modifier and TypeMethodDescriptionReturns the validation context of the container package.@NotNull Collection<PackageInfo>PackageInfofor all resolved package dependencies.@NotNull WorkspaceFilterReturns the workspace filter@NotNull PathReturns the root path of the package.@NotNull PackagePropertiesReturns the package properties.Methods inherited from class org.apache.jackrabbit.vault.validation.context.AbstractValidationContext
getAttribute, getAttributeNames, setAttributeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jackrabbit.vault.validation.spi.ValidationContext
isIncremental
-
Constructor Details
-
ArchiveValidationContext
public ArchiveValidationContext(@NotNull @NotNull Archive archive, @NotNull @NotNull Path archivePath, @NotNull @NotNull DependencyResolver resolver) throws IOException - Throws:
IOException
-
-
Method Details
-
getProperties
Description copied from interface:ValidationContextReturns 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).
-
getFilter
Description copied from interface:ValidationContextReturns the workspace filter- Returns:
- the filter
-
getContainerValidationContext
Description copied from interface:ValidationContextReturns 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
Description copied from interface:ValidationContextReturns the root path of the package.- Returns:
- either the path to the ZIP file or a directory containing an exploded package. For subpackages starts with the package root path of the root container and appends each sub container package root path with the default separator.
-
getDependenciesPackageInfo
Description copied from interface:ValidationContextPackageInfofor all resolved package dependencies. In contrast toPackageProperties.getDependencies()the resolved dependencies also carry the main metadata (next to their coordinates).- Returns:
- the package info of all resolved package dependencies (i.e. the ones for which an artifact was found).
-