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
public class ArchiveValidationContext extends AbstractValidationContext
Implements aValidationContext
based on a givenArchive
.
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.vault.validation.context.AbstractValidationContext
attributes
-
-
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 org.apache.jackrabbit.vault.validation.context.AbstractValidationContext
getAttribute, getAttributeNames, setAttribute
-
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.- 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- Returns:
- the filter
-
getContainerValidationContext
public ValidationContext getContainerValidationContext()
Description copied from interface:ValidationContext
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 public @NotNull Path getPackageRootPath()
Description copied from interface:ValidationContext
Returns 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
@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 (next to their coordinates).- Returns:
- the package info of all resolved package dependencies (i.e. the ones for which an artifact was found).
-
-