Skip to content

Commit

Permalink
Merge pull request #141 from marklogic/feature/javadoc
Browse files Browse the repository at this point in the history
Initial Javadoc configuration
  • Loading branch information
rjrudin authored Jun 12, 2024
2 parents 21dfc2e + 6511690 commit 4bbd45f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flux-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ dependencies {
shadowDependencies "com.marklogic:marklogic-spark-connector:2.2-SNAPSHOT"
}

javadoc {
include "com/marklogic/flux/api/**"
}

distributions {
main {
distributionBaseName = "flux"
Expand Down
3 changes: 3 additions & 0 deletions flux-cli/src/main/java/com/marklogic/flux/api/Flux.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import com.marklogic.flux.impl.importdata.*;
import com.marklogic.flux.impl.reprocess.ReprocessCommand;

/**
* Entry point for executing Flux commands via the API.
*/
public abstract class Flux {

public static DocumentCopier copyDocuments() {
Expand Down
29 changes: 29 additions & 0 deletions flux-cli/src/main/java/com/marklogic/flux/api/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* <p>
* All Flux functionality can be accessed starting with the
* {@link com.marklogic.flux.api.Flux} class, which provides a static method corresponding to each
* command available in the Flux CLI. Each method returns a subclass of the
* {@link com.marklogic.flux.api.Executor} interface. The subclass has {@code from} and {@code to} methods that
* allow for options to be defined for how data is read by the command and how data is written or processed by the
* command.
* </p>
* <p>
* To support a fluent approach where methods on a {@link com.marklogic.flux.api.Executor} can be chained together,
* the {@code from} and {@code to} methods accept an instance of {@code java.util.function.Consumer} that provides
* access to a command-specific options object. The following example demonstrates this pattern in action:
* </p>
* <pre>
* Flux.importGenericFiles()
* .from(options -&gt; options
* .path("/path/to/files")
* .compressionType("zip"))
* .connectionString("user:password@host:8000")
* .to(options -&gt; options
* .collections("my-files")
* .permissions("rest-reader,read,rest-writer,update"))
* .execute();
* </pre>
*/
package com.marklogic.flux.api;


0 comments on commit 4bbd45f

Please sign in to comment.