Skip to content

Commit 6c5e6b7

Browse files
Update javadocs (#2485)
1 parent f7eabe4 commit 6c5e6b7

File tree

12 files changed

+123
-116
lines changed

12 files changed

+123
-116
lines changed

marklogic-data-hub/src/main/java/com/marklogic/hub/FlowManager.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public interface FlowManager {
7373
* Creates a flow
7474
*
7575
* @param flowName - name of the flow
76+
* @return a Flow object
7677
*/
7778
Flow createFlow(String flowName);
7879

@@ -109,30 +110,30 @@ public interface FlowManager {
109110

110111
/**
111112
* Check if a flow has existed
112-
* @param flowName
113-
* @return
113+
* @param flowName a flow name
114+
* @return a boolean value
114115
*/
115116
boolean isFlowExisted(String flowName);
116117

117118
/**
118119
*
119-
* @param flow
120-
* @return
120+
* @param flow a flow object
121+
* @return a map of steps
121122
*/
122123
Map<String, Step> getSteps(Flow flow);
123124

124125
/**
125126
*
126-
* @param flow
127-
* @param stepMap
127+
* @param flow a flow object
128+
* @param stepMap a map of steps
128129
*/
129130
void setSteps(Flow flow, Map<String, Step> stepMap);
130131

131132
/**
132133
*
133-
* @param flow
134-
* @param stepNum
135-
* @return
134+
* @param flow a flow object
135+
* @param stepNum step key
136+
* @return a step
136137
*/
137138
Step getStep(Flow flow, String stepNum);
138139
}

marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/commands/DeployHubDatabaseCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public class DeployHubDatabaseCommand extends DeployDatabaseCommand {
4646
* user config directory. That will then cause the ordering of database commands to be incorrect, which will
4747
* likely cause an error when databases are deployed and they don't yet exist.
4848
*
49-
* @param hubConfig
50-
* @param databaseFile
51-
* @param databaseFilename
49+
* @param hubConfig a hubConfig object
50+
* @param databaseFile database file object
51+
* @param databaseFilename name of the database file
5252
*/
5353
public DeployHubDatabaseCommand(HubConfig hubConfig, File databaseFile, String databaseFilename) {
5454
super(databaseFilename);

marklogic-data-hub/src/main/java/com/marklogic/hub/flow/Flow.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,42 +38,42 @@ public interface Flow {
3838
/**
3939
* Returns flow description
4040
*
41-
* @return
41+
* @return - a flow description
4242
*/
4343
String getDescription();
4444

4545
/**
4646
* Sets flow description
4747
*
48-
* @param description
48+
* @param description a flow description
4949
*/
5050
void setDescription(String description);
5151

5252
/**
5353
* Returns flow batch size
5454
*
55-
* @return
55+
* @return - flow batch size
5656
*/
5757
int getBatchSize();
5858

5959
/**
6060
* Set flow batch size
6161
*
62-
* @param batchSize
62+
* @param batchSize flow batch size
6363
*/
6464
void setBatchSize(int batchSize);
6565

6666
/**
6767
* Returns flow thread count
6868
*
69-
* @return
69+
* @return thread count for flow
7070
*/
7171
int getThreadCount();
7272

7373
/**
7474
* Sets flow thread count
7575
*
76-
* @param threadCount
76+
* @param threadCount thread count for flow
7777
*/
7878
void setThreadCount(int threadCount);
7979

@@ -137,13 +137,14 @@ public interface Flow {
137137
void setOverrideStepConfig(Map<String, Object> overrideStepConfig);
138138

139139
/**
140-
*
141-
* @param stopOnError
140+
* If set stops the flow on error
141+
* @param stopOnError boolean flag to stop on error
142142
*/
143143
void setStopOnError(boolean stopOnError);
144+
144145
/**
145-
*
146-
* @return
146+
* Returns the value for stop on error flag
147+
* @return boolean flag to stop on error
147148
*/
148149
boolean isStopOnError();
149150

@@ -155,7 +156,7 @@ public interface Flow {
155156

156157
/**
157158
* Sets version
158-
* @param version
159+
* @param version version for the flow
159160
*/
160161
void setVersion(int version);
161162

@@ -170,8 +171,8 @@ public interface Flow {
170171
/**
171172
* Get step Info by step id
172173
*
173-
* @param stepId
174-
* @return
174+
* @param stepId id for the step
175+
* @return a step
175176
*/
176177
Step getStepById(String stepId);
177178
}

marklogic-data-hub/src/main/java/com/marklogic/hub/flow/FlowRunner.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public interface FlowRunner {
1414
*
1515
* @param flow the flow to run
1616
* @param jobId the jobid to be used for the flow
17-
*
17+
* @return a response object
1818
*/
1919
RunFlowResponse runFlow(String flow, String jobId);
2020

@@ -24,7 +24,7 @@ public interface FlowRunner {
2424
* @param flow the flow to run
2525
* @param steps the steps in the flow to run
2626
* @param jobId the jobid to be used for the flow
27-
*
27+
* @return a response object
2828
*/
2929
RunFlowResponse runFlow(String flow, List<String> steps, String jobId);
3030

@@ -34,7 +34,7 @@ public interface FlowRunner {
3434
* @param flow the flow to run
3535
* @param jobId the jobid to be used for the flow
3636
* @param options the key/value options to be passed
37-
*
37+
* @return a response object
3838
*/
3939
RunFlowResponse runFlow(String flow, String jobId, Map<String, Object> options);
4040

@@ -45,7 +45,7 @@ public interface FlowRunner {
4545
* @param steps the steps in the flow to run
4646
* @param jobId the jobid to be used for the flow
4747
* @param options the key/value options to be passed
48-
*
48+
* @return a response object
4949
*/
5050
RunFlowResponse runFlow(String flow, List<String> steps, String jobId, Map<String, Object> options);
5151

@@ -57,7 +57,7 @@ public interface FlowRunner {
5757
* @param jobId the jobid to be used for the flow
5858
* @param options the key/value options to be passed
5959
* @param stepConfig the key/value config to override the running of the step
60-
*
60+
* @return a response object
6161
*/
6262
RunFlowResponse runFlow(String flow, List<String> steps, String jobId, Map<String, Object> options, Map<String, Object> stepConfig);
6363

@@ -66,15 +66,15 @@ public interface FlowRunner {
6666
*
6767
* @param flow the flow to run
6868
* @param steps the steps in the flow to run
69-
*
69+
* @return a response object
7070
*/
7171
RunFlowResponse runFlow(String flow, List<String> steps);
7272

7373
/**
7474
* Runs the entire flow, with full defaults
7575
*
7676
* @param flow the flow to run
77-
*
77+
* @return a response object
7878
*/
7979
RunFlowResponse runFlow(String flow);
8080

@@ -98,6 +98,7 @@ public interface FlowRunner {
9898
* @param unit the time unit of the timeout argument
9999
*
100100
* @throws InterruptedException if interrupted while waiting
101+
* @throws TimeoutException if times out
101102
*/
102103
void awaitCompletion(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException;
103104

marklogic-data-hub/src/main/java/com/marklogic/hub/impl/DataHubImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ public void wireClient() {
127127
/**
128128
* Need to account for the group name in case the user has overridden the name of the "Default" group.
129129
*
130-
* @param manageClient
131-
* @param hubConfig
132-
* @return
130+
* @param manageClient manageClient object
131+
* @param hubConfig hubConfig object
132+
* @return constructed ServerManager object
133133
*/
134134
protected ServerManager constructServerManager(ManageClient manageClient, HubConfig hubConfig) {
135135
AppConfig appConfig = hubConfig.getAppConfig();
@@ -563,7 +563,7 @@ public void updateIndexes() {
563563
/**
564564
* In a provisioned environment, only the databases defined by this pattern can be updated.
565565
*
566-
* @return
566+
* @return database name pattern
567567
*/
568568
protected Pattern buildPatternForDatabasesToUpdateIndexesFor() {
569569
return Pattern.compile("(staging|final|job)-database.json");

marklogic-data-hub/src/main/java/com/marklogic/hub/impl/HubConfigImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ private void updateAppConfig(AppConfig config) {
18371837
* But if the config paths have been customized - most likely via mlConfigPaths in gradle.properties - then this
18381838
* method just ensures that they're relative to the DHF project directory.
18391839
*
1840-
* @param config
1840+
* @param config an AppConfig object
18411841
*/
18421842
protected void initializeConfigDirs(AppConfig config) {
18431843
final String defaultConfigPath = String.join(File.separator, "src", "main", "ml-config");
@@ -1868,7 +1868,7 @@ protected void initializeConfigDirs(AppConfig config) {
18681868
/**
18691869
* Need to initialize every module path as being relative to the current project directory.
18701870
*
1871-
* @param config
1871+
* @param config an AppConfig object
18721872
*/
18731873
protected void initializeModulePaths(AppConfig config) {
18741874
List<String> modulePaths = new ArrayList<>();
@@ -1970,8 +1970,8 @@ public void refreshProject(Properties properties, boolean loadGradleProperties)
19701970
* properties plugin does. But it is being preserved for backwards compatibility in case any clients prior to
19711971
* 4.1 were using HubConfigBuilder.withPropertiesFromEnvironment.
19721972
*
1973-
* @param environment
1974-
* @return
1973+
* @param environment a string name for environment
1974+
* @return a hubconfig object
19751975
*/
19761976
@JsonIgnore
19771977
public HubConfig withPropertiesFromEnvironment(String environment) {

marklogic-data-hub/src/main/java/com/marklogic/hub/job/JobMonitor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public interface JobMonitor {
2323

2424
/**
2525
* Sets the flow to be used with the flow runner
26+
* @param jobId the id of the job
2627
* @param batchId the id of the batch
2728
* @return string denoting status of the batch
2829
*

marklogic-data-hub/src/main/java/com/marklogic/hub/legacy/LegacyFlowManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface LegacyFlowManager {
3333

3434
/**
3535
* Set HubConfig
36-
* @param hubConfig
36+
* @param hubConfig a hubConfig object
3737
*/
3838
void setHubConfig(HubConfig hubConfig);
3939

marklogic-data-hub/src/main/java/com/marklogic/hub/step/StepDefinition.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,18 +259,18 @@ static StepDefinition create(String name, StepDefinitionType type) {
259259

260260
/**
261261
*
262-
* @param stepName
263-
* @param stepDefinition
264-
* @param step
265-
* @return
262+
* @param stepName name of the step
263+
* @param stepDefinition step definition object to transform from
264+
* @param step step object to be transformed
265+
* @return a transformed step object
266266
*/
267267
Step transformToStep(String stepName, StepDefinition stepDefinition, Step step);
268268

269269
/**
270270
*
271-
* @param stepDefinition
272-
* @param step
273-
* @return
271+
* @param stepDefinition step definition to be transformed
272+
* @param step step object to transform from
273+
* @return a transformed step definition object
274274
*/
275275
StepDefinition transformFromStep(StepDefinition stepDefinition, Step step);
276276
}

marklogic-data-hub/src/main/java/com/marklogic/hub/step/StepRunner.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public interface StepRunner {
142142
* @param unit the time unit of the timeout argument
143143
*
144144
* @throws InterruptedException if interrupted while waiting
145+
* @throws TimeoutException if times out
145146
*/
146147
void awaitCompletion(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException;
147148

@@ -168,7 +169,7 @@ public interface StepRunner {
168169

169170
/**
170171
* Returns the batch size
171-
*
172+
* @return batch size for step runner
172173
*/
173174
int getBatchSize();
174175

0 commit comments

Comments
 (0)