Class ArchiveValidationContext
- java.lang.Object
-
- org.apache.jackrabbit.vault.validation.context.ArchiveValidationContext
-
- All Implemented Interfaces:
ValidationContext
- Direct Known Subclasses:
SubPackageInArchiveValidationContext
public class ArchiveValidationContext extends Object implements ValidationContext
Implements aValidationContext
based on a givenArchive
.
-
-
Constructor Summary
Constructors Constructor Description ArchiveValidationContext(@NotNull Archive archive, @NotNull Path archivePath, @NotNull DependencyResolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidationContext
getContainerValidationContext()
Returns the validation context of the container package.@NotNull Collection<PackageInfo>
getDependenciesPackageInfo()
PackageInfo for all resolved package dependencies.@NotNull WorkspaceFilter
getFilter()
Returns the workspace filter@NotNull Path
getPackageRootPath()
Returns the root path of the package.@NotNull PackageProperties
getProperties()
Returns the package properties.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.vault.validation.spi.ValidationContext
isIncremental
-
-
-
-
Constructor Detail
-
ArchiveValidationContext
public ArchiveValidationContext(@NotNull @NotNull Archive archive, @NotNull @NotNull Path archivePath, @NotNull @NotNull DependencyResolver resolver) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getProperties
@NotNull public @NotNull PackageProperties getProperties()
Description copied from interface:ValidationContext
Returns the package properties.- Specified by:
getProperties
in interfaceValidationContext
- Returns:
- the package properties or some exception in case none could be found (will always point to the root package's properties).
-
getFilter
@NotNull public @NotNull WorkspaceFilter getFilter()
Description copied from interface:ValidationContext
Returns the workspace filter- Specified by:
getFilter
in interfaceValidationContext
- Returns:
- the filter
-
getContainerValidationContext
public ValidationContext getContainerValidationContext()
Description copied from interface:ValidationContext
Returns the validation context of the container package.- Specified by:
getContainerValidationContext
in interfaceValidationContext
- Returns:
- the validation context of the container in case this is the context of a sub package otherwise
null
.
-
getPackageRootPath
@NotNull public @NotNull Path getPackageRootPath()
Description copied from interface:ValidationContext
Returns the root path of the package.- Specified by:
getPackageRootPath
in interfaceValidationContext
- Returns:
- either the path to the ZIP file or a directory containing an exploded package.
-
getDependenciesPackageInfo
@NotNull public @NotNull Collection<PackageInfo> getDependenciesPackageInfo()
Description copied from interface:ValidationContext
PackageInfo for all resolved package dependencies. In contrast toPackageProperties.getDependencies()
the resolved dependencies also carry the main metadata of the dependencies.- Specified by:
getDependenciesPackageInfo
in interfaceValidationContext
- Returns:
- the package info of all resolved package dependencies (i.e. the ones for which an artifact was found).
-
-