@ProviderType public interface JcrPackageManager extends PackageManager
PackageManager by repository specific operations.| Modifier and Type | Method and Description |
|---|---|
void |
assemble(JcrPackageDefinition definition,
ProgressTrackerListener listener,
java.io.OutputStream out)
Assembles a package directly to a output stream
|
void |
assemble(JcrPackage pack,
ProgressTrackerListener listener)
Assembles a package.
|
void |
assemble(javax.jcr.Node packNode,
JcrPackageDefinition definition,
ProgressTrackerListener listener)
Assembles a package.
|
JcrPackage |
create(javax.jcr.Node folder,
java.lang.String name)
Creates a new package below the given folder.
|
JcrPackage |
create(java.lang.String group,
java.lang.String name)
Creates a new package with the new group and name.
|
JcrPackage |
create(java.lang.String group,
java.lang.String name,
java.lang.String version)
Creates a new package with the new group, name and version.
|
PackageId[] |
extract(Archive archive,
ImportOptions options,
boolean replace)
Extracts a package directly from the given archive without uploading it to the repository first.
|
javax.jcr.Node |
getPackageRoot()
Returns the configured package root node.
|
javax.jcr.Node |
getPackageRoot(boolean noCreate)
Returns the configured package root node.
|
java.util.List<JcrPackage> |
listPackages()
Returns the list of all packages installed below the package root.
|
java.util.List<JcrPackage> |
listPackages(java.lang.String group,
boolean built)
Returns the list of all packages installed below the package root that
match the given group.
|
java.util.List<JcrPackage> |
listPackages(WorkspaceFilter filter)
Returns the list of all packages installed below the package root that are
included in the filter.
|
JcrPackage |
open(javax.jcr.Node node)
Opens a package that is based on the given node.
|
JcrPackage |
open(javax.jcr.Node node,
boolean allowInvalid)
Opens a package that is based on the given node.
|
JcrPackage |
open(PackageId id)
Opens a package with the given package id.
|
void |
remove(JcrPackage pack)
Removes a package and its snapshots if present.
|
JcrPackage |
rename(JcrPackage pack,
java.lang.String groupId,
java.lang.String name)
Renames the given package with a new group id and name.
|
JcrPackage |
rename(JcrPackage pack,
java.lang.String groupId,
java.lang.String name,
java.lang.String version)
Renames the given package with a new group id, name and version.
|
PackageId |
resolve(Dependency dependency,
boolean onlyInstalled)
Finds the id of the package that matches the given dependency best.
|
void |
rewrap(JcrPackage pack,
ProgressTrackerListener listener)
Rewraps the package in respect to its underlying definition.
|
JcrPackage |
upload(java.io.File file,
boolean isTmpFile,
boolean replace,
java.lang.String nameHint)
Uploads a package.
|
JcrPackage |
upload(java.io.File file,
boolean isTmpFile,
boolean replace,
java.lang.String nameHint,
boolean strict)
Uploads a package.
|
JcrPackage |
upload(java.io.InputStream in,
boolean replace)
Uploads a package.
|
JcrPackage |
upload(java.io.InputStream in,
boolean replace,
boolean strict)
Uploads a package.
|
PackageId[] |
usage(PackageId id)
Returns the package ids of installed packages that depend on the given package.
|
@CheckForNull JcrPackage open(@Nonnull PackageId id) throws javax.jcr.RepositoryException
id - the package id.null it the package does not exist or is not valid.javax.jcr.RepositoryException - if an error occurs@CheckForNull JcrPackage open(@Nonnull javax.jcr.Node node) throws javax.jcr.RepositoryException
node - the underlying nodenull it the package is not
valid.javax.jcr.RepositoryException - if an error occurs@CheckForNull JcrPackage open(@Nonnull javax.jcr.Node node, boolean allowInvalid) throws javax.jcr.RepositoryException
allowInvalid
is true also invalid packages are returned, but only if the
node is file like (i.e. is nt:hierarchyNode and has a
jcr:content/jcr:data property).node - the underlying nodeallowInvalid - if true invalid packages are openend, too.null it the package is not
valid unless allowInvalid is true.javax.jcr.RepositoryException - if an error occurs@CheckForNull PackageId resolve(@Nonnull Dependency dependency, boolean onlyInstalled) throws javax.jcr.RepositoryException
onlyInstalled is true only installed packages are searched.dependency - dependency informationonlyInstalled - if true only installed packages are searched.null if not found.javax.jcr.RepositoryException - if an error occurs@Nonnull PackageId[] usage(@Nonnull PackageId id) throws javax.jcr.RepositoryException
id - the package id to search forjavax.jcr.RepositoryException - if an error occurs@Nonnull JcrPackage upload(@Nonnull java.io.File file, boolean isTmpFile, boolean replace, @Nullable java.lang.String nameHint) throws javax.jcr.RepositoryException, java.io.IOException
null is returned unless replace is true.file - package file to uploadisTmpFile - indicates if the given file is a temp file and can be
deleted when the package is closedreplace - if true existing packages are replaced.nameHint - hint for the name if package does not provide onejavax.jcr.RepositoryException - if an error occurrsjava.io.IOException - if an I/O error occurrs@Nonnull JcrPackage upload(@Nonnull java.io.File file, boolean isTmpFile, boolean replace, @Nullable java.lang.String nameHint, boolean strict) throws javax.jcr.RepositoryException, java.io.IOException
ItemExistsException is thrown unless replace is
true.file - package file to uploadisTmpFile - indicates if the given file is a temp file and can be
deleted when the package is closedreplace - if true existing packages are replaced.nameHint - hint for the name if package does not provide onestrict - if true import is more strict in regards to errorsjavax.jcr.RepositoryException - if an error occurrsjava.io.IOException - if an I/O error occurrs@Nonnull JcrPackage upload(@Nonnull java.io.InputStream in, boolean replace) throws javax.jcr.RepositoryException, java.io.IOException
ItemExistsException is thrown unless replace is
true.in - input stream that provides the content of the package. note that after this method returns,
the input stream is closed in any case.replace - if true existing packages are replaced.javax.jcr.RepositoryException - if an error occurrsjava.io.IOException - if an I/O error occurrs@Nonnull JcrPackage upload(@Nonnull java.io.InputStream in, boolean replace, boolean strict) throws javax.jcr.RepositoryException, java.io.IOException
ItemExistsException is thrown unless replace is
true.in - input stream that provides the content of the package. note that after this method returns,
the input stream is closed in any case.replace - if true existing packages are replaced.strict - if true import is more strict in regards to errorsjavax.jcr.RepositoryException - if an error occurrsjava.io.IOException - if an I/O error occurrs@Nonnull JcrPackage create(@Nullable javax.jcr.Node folder, @Nonnull java.lang.String name) throws javax.jcr.RepositoryException, java.io.IOException
folder - parent folder or null for the package rootname - name of the new packagejavax.jcr.RepositoryException - if a repository error occurrsjava.io.IOException - if an I/O exception occurs@Nonnull JcrPackage create(@Nonnull java.lang.String group, @Nonnull java.lang.String name) throws javax.jcr.RepositoryException, java.io.IOException
group - group of the new packagename - name of the new packagejavax.jcr.RepositoryException - if a repository error occurrsjava.io.IOException - if an I/O exception occurs@Nonnull JcrPackage create(@Nonnull java.lang.String group, @Nonnull java.lang.String name, @Nullable java.lang.String version) throws javax.jcr.RepositoryException, java.io.IOException
group - group of the new packagename - name of the new packageversion - version of the new package; can be nulljavax.jcr.RepositoryException - if a repository error occurrsjava.io.IOException - if an I/O exception occurs@Nonnull PackageId[] extract(@Nonnull Archive archive, @Nonnull ImportOptions options, boolean replace) throws javax.jcr.RepositoryException, PackageException, java.io.IOException
If the package defines unsatisfied dependencies DependencyHandling might cause the extraction to fail.
If the package contains sub-packages, they will follow the same behaviour, i.e. they will not be uploaded to the
repository but directly installed unless ImportOptions.setNonRecursive(boolean) is set to true, in which
case the sub packages will be uploaded.
The method will throw an ItemExistsException if a package with the same id already exists, unless
replace is set to true.
archive - the input archive that contains the package.options - the import optionsreplace - if true existing packages are replaced.javax.jcr.RepositoryException - if an error occursjava.io.IOException - if an I/O error occurrsPackageException - if an internal error occurrsjava.io.IOException - if an I/O exception occursvoid remove(@Nonnull
JcrPackage pack)
throws javax.jcr.RepositoryException
pack - the package to removejavax.jcr.RepositoryException - if a repository error occurrs@Nonnull JcrPackage rename(@Nonnull JcrPackage pack, @Nullable java.lang.String groupId, @Nullable java.lang.String name) throws PackageException, javax.jcr.RepositoryException
pack - the package to renamegroupId - the new group id or nullname - the new name or nulljavax.jcr.RepositoryException - if an error occursPackageException - if the package is not unwrapped.@Nonnull JcrPackage rename(@Nonnull JcrPackage pack, @Nullable java.lang.String groupId, @Nullable java.lang.String name, @Nullable java.lang.String version) throws PackageException, javax.jcr.RepositoryException
pack - the package to renamegroupId - the new group id or nullname - the new name or nullversion - the new version or nulljavax.jcr.RepositoryException - if an error occursPackageException - if the package is not unwrapped.void assemble(@Nonnull
JcrPackage pack,
@Nullable
ProgressTrackerListener listener)
throws PackageException,
javax.jcr.RepositoryException,
java.io.IOException
pack - the package to assemblelistener - a progress listenerPackageException - if a package error occursjavax.jcr.RepositoryException - if a repository error occursjava.io.IOException - if an I/O error occursvoid assemble(@Nonnull
javax.jcr.Node packNode,
@Nonnull
JcrPackageDefinition definition,
@Nullable
ProgressTrackerListener listener)
throws PackageException,
javax.jcr.RepositoryException,
java.io.IOException
packNode - the node of the packagedefinition - the definition of the packagelistener - a progress listenerPackageException - if a package error occursjavax.jcr.RepositoryException - if a repository error occursjava.io.IOException - if an I/O error occursvoid assemble(@Nonnull
JcrPackageDefinition definition,
@Nullable
ProgressTrackerListener listener,
@Nonnull
java.io.OutputStream out)
throws java.io.IOException,
javax.jcr.RepositoryException,
PackageException
definition - the definition of the packagelistener - a progress listenerout - the output stream to write tojavax.jcr.RepositoryException - if a repository error occursjava.io.IOException - if an I/O error occursPackageException - if a package error occursvoid rewrap(@Nonnull
JcrPackage pack,
@Nullable
ProgressTrackerListener listener)
throws PackageException,
javax.jcr.RepositoryException,
java.io.IOException
pack - the package to rewraplistener - the progress listenerPackageException - if a package error occursjavax.jcr.RepositoryException - if a repository error occursjava.io.IOException - if an I/O error occurs@Nonnull
javax.jcr.Node getPackageRoot()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - if an error occurs@CheckForNull
javax.jcr.Node getPackageRoot(boolean noCreate)
throws javax.jcr.RepositoryException
noCreate - do not create missing root if truenull if not present and noCreate is true.javax.jcr.RepositoryException - if an error occurs@Nonnull java.util.List<JcrPackage> listPackages() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - if an error occurs@Nonnull java.util.List<JcrPackage> listPackages(@Nullable WorkspaceFilter filter) throws javax.jcr.RepositoryException
filter - filter for packagesjavax.jcr.RepositoryException - if an error occurs@Nonnull java.util.List<JcrPackage> listPackages(@Nullable java.lang.String group, boolean built) throws javax.jcr.RepositoryException
group is null all
packages are returned.group - the group filterbuilt - if true only packages with size > 0 are listedjavax.jcr.RepositoryException - if an error occursCopyright © 2010 - 2025 Adobe. All Rights Reserved