Skip to content

Commit ba1f4bf

Browse files
author
Jay Bryant
committed
More Javadoc editing
1 parent 08f8c75 commit ba1f4bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+451
-397
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/BatchConfigurationException.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
package org.springframework.batch.core.configuration;
1717

1818
/**
19-
* Represents an error has occurred in the configuration of base batch infrastructure
20-
* (creation of a {@link org.springframework.batch.core.repository.JobRepository} for
21-
* example.
19+
* Represents that an error has occurred in the configuration of the base batch
20+
* infrastructure (the creation of a {@link org.springframework.batch.core.repository.JobRepository},
21+
* for example).
2222
*
2323
* @author Michael Minella
2424
* @author Mahmoud Ben Hassine
@@ -29,6 +29,8 @@ public class BatchConfigurationException extends RuntimeException {
2929
private static final long serialVersionUID = 1L;
3030

3131
/**
32+
* Create an exception with the given {@Link Throwable}.
33+
*
3234
* @param t an exception to be wrapped
3335
*/
3436
public BatchConfigurationException(Throwable t) {

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public DuplicateJobException(String msg) {
3636
}
3737

3838
/**
39+
* Create an exception with the given message and the given exception.
40+
*
3941
* @param msg error message.
4042
* @param e instance of {@link Throwable} that is the cause of the exception.
4143
*/

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface JobFactory {
3232
Job createJob();
3333

3434
/**
35-
* @return The {@link String} containing the {@link Job} name.
35+
* @return The {@link String} that contains the {@link Job} name.
3636
*/
3737
String getJobName();
3838

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobRegistry.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ public interface JobRegistry extends ListableJobLocator {
3535
void register(JobFactory jobFactory) throws DuplicateJobException;
3636

3737
/**
38-
* Unregisters a previously registered {@link Job}. If it was not previously
39-
* registered there is no error.
38+
* Unregisters a previously registered {@link Job}. If it was not
39+
* previously registered, there is no error.
40+
*
4041
* @param jobName the {@link Job} to unregister.
4142
*/
4243
void unregister(String jobName);

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.util.Collection;
2323

2424
/**
25-
* Registry keeping track of all the {@link Step} defined in a
25+
* Registry keeping track of all the {@link Step} instances defined in a
2626
* {@link org.springframework.batch.core.Job}.
2727
*
2828
* @author Sebastien Gerard

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/AbstractBatchConfiguration.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@
4040
import org.springframework.util.Assert;
4141

4242
/**
43-
* Base {@code Configuration} class providing common structure for enabling and using
44-
* Spring Batch. Customization is available by implementing the {@link BatchConfigurer}
45-
* interface.
43+
* Base {@code Configuration} class that provides a common structure for enabling and using Spring Batch.
44+
* Customization is available by implementing the {@link BatchConfigurer} interface.
4645
*
4746
* @author Dave Syer
4847
* @author Michael Minella
@@ -66,7 +65,7 @@ public abstract class AbstractBatchConfiguration implements ImportAware, Initial
6665
/**
6766
* Establish the {@link JobBuilderFactory} for the batch execution.
6867
* @return The instance of the {@link JobBuilderFactory}.
69-
* @throws Exception The {@link Exception} thrown if error occurs.
68+
* @throws Exception The {@link Exception} thrown if an error occurs.
7069
*/
7170
@Bean
7271
public JobBuilderFactory jobBuilders() throws Exception {
@@ -76,7 +75,7 @@ public JobBuilderFactory jobBuilders() throws Exception {
7675
/**
7776
* Establish the {@link StepBuilderFactory} for the batch execution.
7877
* @return The instance of the {@link StepBuilderFactory}.
79-
* @throws Exception The {@link Exception} thrown if error occurs.
78+
* @throws Exception The {@link Exception} thrown if an error occurs.
8079
*/
8180
@Bean
8281
public StepBuilderFactory stepBuilders() throws Exception {
@@ -86,31 +85,31 @@ public StepBuilderFactory stepBuilders() throws Exception {
8685
/**
8786
* Establish the {@link JobRepository} for the batch execution.
8887
* @return The instance of the {@link JobRepository}.
89-
* @throws Exception The {@link Exception} thrown if error occurs.
88+
* @throws Exception The {@link Exception} thrown if an error occurs.
9089
*/
9190
@Bean
9291
public abstract JobRepository jobRepository() throws Exception;
9392

9493
/**
9594
* Establish the {@link JobLauncher} for the batch execution.
9695
* @return The instance of the {@link JobLauncher}.
97-
* @throws Exception The {@link Exception} thrown if error occurs.
96+
* @throws Exception The {@link Exception} thrown if an error occurs.
9897
*/
9998
@Bean
10099
public abstract JobLauncher jobLauncher() throws Exception;
101100

102101
/**
103102
* Establish the {@link JobExplorer} for the batch execution.
104103
* @return The instance of the {@link JobExplorer}.
105-
* @throws Exception The {@link Exception} thrown if error occurs.
104+
* @throws Exception The {@link Exception} thrown if an error occurs.
106105
*/
107106
@Bean
108107
public abstract JobExplorer jobExplorer() throws Exception;
109108

110109
/**
111110
* Establish the {@link JobRegistry} for the batch execution.
112111
* @return The instance of the {@link JobRegistry}.
113-
* @throws Exception The {@link Exception} thrown if error occurs.
112+
* @throws Exception The {@link Exception} thrown if an error occurs.
114113
*/
115114
@Bean
116115
public JobRegistry jobRegistry() throws Exception {
@@ -120,7 +119,7 @@ public JobRegistry jobRegistry() throws Exception {
120119
/**
121120
* Establish the {@link PlatformTransactionManager} for the batch execution.
122121
* @return The instance of the {@link PlatformTransactionManager}.
123-
* @throws Exception The {@link Exception} thrown if error occurs.
122+
* @throws Exception The {@link Exception} thrown if an error occurs.
124123
*/
125124
public abstract PlatformTransactionManager transactionManager() throws Exception;
126125

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/BatchConfigurationSelector.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
import org.springframework.util.Assert;
2222

2323
/**
24-
* Base {@code Configuration} class providing common structure for enabling and using
25-
* Spring Batch. Customization is available by implementing the {@link BatchConfigurer}
26-
* interface.
24+
* Base {@code Configuration} class that provides common structure for enabling and using Spring Batch. Customization is
25+
* available by implementing the {@link BatchConfigurer} interface.
2726
*
2827
* @author Dave Syer
2928
* @since 2.2
@@ -50,4 +49,4 @@ public String[] selectImports(AnnotationMetadata importingClassMetadata) {
5049
return imports;
5150
}
5251

53-
}
52+
}

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/BatchConfigurer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
import org.springframework.transaction.PlatformTransactionManager;
2222

2323
/**
24-
* Strategy interface for users to provide as a factory for custom components needed by a
25-
* Batch system.
24+
* Strategy interface that users can provide as a factory for custom components needed by a Batch system.
2625
*
2726
* @author Dave Syer
2827
*

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/DefaultBatchConfigurer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@ public class DefaultBatchConfigurer implements BatchConfigurer {
4747
private JobExplorer jobExplorer;
4848

4949
/**
50-
* Create a new {@link DefaultBatchConfigurer} with the passed datasource. This
51-
* constructor will configure a default {@link DataSourceTransactionManager}.
50+
* Create a new {@link DefaultBatchConfigurer} with the passed datasource. This constructor
51+
* configures a default {@link DataSourceTransactionManager}.
52+
*
5253
* @param dataSource to use for the job repository and job explorer
5354
*/
5455
public DefaultBatchConfigurer(DataSource dataSource) {
5556
this(dataSource, new DataSourceTransactionManager(dataSource));
5657
}
5758

5859
/**
59-
* Create a new {@link DefaultBatchConfigurer} with the passed datasource and
60-
* transaction manager.
61-
* @param dataSource to use for the job repository and job explorer
62-
* @param transactionManager to use for the job repository
60+
* Create a new {@link DefaultBatchConfigurer} with the given datasource and transaction manager.
61+
* @param dataSource The data source to use for the job repository and job explorer.
62+
* @param transactionManager The transaction manager to use for the job repository.
6363
*/
6464
public DefaultBatchConfigurer(DataSource dataSource, PlatformTransactionManager transactionManager) {
6565
Assert.notNull(dataSource, "DataSource must not be null");

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java

Lines changed: 35 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
* }
6565
* </pre>
6666
*
67-
* The user should provide a {@link DataSource} as a bean in the context, or else
68-
* implement {@link BatchConfigurer} in the configuration class itself, e.g.
67+
* You should provide a {@link DataSource} as a bean in the context or else implement {@link BatchConfigurer} in
68+
* the configuration class itself -- for example:
6969
*
7070
* <pre class="code">
7171
* &#064;Configuration
@@ -87,41 +87,30 @@
8787
* }
8888
* </pre>
8989
*
90-
* If multiple {@link javax.sql.DataSource}s are defined in the context, the primary
91-
* autowire candidate will be used, otherwise an exception will be thrown.
90+
* If multiple {@link javax.sql.DataSource} instances are defined in the context, the primary autowire candidate
91+
* is used. Otherwise, an exception is thrown.
9292
*
93-
* Note that only one of your configuration classes needs to have the
94-
* <code>&#064;EnableBatchProcessing</code> annotation. Once you have an
95-
* <code>&#064;EnableBatchProcessing</code> class in your configuration you will have an
96-
* instance of {@link StepScope} and {@link org.springframework.batch.core.scope.JobScope}
97-
* so your beans inside steps can have <code>&#064;Scope("step")</code> and
98-
* <code>&#064;Scope("job")</code> respectively. You will also be able to
99-
* <code>&#064;Autowired</code> some useful stuff into your context:
93+
* Note that only one of your configuration classes needs to have the <code>&#064;EnableBatchProcessing</code>
94+
* annotation. Once you have an <code>&#064;EnableBatchProcessing</code> class in your configuration, you have an
95+
* instance of {@link StepScope} and {@link org.springframework.batch.core.scope.JobScope}, so your beans inside steps
96+
* can have <code>&#064;Scope("step")</code> and <code>&#064;Scope("job")</code> respectively. You can also
97+
* use <code>&#064;Autowired</code> to insert some useful stuff into your context:
10098
*
10199
* <ul>
102-
* <li>a {@link JobRepository} (bean name "jobRepository" of type
103-
* {@link org.springframework.batch.core.repository.support.SimpleJobRepository})</li>
104-
* <li>a {@link JobLauncher} (bean name "jobLauncher" of type
105-
* {@link org.springframework.batch.core.launch.support.SimpleJobLauncher})</li>
106-
* <li>a {@link JobRegistry} (bean name "jobRegistry" of type
107-
* {@link org.springframework.batch.core.configuration.support.MapJobRegistry})</li>
108-
* <li>a {@link org.springframework.batch.core.explore.JobExplorer} (bean name
109-
* "jobExplorer" of type
110-
* {@link org.springframework.batch.core.explore.support.SimpleJobExplorer})</li>
111-
* <li>a {@link JobBuilderFactory} (bean name "jobBuilders") as a convenience to prevent
112-
* you from having to inject the job repository into every job, as in the examples
113-
* above</li>
114-
* <li>a {@link StepBuilderFactory} (bean name "stepBuilders") as a convenience to prevent
115-
* you from having to inject the job repository and transaction manager into every
116-
* step</li>
100+
* <li>a {@link JobRepository} (bean name "jobRepository" of type {@link org.springframework.batch.core.repository.support.SimpleJobRepository})</li>
101+
* <li>a {@link JobLauncher} (bean name "jobLauncher" of type {@link org.springframework.batch.core.launch.support.SimpleJobLauncher})</li>
102+
* <li>a {@link JobRegistry} (bean name "jobRegistry" of type {@link org.springframework.batch.core.configuration.support.MapJobRegistry})</li>
103+
* <li>a {@link org.springframework.batch.core.explore.JobExplorer} (bean name "jobExplorer" of type {@link org.springframework.batch.core.explore.support.SimpleJobExplorer})</li>
104+
* <li>a {@link JobBuilderFactory} (bean name "jobBuilders") as a convenience to prevent you from having to inject the
105+
* job repository into every job, as in the earlier examples</li>
106+
* <li>a {@link StepBuilderFactory} (bean name "stepBuilders") as a convenience to prevent you from having to inject the
107+
* job repository and transaction manager into every step</li>
117108
* </ul>
118109
*
119-
* The transaction manager provided by this annotation will be of type
120-
* {@link org.springframework.jdbc.datasource.DataSourceTransactionManager} configured
121-
* with the {@link javax.sql.DataSource} provided within the context.
110+
* The transaction manager provided by this annotation is of type {@link org.springframework.jdbc.datasource.DataSourceTransactionManager}
111+
* and is configured with the {@link javax.sql.DataSource} provided within the context.
122112
*
123-
* In order to use a custom transaction manager, a custom {@link BatchConfigurer} should
124-
* be provided. For example:
113+
* To use a custom transaction manager, you should provide a custom {@link BatchConfigurer} -- for example:
125114
*
126115
* <pre class="code">
127116
* &#064;Configuration
@@ -143,13 +132,11 @@
143132
* }
144133
* </pre>
145134
*
146-
* If the configuration is specified as <code>modular=true</code> then the context will
147-
* also contain an {@link AutomaticJobRegistrar}. The job registrar is useful for
148-
* modularizing your configuration if there are multiple jobs. It works by creating
149-
* separate child application contexts containing job configurations and registering those
150-
* jobs. The jobs can then create steps and other dependent components without needing to
151-
* worry about bean definition name clashes. Beans of type
152-
* {@link ApplicationContextFactory} will be registered automatically with the job
135+
* If the configuration is specified as <code>modular=true</code>, the context also contains an
136+
* {@link AutomaticJobRegistrar}. The job registrar is useful for modularizing your configuration if there are multiple
137+
* jobs. It works by creating separate child application contexts to contain job configurations and register those
138+
* jobs. The jobs can then create steps and other dependent components without needing to worry about bean definition
139+
* name clashes. Beans of type {@link ApplicationContextFactory} are automatically registered with the job
153140
* registrar. Example:
154141
*
155142
* <pre class="code">
@@ -172,13 +159,12 @@
172159
* }
173160
* </pre>
174161
*
175-
* Note that a modular parent context in general should <em>not</em> itself contain
176-
* &#64;Bean definitions for job, especially if a {@link BatchConfigurer} is provided,
177-
* because cyclic configuration dependencies are otherwise likely to develop.
162+
* Note that a modular parent context, in general, should <em>not</em> itself contain &#64;Bean definitions for job,
163+
* especially if a {@link BatchConfigurer} is provided, because cyclic configuration dependencies are likely
164+
* to develop.
178165
*
179166
* <p>
180-
* For reference, the first example above can be compared to the following Spring XML
181-
* configuration:
167+
* For reference, compare the first example shown earlier to the following Spring XML configuration:
182168
*
183169
* <pre class="code">
184170
* {@code
@@ -208,12 +194,12 @@
208194
public @interface EnableBatchProcessing {
209195

210196
/**
211-
* Indicate whether the configuration is going to be modularized into multiple
212-
* application contexts. If true then you should not create any &#64;Bean Job
213-
* definitions in this context, but rather supply them in separate (child) contexts
214-
* through an {@link ApplicationContextFactory}.
215-
* @return boolean indicating whether the configuration is going to be modularized
216-
* into multiple application contexts. Defaults to false.
197+
* Indicate whether the configuration is going to be modularized into multiple application contexts. If true,
198+
* you should not create any &#64;Bean Job definitions in this context but, rather, supply them in separate (child)
199+
* contexts through an {@link ApplicationContextFactory}.
200+
*
201+
* @return boolean indicating whether the configuration is going to be
202+
* modularized into multiple application contexts. Defaults to {@code false}.
217203
*/
218204
boolean modular() default false;
219205

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/JobBuilderFactory.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
import org.springframework.batch.core.repository.JobRepository;
2020

2121
/**
22-
* Convenient factory for a {@link JobBuilder} which sets the {@link JobRepository}
23-
* automatically.
22+
* Convenient factory for a {@link JobBuilder} that sets the {@link JobRepository} automatically.
2423
*
2524
* @author Dave Syer
2625
* @author Mahmoud Ben Hassine
@@ -38,9 +37,9 @@ public JobBuilderFactory(JobRepository jobRepository) {
3837
}
3938

4039
/**
41-
* Creates a job builder and initializes its job repository. Note that if the builder
42-
* is used to create a &#64;Bean definition then the name of the job and the bean name
43-
* might be different.
40+
* Creates a job builder and initializes its job repository. Note that, if the builder is used to create a &#64;Bean
41+
* definition, the name of the job and the bean name might be different.
42+
*
4443
* @param name the name of the job
4544
* @return a job builder
4645
*/

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/JobScope.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424

2525
/**
2626
* <p>
27-
* Convenient annotation for job scoped beans that defaults the proxy mode, so that it
28-
* doesn't have to be specified explicitly on every bean definition. Use this on any
29-
* &#64;Bean that needs to inject &#64;Values from the job context, and any bean that
30-
* needs to share a lifecycle with a job execution (e.g. an JobExecutionListener). E.g.
27+
* Convenient annotation for job-scoped beans that defaults the proxy mode, so that it does not have to be specified
28+
* explicitly on every bean definition. Use this on any &#64;Bean that needs to inject &#64;Values from the job
29+
* context, and any bean that needs to share a lifecycle with a job execution (such as an JobExecutionListener).
30+
* The following listing shows an example:
3131
* </p>
3232
*
3333
* <pre class="code">
@@ -54,4 +54,4 @@
5454
@Documented
5555
public @interface JobScope {
5656

57-
}
57+
}

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/ModularBatchConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ public class ModularBatchConfiguration extends SimpleBatchConfiguration {
4646

4747
/**
4848
* Creates a {@link AutomaticJobRegistrar} bean.
49-
* @return New instance of {@link AutomaticJobRegistrar}.
50-
* @throws Exception The {@link Exception} thrown if an error occurs.
49+
*
50+
* @return a new instance of {@link AutomaticJobRegistrar}.
51+
* @throws an {@link Exception} if an error occurs.
5152
*/
5253
@Bean
5354
public AutomaticJobRegistrar jobRegistrar() throws Exception {

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
import org.springframework.transaction.PlatformTransactionManager;
3636

3737
/**
38-
* Base {@code Configuration} class providing common structure for enabling and using
39-
* Spring Batch. Customization is available by implementing the {@link BatchConfigurer}
40-
* interface.
38+
* Base {@code Configuration} class to provide a common structure for enabling and using Spring Batch.
39+
* Customization is available by implementing the {@link BatchConfigurer} interface.
4140
*
4241
* @author Dave Syer
4342
* @author Mahmoud Ben Hassine

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/StepBuilderFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public StepBuilderFactory(JobRepository jobRepository, PlatformTransactionManage
4545
}
4646

4747
/**
48-
* Creates a step builder and initializes its job repository and transaction manager.
49-
* Note that if the builder is used to create a &#64;Bean definition then the name of
50-
* the step and the bean name might be different.
48+
* Creates a step builder and initializes its job repository and transaction manager. Note that, if the builder is
49+
* used to create a &#64;Bean definition, the name of the step and the bean name might be different.
50+
*
5151
* @param name the name of the step
5252
* @return a step builder
5353
*/

0 commit comments

Comments
 (0)