Class HollowVaultPackage
- java.lang.Object
-
- org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl
-
- org.apache.jackrabbit.vault.packaging.impl.HollowVaultPackage
-
- All Implemented Interfaces:
AutoCloseable
,PackageProperties
,VaultPackage
public class HollowVaultPackage extends PackagePropertiesImpl implements VaultPackage
Implements a vault package that is a hollow representation of a file vault export i.e. when original zipped representation has been truncated.
-
-
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
-
-
Constructor Summary
Constructors Constructor Description HollowVaultPackage(Properties properties)
-
Method Summary
All Methods Instance Methods Concrete 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.File
getFile()
Returns the underlying file ornull
if not available.MetaInf
getMetaInf()
Returns the meta inf that was either loaded or specified during build.PackageProperties
getProperties()
Returns the properties of this package.protected Properties
getPropertiesMap()
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 class org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl
getACHandling, getBuildCount, getCachedId, getCreated, getCreatedBy, getDateProperty, getDependencies, getDependenciesLocations, getDescription, getExternalHooks, getGenerator, getId, getLastModified, getLastModifiedBy, getLastWrapped, getLastWrappedBy, getPackageType, getProperty, getSubPackageHandling, requiresRestart, requiresRoot
-
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.packaging.PackageProperties
getACHandling, getBuildCount, getCreated, getCreatedBy, getDateProperty, getDependencies, getDependenciesLocations, getDescription, getExternalHooks, getGenerator, getLastModified, getLastModifiedBy, getLastWrapped, getLastWrappedBy, getPackageType, getProperty, getSubPackageHandling, requiresRestart, requiresRoot
-
Methods inherited from interface org.apache.jackrabbit.vault.packaging.VaultPackage
getId
-
-
-
-
Constructor Detail
-
HollowVaultPackage
public HollowVaultPackage(Properties properties)
-
-
Method Detail
-
isValid
public boolean isValid()
Description copied from interface:VaultPackage
Checks if this package is valid.- Specified by:
isValid
in interfaceVaultPackage
- Returns:
true
if this package is valid.
-
isClosed
public boolean isClosed()
Description copied from interface:VaultPackage
Checks if this package is closed.- Specified by:
isClosed
in interfaceVaultPackage
- Returns:
true
if this package is closed.
-
getMetaInf
public MetaInf getMetaInf()
Description copied from interface:VaultPackage
Returns the meta inf that was either loaded or specified during build.- Specified by:
getMetaInf
in interfaceVaultPackage
- Returns:
- the meta inf or
null
.
-
getSize
public long getSize()
Description copied from interface:VaultPackage
Returns the size of the package or -1 if n/a.- Specified by:
getSize
in interfaceVaultPackage
- Returns:
- the size
-
extract
public void extract(Session session, ImportOptions opts) throws PackageException
Description copied from interface:VaultPackage
Extracts the package contents to the repository- Specified by:
extract
in interfaceVaultPackage
- Parameters:
session
- repository sessionopts
- import options- Throws:
PackageException
- if an error during packaging occurs
-
getFile
public File getFile()
Description copied from interface:VaultPackage
Returns the underlying file ornull
if not available.- Specified by:
getFile
in interfaceVaultPackage
- Returns:
- the file
-
close
public void close()
Description copied from interface:VaultPackage
Closes this package and releases underlying data. This will also close the underlyingArchive
if it has been opened. Only necessary to call if package has been opened viaVaultPackage.getArchive()
orVaultPackage.getMetaInf()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceVaultPackage
-
getArchive
public Archive getArchive()
Description copied from interface:VaultPackage
Returns the underlying package archive. Opens the archive when called for the first time. This does not need to be closed explicitly but rather is implicitly closed via a call toVaultPackage.close()
.- Specified by:
getArchive
in interfaceVaultPackage
- Returns:
- the archive or
null
if already closed
-
getProperties
public PackageProperties getProperties()
Description copied from interface:VaultPackage
Returns the properties of this package.- Specified by:
getProperties
in interfaceVaultPackage
- Returns:
- the properties.
-
getPropertiesMap
protected Properties getPropertiesMap()
- Specified by:
getPropertiesMap
in classPackagePropertiesImpl
-
-