Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 7c90ecb

Browse files
committed
#290 Restored no-arg constructor for DeployForestsCommand
Bumped to 3.8.2
1 parent e6be1d9 commit 7c90ecb

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
group=com.marklogic
22
javadocsDir=../gh-pages-marklogic-java/javadocs
3-
version=3.8.1
3+
version=3.8.2
44
mlJavaclientUtilVersion=3.8.0
55
mlJunitVersion=3.1.0
66

src/main/java/com/marklogic/appdeployer/command/forests/DeployForestsCommand.java

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,35 @@
3131
*/
3232
public class DeployForestsCommand extends AbstractCommand {
3333

34+
/**
35+
* This was added back in 3.8.2 to preserve backwards compatibility, as it was removed in 3.7.0.
36+
*/
37+
public static final String DEFAULT_FOREST_PAYLOAD = "{\"forest-name\": \"%%FOREST_NAME%%\", \"host\": \"%%FOREST_HOST%%\", "
38+
+ "\"database\": \"%%FOREST_DATABASE%%\"}";
39+
3440
private int forestsPerHost = 1;
3541
private String databaseName;
3642
private String forestFilename;
3743
private String forestPayload;
3844
private boolean createForestsOnEachHost = true;
3945
private HostCalculator hostCalculator;
4046

41-
public DeployForestsCommand(String databaseName) {
47+
/**
48+
* This was added back in 3.8.2 to preserve backwards compatibility, as it was removed in 3.7.0. If you use this
49+
* constructor, be sure to call setDatabaseName.
50+
*/
51+
public DeployForestsCommand() {
4252
setExecuteSortOrder(SortOrderConstants.DEPLOY_FORESTS);
53+
}
54+
55+
/**
56+
* This is the preferred constructor to use for this class, as it requires a database name, which is required for
57+
* this command to execute correctly.
58+
*
59+
* @param databaseName
60+
*/
61+
public DeployForestsCommand(String databaseName) {
62+
this();
4363
this.databaseName = databaseName;
4464
}
4565

@@ -217,4 +237,13 @@ public void setCreateForestsOnEachHost(boolean createForestsOnEachHost) {
217237
public void setHostCalculator(HostCalculator hostCalculator) {
218238
this.hostCalculator = hostCalculator;
219239
}
240+
241+
/**
242+
* This was added back in 3.8.2 to preserve backwards compatibility, as it was removed in 3.7.0.
243+
*
244+
* @param databaseName
245+
*/
246+
public void setDatabaseName(String databaseName) {
247+
this.databaseName = databaseName;
248+
}
220249
}

0 commit comments

Comments
 (0)