|
31 | 31 | */ |
32 | 32 | public class DeployForestsCommand extends AbstractCommand { |
33 | 33 |
|
| 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 | + |
34 | 40 | private int forestsPerHost = 1; |
35 | 41 | private String databaseName; |
36 | 42 | private String forestFilename; |
37 | 43 | private String forestPayload; |
38 | 44 | private boolean createForestsOnEachHost = true; |
39 | 45 | private HostCalculator hostCalculator; |
40 | 46 |
|
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() { |
42 | 52 | 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(); |
43 | 63 | this.databaseName = databaseName; |
44 | 64 | } |
45 | 65 |
|
@@ -217,4 +237,13 @@ public void setCreateForestsOnEachHost(boolean createForestsOnEachHost) { |
217 | 237 | public void setHostCalculator(HostCalculator hostCalculator) { |
218 | 238 | this.hostCalculator = hostCalculator; |
219 | 239 | } |
| 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 | + } |
220 | 249 | } |
0 commit comments