Interface VaultPackage
-
- All Superinterfaces:
AutoCloseable,PackageProperties
- All Known Implementing Classes:
HollowVaultPackage,ZipVaultPackage
@ProviderType public interface VaultPackage extends PackageProperties, AutoCloseable
Defines a vault package. A vault package is a binary assembled representation of a vault export. This is just a thin wrapper of anArchive.Note that VaultPackage currently extends from PackageProperties to keep the interface backwards compatible.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.vault.packaging.PackageProperties
MF_KEY_IMPORT_PACKAGE, MF_KEY_PACKAGE_DEPENDENCIES, MF_KEY_PACKAGE_DEPENDENCIES_LOCATIONS, MF_KEY_PACKAGE_DESC, MF_KEY_PACKAGE_ID, MF_KEY_PACKAGE_ROOTS, MF_KEY_PACKAGE_TYPE, NAME_AC_HANDLING, NAME_ALLOW_INDEX_DEFINITIONS, NAME_BUILD_COUNT, NAME_CND_PATTERN, NAME_CREATED, NAME_CREATED_BY, NAME_DEPENDENCIES, NAME_DEPENDENCIES_LOCATIONS, NAME_DESCRIPTION, NAME_DISABLE_INTERMEDIATE_SAVE, NAME_GENERATOR, NAME_GROUP, NAME_LAST_MODIFIED, NAME_LAST_MODIFIED_BY, NAME_LAST_WRAPPED, NAME_LAST_WRAPPED_BY, NAME_NAME, NAME_PACKAGE_TYPE, NAME_REQUIRES_RESTART, NAME_REQUIRES_ROOT, NAME_SUB_PACKAGE_HANDLING, NAME_USE_BINARY_REFERENCES, NAME_VERSION, PREFIX_INSTALL_HOOK
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes this package and releases underlying data.voidextract(Session session, ImportOptions opts)Extracts the package contents to the repositoryArchivegetArchive()Returns the underlying package archive.FilegetFile()Returns the underlying file ornullif not available.PackageIdgetId()Returns the id of this package ornullif the id can't be determined.MetaInfgetMetaInf()Returns the meta inf that was either loaded or specified during build.PackagePropertiesgetProperties()Returns the properties of this package.longgetSize()Returns the size of the package or -1 if n/a.booleanisClosed()Checks if this package is closed.booleanisValid()Checks if this package is valid.-
Methods inherited from interface org.apache.jackrabbit.vault.packaging.PackageProperties
getACHandling, getBuildCount, getCreated, getCreatedBy, getDateProperty, getDependencies, getDependenciesLocations, getDescription, getExternalHooks, getGenerator, getLastModified, getLastModifiedBy, getLastWrapped, getLastWrappedBy, getPackageType, getProperty, getSubPackageHandling, requiresRestart, requiresRoot
-
-
-
-
Method Detail
-
getId
PackageId getId()
Returns the id of this package ornullif the id can't be determined.- Specified by:
getIdin interfacePackageProperties- Returns:
- the id of this package.
-
getProperties
PackageProperties getProperties()
Returns the properties of this package.- Returns:
- the properties.
- Since:
- 3.1
-
isValid
boolean isValid()
Checks if this package is valid.- Returns:
trueif this package is valid.
-
isClosed
boolean isClosed()
Checks if this package is closed.- Returns:
trueif this package is closed.
-
getMetaInf
MetaInf getMetaInf()
Returns the meta inf that was either loaded or specified during build.- Returns:
- the meta inf or
null.
-
getSize
long getSize()
Returns the size of the package or -1 if n/a.- Returns:
- the size
-
extract
void extract(Session session, ImportOptions opts) throws RepositoryException, PackageException
Extracts the package contents to the repository- Parameters:
session- repository sessionopts- import options- Throws:
RepositoryException- if a repository error during installation occurs.PackageException- if an error during packaging occursIllegalStateException- if the package is not valid.
-
getFile
File getFile()
Returns the underlying file ornullif not available.- Returns:
- the file
- Since:
- 2.0
-
close
void close()
Closes this package and releases underlying data. This will also close the underlyingArchiveif it has been opened. Only necessary to call if package has been opened viagetArchive()orgetMetaInf().- Specified by:
closein interfaceAutoCloseable
-
-