@ProviderType public interface JcrPackage extends java.lang.Comparable<JcrPackage>, java.lang.AutoCloseable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MIME_TYPE
default mime type of a package
|
static java.lang.String |
NN_VLT_DEFINITION
Nodename of the definition node
|
static java.lang.String |
NT_VLT_PACKAGE
Nodetype name of a package node
|
static java.lang.String |
NT_VLT_PACKAGE_DEFINITION
Nodetype name of a definition node
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this package and destroys all temporary data.
|
void |
extract(ImportOptions opts)
Extracts the package contents to the repository
|
PackageId[] |
extractSubpackages(ImportOptions opts)
Processes this package and extracts all sub packages.
|
Property |
getData()
Returns the jcr:data property of the package
|
JcrPackageDefinition |
getDefinition()
Returns the package definition of this package
|
Node |
getDefNode()
Returns the definition node or
null if not exists |
Node |
getNode()
Returns the underlying node
|
VaultPackage |
getPackage()
Returns the vault package stored in the data of this package
|
PackageId[] |
getResolvedDependencies()
Returns a list of the installed packages that this package depends on.
|
long |
getSize()
Returns the size of the underlying package.
|
JcrPackage |
getSnapshot()
Returns the snapshot that was taken when installing this package.
|
Dependency[] |
getUnresolvedDependencies()
Returns the dependencies that are not resolved.
|
void |
install(ImportOptions opts)
Installs the package contents to the repository but creates a snapshot if
necessary.
|
boolean |
isEmpty()
Checks if the package has content.
|
boolean |
isInstalled()
Checks if this package is installed.
|
boolean |
isSealed()
Checks if this package is sealed.
|
boolean |
isValid()
Checks if the underlying node contains the correct structure.
|
JcrPackage |
snapshot(ExportOptions opts,
boolean replace)
Creates a snapshot of this package.
|
void |
uninstall(ImportOptions opts)
Reverts the changes of a prior installation of this package.
|
boolean |
verifyId(boolean autoFix,
boolean autoSave)
Deprecated.
As of 3.1.42, the storage location is implementation details.
|
static final java.lang.String NT_VLT_PACKAGE
static final java.lang.String NT_VLT_PACKAGE_DEFINITION
static final java.lang.String NN_VLT_DEFINITION
static final java.lang.String MIME_TYPE
@CheckForNull JcrPackageDefinition getDefinition() throws RepositoryException
null
if this package is
not valid.RepositoryException
- if an error occurrsboolean isValid()
true
if this package is valid.@CheckForNull Node getNode()
boolean isSealed()
true
if this package is sealed.@Nonnull VaultPackage getPackage() throws RepositoryException, java.io.IOException
RepositoryException
- if an error occursjava.io.IOException
- if an I/O error occursvoid extract(@Nonnull ImportOptions opts) throws RepositoryException, PackageException, java.io.IOException
opts
- import optionsRepositoryException
- if a repository error during installation occurs.PackageException
- if an error during packaging occursjava.lang.IllegalStateException
- if the package is not valid.java.io.IOException
- if an I/O error occursvoid install(@Nonnull ImportOptions opts) throws RepositoryException, PackageException, java.io.IOException
opts
- import optionsRepositoryException
- if a repository error during installation occurs.PackageException
- if an error during packaging occursjava.lang.IllegalStateException
- if the package is not valid.java.io.IOException
- if an I/O error occurs@Nonnull PackageId[] extractSubpackages(@Nonnull ImportOptions opts) throws RepositoryException, PackageException, java.io.IOException
ImportOptions.isNonRecursive()
is true
, then only the direct
sub packages are extracted. The extraction ensures that the sub packages have a dependency to their parent package.opts
- import optionsRepositoryException
- if a repository error during installation occurs.PackageException
- if an error during packaging occursjava.lang.IllegalStateException
- if the package is not valid.java.io.IOException
- if an I/O error occurs@Nonnull Dependency[] getUnresolvedDependencies() throws RepositoryException
DependencyHandling
is set to strict, the package
will not installed if any unresolved dependencies are listed.RepositoryException
- if an error accessing the repository occurrs@Nonnull PackageId[] getResolvedDependencies() throws RepositoryException
RepositoryException
- if an error accessing the repository occurrs@CheckForNull JcrPackage snapshot(@Nonnull ExportOptions opts, boolean replace) throws RepositoryException, PackageException, java.io.IOException
opts
- export optionsreplace
- if true
any existing snapshot is replaced.null
if it wasn't created.RepositoryException
- if a repository error during installation occurs.PackageException
- if an error during packaging occursjava.lang.IllegalStateException
- if the package is not valid.java.io.IOException
- if an I/O error occurs@CheckForNull JcrPackage getSnapshot() throws RepositoryException
null
RepositoryException
- if an error occurs.void uninstall(@Nonnull ImportOptions opts) throws RepositoryException, PackageException, java.io.IOException
opts
- import optionsRepositoryException
- if a repository error during installation occurs.PackageException
- if an error during packaging occurs or if no
snapshot is available.java.lang.IllegalStateException
- if the package is not valid.PackageException
- if no snapshot is present and ImportOptions.isStrict()
is true
.java.io.IOException
- if an I/O error occurs@Deprecated boolean verifyId(boolean autoFix, boolean autoSave) throws RepositoryException
autoFix
- true
to automatically fix the idautoSave
- true
to save changes immediatelytrue
if id is correct.RepositoryException
- if an error occurs.boolean isInstalled() throws RepositoryException
JcrPackageDefinition.getLastUnpacked()
date. If the package is replaced since it was installed. this method will return false
.true
if this package is installed.RepositoryException
- if an error occurs.boolean isEmpty()
true
if this package doesn't have contentlong getSize()
void close()
close
in interface java.lang.AutoCloseable
@CheckForNull Property getData() throws RepositoryException
RepositoryException
- if an error occurrs@CheckForNull Node getDefNode() throws RepositoryException
null
if not existsRepositoryException
- if an error occurrsCopyright © 2010 - 2020 Adobe. All Rights Reserved