Interface VaultPackage
-
- All Superinterfaces:
java.lang.AutoCloseable
,PackageProperties
@ProviderType public interface VaultPackage extends PackageProperties, java.lang.AutoCloseable
Defines a vault package. A vault package is a binary assembled representation of a vault export.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
NAME_AC_HANDLING, NAME_ALLOW_INDEX_DEFINITIONS, NAME_BUILD_COUNT, NAME_CND_PATTERN, NAME_CREATED, NAME_CREATED_BY, NAME_DEPENDENCIES, NAME_DESCRIPTION, NAME_DISABLE_INTERMEDIATE_SAVE, 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 void
close()
Closes this package and releases underlying data.void
extract(Session session, ImportOptions opts)
Extracts the package contents to the repositoryArchive
getArchive()
Returns the underlying package archive.java.io.File
getFile()
Returns the underlying file ornull
if not available.PackageId
getId()
Returns the id of this package ornull
if the id can't be determined.MetaInf
getMetaInf()
Returns the meta inf that was either loaded or specified during build.PackageProperties
getProperties()
Returns the properties of this package.long
getSize()
Returns the size of the package or -1 if n/a.boolean
isClosed()
Checks if this package is closed.boolean
isValid()
Checks if this package is valid.-
Methods inherited from interface org.apache.jackrabbit.vault.packaging.PackageProperties
getACHandling, getCreated, getCreatedBy, getDateProperty, getDependencies, getDescription, getLastModified, getLastModifiedBy, getLastWrapped, getLastWrappedBy, getPackageType, getProperty, getSubPackageHandling, requiresRoot
-
-
-
-
Method Detail
-
getId
PackageId getId()
Returns the id of this package ornull
if the id can't be determined.- Specified by:
getId
in 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:
true
if this package is valid.
-
isClosed
boolean isClosed()
Checks if this package is closed.- Returns:
true
if 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 occursjava.lang.IllegalStateException
- if the package is not valid.
-
getFile
java.io.File getFile()
Returns the underlying file ornull
if not available.- Returns:
- the file
- Since:
- 2.0
-
close
void close()
Closes this package and releases underlying data. This will also close the underlyingArchive
if it has been opened.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-