You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2023/12/04 16:25:41 UTC
(jackrabbit-filevault) branch master updated: releng: Improve javadoc
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
The following commit(s) were added to refs/heads/master by this push:
new a525b703 releng: Improve javadoc
a525b703 is described below
commit a525b7031fbbd0d693f56ff3d115eb6b8d64b29b
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Dec 4 17:25:34 2023 +0100
releng: Improve javadoc
---
.../apache/jackrabbit/vault/packaging/JcrPackage.java | 17 +++++++++++------
.../jackrabbit/vault/packaging/impl/JcrPackageImpl.java | 6 +++---
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
index 93d4a9b9..f26b71cd 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/JcrPackage.java
@@ -36,22 +36,22 @@ import org.osgi.annotation.versioning.ProviderType;
public interface JcrPackage extends Comparable<JcrPackage>, AutoCloseable {
/**
- * Nodetype name of a package node
+ * Node type name of a package node
*/
String NT_VLT_PACKAGE = "vlt:Package";
/**
- * Nodetype name of a definition node
+ * Node type name of a package definition node
*/
String NT_VLT_PACKAGE_DEFINITION = "vlt:PackageDefinition";
/**
- * Nodename of the definition node
+ * Node name of the definition node
*/
String NN_VLT_DEFINITION = "vlt:definition";
/**
- * default mime type of a package
+ * Default mime type of a package
*/
String MIME_TYPE = "application/zip";
@@ -85,7 +85,9 @@ public interface JcrPackage extends Comparable<JcrPackage>, AutoCloseable {
boolean isSealed();
/**
- * Returns the vault package stored in the data of this package
+ * Returns the vault package stored in the data of this package.
+ * Opens the package implicitly therefore {@link #close()} needs to be afterwards.
+ *
* @return the package, this is closed when {@link #close} is called on this package
* @throws RepositoryException if an error occurs
* @throws IOException if an I/O error occurs
@@ -94,7 +96,8 @@ public interface JcrPackage extends Comparable<JcrPackage>, AutoCloseable {
VaultPackage getPackage() throws RepositoryException, IOException;
/**
- * Extracts the package contents to the repository
+ * Extracts the package contents to the repository.
+ * Opens the package implicitly therefore {@link #close()} needs to be afterwards.
*
* @param opts import options
* @throws RepositoryException if a repository error during installation occurs.
@@ -109,6 +112,7 @@ public interface JcrPackage extends Comparable<JcrPackage>, AutoCloseable {
/**
* Installs the package contents to the repository but creates a snapshot if
* necessary.
+ * Opens the package implicitly therefore {@link #close()} needs to be afterwards.
*
* @param opts import options
* @throws RepositoryException if a repository error during installation occurs.
@@ -247,6 +251,7 @@ public interface JcrPackage extends Comparable<JcrPackage>, AutoCloseable {
/**
* Closes this package and destroys all temporary data.
* Only necessary to call when {@link #getPackage()}, {@link #extract(ImportOptions)} or {@link #install(ImportOptions)} has been called.
+ * Is a no-op when none of these methods have been called on this package.
*/
void close();
diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
index 509ba666..b41f0ca9 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
@@ -280,13 +280,13 @@ public class JcrPackageImpl implements JcrPackage {
* Creates a new package by creating the appropriate archive.
*
* This is basically a workaround to ensure that 'rewrap' has a zip file to work on.
- * Ideally rewrap should not realy on the archive format.
+ * Ideally rewrap should not rely on the archive format.
*
* @param forceFileArchive if {@code true} a file archive is enforced
* @return the package
*
- * @throws RepositoryException If a repository error occurrs.
- * @throws IOException if an i/o error occurrs.
+ * @throws RepositoryException If a repository error occurs.
+ * @throws IOException if an i/o error occurs.
*/
@NotNull
protected VaultPackage getPackage(boolean forceFileArchive) throws RepositoryException, IOException {