From 1b7ab0a35d1210bd8a34096dca8698805a33b848 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Sun, 2 Nov 2014 17:31:06 +0100 Subject: [PATCH] javadoc --- .../repository/api/BundleCommandBuilder.java | 44 +++++++++---------- .../scm/repository/api/BundleResponse.java | 1 + .../api/UnbundleCommandBuilder.java | 38 ++++++++-------- .../scm/repository/api/UnbundleResponse.java | 1 + .../scm/repository/spi/BundleCommand.java | 9 ++-- .../repository/spi/BundleCommandRequest.java | 23 ++++------ .../scm/repository/spi/UnbundleCommand.java | 9 ++-- .../spi/UnbundleCommandRequest.java | 23 ++++------ 8 files changed, 70 insertions(+), 78 deletions(-) diff --git a/scm-core/src/main/java/sonia/scm/repository/api/BundleCommandBuilder.java b/scm-core/src/main/java/sonia/scm/repository/api/BundleCommandBuilder.java index 864ce62de1..c8ac199e16 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/BundleCommandBuilder.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/BundleCommandBuilder.java @@ -57,6 +57,9 @@ import java.io.IOException; import java.io.OutputStream; /** + * The bundle command dumps a repository to a byte source such as a file. The + * created bundle can be restored to an empty repository with the + * {@link UnbundleCommandBuilder}. * * @author Sebastian Sdorra * @since 1.43 @@ -64,21 +67,20 @@ import java.io.OutputStream; public final class BundleCommandBuilder { - /** Field description */ + /** logger for BundleCommandBuilder */ private static final Logger logger = LoggerFactory.getLogger(BundleCommandBuilder.class); //~--- constructors --------------------------------------------------------- /** - * Constructs ... + * Constructs a new {@link BundleCommandBuilder}. * * - * @param bundleCommand - * @param repository + * @param bundleCommand bundle command implementation + * @param repository repository */ - public BundleCommandBuilder(BundleCommand bundleCommand, - Repository repository) + BundleCommandBuilder(BundleCommand bundleCommand, Repository repository) { this.bundleCommand = bundleCommand; this.repository = repository; @@ -87,12 +89,11 @@ public final class BundleCommandBuilder //~--- methods -------------------------------------------------------------- /** - * Method description + * Dumps the repository to the given {@link File}. * + * @param outputFile output file * - * @param outputFile - * - * @return + * @return bundle response * * @throws IOException * @throws RepositoryException @@ -113,12 +114,12 @@ public final class BundleCommandBuilder } /** - * Method description + * Dumps the repository to the given {@link OutputStream}. * * - * @param outputStream + * @param outputStream output stream * - * @return + * @return bundle response * * @throws IOException * @throws RepositoryException @@ -135,12 +136,11 @@ public final class BundleCommandBuilder } /** - * Method description + * Dumps the repository to the given {@link ByteSink}. * + * @param sink byte sink * - * @param sink - * - * @return + * @return bundle response * * @throws IOException * @throws RepositoryException @@ -155,12 +155,12 @@ public final class BundleCommandBuilder } /** - * Method description + * Converts an {@link OutputStream} into a {@link ByteSink}. * * - * @param outputStream + * @param outputStream ouput stream to convert * - * @return + * @return converted byte sink */ private ByteSink asByteSink(final OutputStream outputStream) { @@ -177,9 +177,9 @@ public final class BundleCommandBuilder //~--- fields --------------------------------------------------------------- - /** Field description */ + /** bundle command implementation */ private final BundleCommand bundleCommand; - /** Field description */ + /** repository */ private final Repository repository; } diff --git a/scm-core/src/main/java/sonia/scm/repository/api/BundleResponse.java b/scm-core/src/main/java/sonia/scm/repository/api/BundleResponse.java index ee0b51a06d..0ad17ce700 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/BundleResponse.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/BundleResponse.java @@ -34,6 +34,7 @@ package sonia.scm.repository.api; /** + * Response of {@link BundleCommandBuilder}. * * @author Sebastian Sdorra * @since 1.43 diff --git a/scm-core/src/main/java/sonia/scm/repository/api/UnbundleCommandBuilder.java b/scm-core/src/main/java/sonia/scm/repository/api/UnbundleCommandBuilder.java index 7ae836e682..6e94073244 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/UnbundleCommandBuilder.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/UnbundleCommandBuilder.java @@ -57,6 +57,8 @@ import java.io.IOException; import java.io.InputStream; /** + * The unbundle command can restore an empty repository from a bundle. The + * bundle can be created with the {@link BundleCommandBuilder}. * * @author Sebastian Sdorra * @since 1.43 @@ -64,18 +66,18 @@ import java.io.InputStream; public final class UnbundleCommandBuilder { - /** Field description */ + /** logger for UnbundleCommandBuilder */ private static final Logger logger = LoggerFactory.getLogger(UnbundleCommandBuilder.class); //~--- constructors --------------------------------------------------------- /** - * Constructs ... + * Constructs a new UnbundleCommandBuilder. * * - * @param unbundleCommand - * @param repository + * @param unbundleCommand unbundle command implementation + * @param repository repository */ public UnbundleCommandBuilder(UnbundleCommand unbundleCommand, Repository repository) @@ -87,12 +89,12 @@ public final class UnbundleCommandBuilder //~--- methods -------------------------------------------------------------- /** - * Method description + * Restores the repository from the given bundle. * * - * @param inputFile + * @param inputFile input file * - * @return + * @return unbundle response * * @throws IOException * @throws RepositoryException @@ -112,12 +114,12 @@ public final class UnbundleCommandBuilder } /** - * Method description + * Restores the repository from the given bundle. * * - * @param inputStream + * @param inputStream input stream * - * @return + * @return unbundle response * * @throws IOException * @throws RepositoryException @@ -133,12 +135,12 @@ public final class UnbundleCommandBuilder } /** - * Method description + * Restores the repository from the given bundle. * * - * @param byteSource + * @param byteSource byte source * - * @return + * @return unbundle response * * @throws IOException * @throws RepositoryException @@ -153,12 +155,12 @@ public final class UnbundleCommandBuilder } /** - * Method description + * Converts an {@link InputStream} into a {@link ByteSource}. * * - * @param inputStream + * @param inputStream input stream * - * @return + * @return byte source */ private ByteSource asByteSource(final InputStream inputStream) { @@ -175,9 +177,9 @@ public final class UnbundleCommandBuilder //~--- fields --------------------------------------------------------------- - /** Field description */ + /** repository */ private final Repository repository; - /** Field description */ + /** unbundle command implementation */ private final UnbundleCommand unbundleCommand; } diff --git a/scm-core/src/main/java/sonia/scm/repository/api/UnbundleResponse.java b/scm-core/src/main/java/sonia/scm/repository/api/UnbundleResponse.java index bf5c115ff8..bc2a897fd9 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/UnbundleResponse.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/UnbundleResponse.java @@ -34,6 +34,7 @@ package sonia.scm.repository.api; /** + * Response of {@link UnbundleCommandBuilder}. * * @author Sebastian Sdorra * @since 1.43 diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/BundleCommand.java b/scm-core/src/main/java/sonia/scm/repository/spi/BundleCommand.java index 44500b5709..8a0f21a714 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/BundleCommand.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/BundleCommand.java @@ -43,6 +43,7 @@ import sonia.scm.repository.api.BundleResponse; import java.io.IOException; /** + * Service provider implementation for the bundle command. * * @author Sebastian Sdorra * @since 1.43 @@ -51,16 +52,16 @@ public interface BundleCommand { /** - * Method description + * The bundle command dumps a repository to a byte source such as a file. * * - * @param request + * @param request bundle command request * - * @return + * @return bundle response * * @throws IOException * @throws RepositoryException */ public BundleResponse bundle(BundleCommandRequest request) - throws IOException, RepositoryException;; + throws IOException, RepositoryException; } diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/BundleCommandRequest.java b/scm-core/src/main/java/sonia/scm/repository/spi/BundleCommandRequest.java index f354ae94a1..4315b39621 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/BundleCommandRequest.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/BundleCommandRequest.java @@ -39,6 +39,7 @@ import com.google.common.base.Objects; import com.google.common.io.ByteSink; /** + * Request for the bundle command. * * @author Sebastian Sdorra * @since 1.43 @@ -47,10 +48,10 @@ public final class BundleCommandRequest { /** - * Constructs ... + * Constructs a new bundle command request. * * - * @param archive + * @param archive byte sink archive */ public BundleCommandRequest(ByteSink archive) { @@ -60,12 +61,7 @@ public final class BundleCommandRequest //~--- methods -------------------------------------------------------------- /** - * Method description - * - * - * @param obj - * - * @return + * {@inheritDoc} */ @Override public boolean equals(Object obj) @@ -86,10 +82,7 @@ public final class BundleCommandRequest } /** - * Method description - * - * - * @return + * {@inheritDoc} */ @Override public int hashCode() @@ -100,10 +93,10 @@ public final class BundleCommandRequest //~--- get methods ---------------------------------------------------------- /** - * Method description + * Returns the archive as {@link ByteSink}. * * - * @return + * @return {@link ByteSink} archive. */ ByteSink getArchive() { @@ -112,6 +105,6 @@ public final class BundleCommandRequest //~--- fields --------------------------------------------------------------- - /** Field description */ + /** byte sink archive */ private final ByteSink archive; } diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/UnbundleCommand.java b/scm-core/src/main/java/sonia/scm/repository/spi/UnbundleCommand.java index 6861e481fe..4777e0c11b 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/UnbundleCommand.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/UnbundleCommand.java @@ -43,6 +43,7 @@ import sonia.scm.repository.api.UnbundleResponse; import java.io.IOException; /** + * Service provider implementation for the unbundle command. * * @author Sebastian Sdorra * @since 1.43 @@ -51,16 +52,16 @@ public interface UnbundleCommand { /** - * Method description + * The unbundle command can restore an empty repository from a bundle. * * - * @param request + * @param request unbundle request * - * @return + * @return unbundle response * * @throws IOException * @throws RepositoryException */ public UnbundleResponse unbundle(UnbundleCommandRequest request) - throws IOException, RepositoryException;; + throws IOException, RepositoryException; } diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/UnbundleCommandRequest.java b/scm-core/src/main/java/sonia/scm/repository/spi/UnbundleCommandRequest.java index 0378a385c0..b9e9a5182b 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/UnbundleCommandRequest.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/UnbundleCommandRequest.java @@ -39,6 +39,7 @@ import com.google.common.base.Objects; import com.google.common.io.ByteSource; /** + * Request object for the unbundle command. * * @author Sebastian Sdorra * @since 1.43 @@ -47,10 +48,10 @@ public final class UnbundleCommandRequest { /** - * Constructs ... + * Constructs a new unbundle command request. * * - * @param archive + * @param archive byte source archive */ public UnbundleCommandRequest(ByteSource archive) { @@ -60,12 +61,7 @@ public final class UnbundleCommandRequest //~--- methods -------------------------------------------------------------- /** - * Method description - * - * - * @param obj - * - * @return + * {@inheritDoc} */ @Override public boolean equals(Object obj) @@ -86,10 +82,7 @@ public final class UnbundleCommandRequest } /** - * Method description - * - * - * @return + * {@inheritDoc} */ @Override public int hashCode() @@ -100,10 +93,10 @@ public final class UnbundleCommandRequest //~--- get methods ---------------------------------------------------------- /** - * Method description + * Returns the archive as {@link ByteSource}. * * - * @return + * @return {@link ByteSource} archive */ ByteSource getArchive() { @@ -112,6 +105,6 @@ public final class UnbundleCommandRequest //~--- fields --------------------------------------------------------------- - /** Field description */ + /** byte source archive */ private final ByteSource archive; }