From b2d1dcbfdb78b8bcc98d8c0bfc9ec9d325757bec Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Mon, 17 Dec 2012 13:42:48 -0600 Subject: [PATCH] BATCH-1923: Fixed javadoc errors --- .../batch/core/job/builder/FlowBuilder.java | 88 +++++++++---------- .../core/job/builder/FlowJobBuilderTests.java | 4 +- 2 files changed, 45 insertions(+), 47 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/FlowBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/FlowBuilder.java index d593b779b..f4e5e157f 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/FlowBuilder.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/FlowBuilder.java @@ -42,13 +42,13 @@ import org.springframework.core.task.TaskExecutor; /** * A builder for a flow of steps that can be executed as a job or as part of a job. Steps can be linked together with * conditional transitions that depend on the exit status of the previous step. - * + * * @author Dave Syer - * + * * @since 2.2 - * + * * @param the type of object returned by the builder (by default a Flow) - * + * */ public class FlowBuilder { @@ -91,7 +91,7 @@ public class FlowBuilder { /** * Validate the current state of the builder and build a flow. Subclasses may override this to build an object of a * different type that itself depends on the flow. - * + * * @return a flow */ public Q build() { @@ -103,7 +103,7 @@ public class FlowBuilder { /** * Transition to the next step on successful completion of the current step. All other outcomes are treated as * failures. - * + * * @param step the next step * @return this to enable chaining */ @@ -114,7 +114,7 @@ public class FlowBuilder { /** * Start a flow. If some steps are already registered, just a synonym for {@link #from(Step)}. - * + * * @param step the step to start with * @return this to enable chaining */ @@ -126,7 +126,7 @@ public class FlowBuilder { /** * Go back to a previously registered step and start a new path. If no steps are registered yet just a synonym for * {@link #start(Step)}. - * + * * @param step the step to start from (already registered) * @return this to enable chaining */ @@ -138,8 +138,8 @@ public class FlowBuilder { /** * Transition to the decider on successful completion of the current step. All other outcomes are treated as * failures. - * - * @param step the next step + * + * @param decider the JobExecutionDecider to determine the next step to execute * @return this to enable chaining */ public UnterminatedFlowBuilder next(JobExecutionDecider decider) { @@ -149,7 +149,7 @@ public class FlowBuilder { /** * If a flow should start with a decision use this as the first state. - * + * * @param decider the to start from * @return a builder to enable chaining */ @@ -160,7 +160,7 @@ public class FlowBuilder { /** * Start again from a decision that was already registered. - * + * * @param decider the decider to start from (already registered) * @return a builder to enable chaining */ @@ -171,7 +171,7 @@ public class FlowBuilder { /** * Go next on successful completion to a subflow. - * + * * @param flow the flow to go to * @return a builder to enable chaining */ @@ -182,7 +182,7 @@ public class FlowBuilder { /** * Start again from a subflow that was already registered. - * + * * @param flow the flow to start from (already registered) * @return a builder to enable chaining */ @@ -193,7 +193,7 @@ public class FlowBuilder { /** * If a flow should start with a subflow use this as the first state. - * + * * @param flow the flow to start from * @return a builder to enable chaining */ @@ -214,7 +214,7 @@ public class FlowBuilder { * Start a transition to a new state if the exit status from the previous state matches the pattern given. * Successful completion normally results in an exit status equal to (or starting with by convention) "COMPLETED". * See {@link ExitStatus} for commonly used values. - * + * * @param pattern the pattern of exit status on which to take this transition * @return a builder to enable fluent chaining */ @@ -225,10 +225,8 @@ public class FlowBuilder { /** * A synonym for {@link #build()} which callers might find useful. Subclasses can override build to create an object * of the desired type (e.g. a parent builder or an actual flow). - * + * * @return the result of the builder - * - * @param Q the type of the result */ public final Q end() { return build(); @@ -407,9 +405,9 @@ public class FlowBuilder { /** * A builder for continuing a flow from a decision state. - * + * * @author Dave Syer - * + * * @param the result of the builder's build() */ public static class UnterminatedFlowBuilder { @@ -424,9 +422,9 @@ public class FlowBuilder { * Start a transition to a new state if the exit status from the previous state matches the pattern given. * Successful completion normally results in an exit status equal to (or starting with by convention) * "COMPLETED". See {@link ExitStatus} for commonly used values. - * + * * @param pattern the pattern of exit status on which to take this transition - * @return + * @return a TransitionBuilder */ public TransitionBuilder on(String pattern) { return new TransitionBuilder(parent, pattern); @@ -436,9 +434,9 @@ public class FlowBuilder { /** * A builder for transitions within a flow. - * + * * @author Dave Syer - * + * * @param the result of the parent builder's build() */ public static class TransitionBuilder { @@ -454,7 +452,7 @@ public class FlowBuilder { /** * Specify the next step. - * + * * @param step the next step after this transition * @return a FlowBuilder */ @@ -467,8 +465,8 @@ public class FlowBuilder { /** * Specify the next state as a complete flow. - * - * @param step the next step after this transition + * + * @param flow the next flow after this transition * @return a FlowBuilder */ public FlowBuilder to(Flow flow) { @@ -480,8 +478,8 @@ public class FlowBuilder { /** * Specify the next state as a decision. - * - * @param step the next step after this transition + * + * @param decider the decider to determine the next step * @return a FlowBuilder */ public FlowBuilder to(JobExecutionDecider decider) { @@ -493,7 +491,7 @@ public class FlowBuilder { /** * Signal the successful end of the flow. - * + * * @return a FlowBuilder */ public FlowBuilder stop() { @@ -503,7 +501,7 @@ public class FlowBuilder { /** * Stop the flow and provide a flow to start with if the flow is restarted. - * + * * @param flow the flow to restart with * @return a FlowBuilder */ @@ -515,8 +513,8 @@ public class FlowBuilder { /** * Stop the flow and provide a decider to start with if the flow is restarted. - * - * @param restart a decider to restart with + * + * @param decider a decider to restart with * @return a FlowBuilder */ public FlowBuilder stopAndRestart(JobExecutionDecider decider) { @@ -527,7 +525,7 @@ public class FlowBuilder { /** * Stop the flow and provide a step to start with if the flow is restarted. - * + * * @param restart the step to restart with * @return a FlowBuilder */ @@ -539,7 +537,7 @@ public class FlowBuilder { /** * Signal the successful end of the flow. - * + * * @return a FlowBuilder */ public FlowBuilder end() { @@ -549,7 +547,7 @@ public class FlowBuilder { /** * Signal the end of the flow with the status provided. - * + * * @return a FlowBuilder */ public FlowBuilder end(String status) { @@ -559,7 +557,7 @@ public class FlowBuilder { /** * Signal the end of the flow with an error condition. - * + * * @return a FlowBuilder */ public FlowBuilder fail() { @@ -570,22 +568,22 @@ public class FlowBuilder { /** * A builder for building a split state. Example (builder is a {@link FlowBuilder}): - * + * *
 	 * Flow splitFlow = builder.start(flow1).split(new SyncTaskExecutor()).add(flow2).build();
 	 * 
- * + * * where flow1 and flow2 will be executed (one after the other because of the task * executor that was added). Another example - * + * *
 	 * Flow splitFlow = builder.start(step1).split(new SimpleAsyncTaskExecutor()).add(flow).build();
 	 * 
- * + * * In this example, a flow consisting of step1 will be executed in parallel with flow. - * + * * @author Dave Syer - * + * * @param the result of the parent builder's build() */ public static class SplitBuilder { @@ -605,7 +603,7 @@ public class FlowBuilder { /** * Add flows to the split, in addition to the current state already present in the parent builder. - * + * * @param flows more flows to add to the split * @return the parent builder */ diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/job/builder/FlowJobBuilderTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/job/builder/FlowJobBuilderTests.java index bc937ed1d..7462d1095 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/job/builder/FlowJobBuilderTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/job/builder/FlowJobBuilderTests.java @@ -37,12 +37,12 @@ import org.springframework.core.task.SimpleAsyncTaskExecutor; /** * @author Dave Syer - * + * */ public class FlowJobBuilderTests { private JobRepository jobRepository; - + private JobExecution execution; private StepSupport step1 = new StepSupport("step1") {