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 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.MetaInfgetMetaInf()Returns the meta inf that was either loaded or specified during build.PackagePropertiesgetProperties()Returns the properties of this package.protected PropertiesgetPropertiesMap()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 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:VaultPackageChecks if this package is valid.- Specified by:
isValidin interfaceVaultPackage- Returns:
trueif this package is valid.
-
isClosed
public boolean isClosed()
Description copied from interface:VaultPackageChecks if this package is closed.- Specified by:
isClosedin interfaceVaultPackage- Returns:
trueif this package is closed.
-
getMetaInf
public MetaInf getMetaInf()
Description copied from interface:VaultPackageReturns the meta inf that was either loaded or specified during build.- Specified by:
getMetaInfin interfaceVaultPackage- Returns:
- the meta inf or
null.
-
getSize
public long getSize()
Description copied from interface:VaultPackageReturns the size of the package or -1 if n/a.- Specified by:
getSizein interfaceVaultPackage- Returns:
- the size
-
extract
public void extract(Session session, ImportOptions opts) throws PackageException
Description copied from interface:VaultPackageExtracts the package contents to the repository- Specified by:
extractin interfaceVaultPackage- Parameters:
session- repository sessionopts- import options- Throws:
PackageException- if an error during packaging occurs
-
getFile
public File getFile()
Description copied from interface:VaultPackageReturns the underlying file ornullif not available.- Specified by:
getFilein interfaceVaultPackage- Returns:
- the file
-
close
public void close()
Description copied from interface:VaultPackageCloses 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 viaVaultPackage.getArchive()orVaultPackage.getMetaInf().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceVaultPackage
-
getArchive
public Archive getArchive()
Description copied from interface:VaultPackageReturns 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:
getArchivein interfaceVaultPackage- Returns:
- the archive or
nullif already closed
-
getProperties
public PackageProperties getProperties()
Description copied from interface:VaultPackageReturns the properties of this package.- Specified by:
getPropertiesin interfaceVaultPackage- Returns:
- the properties.
-
getPropertiesMap
protected Properties getPropertiesMap()
- Specified by:
getPropertiesMapin classPackagePropertiesImpl
-
-