BATCH-1918: Fixed javadoc errors

This commit is contained in:
Michael Minella
2012-12-17 15:32:16 -06:00
parent 25cd6d6826
commit f64a5deff9
4 changed files with 54 additions and 39 deletions

View File

@@ -40,25 +40,28 @@ public class DefaultBatchConfigurer implements BatchConfigurer {
this.dataSource = dataSource;
this.transactionManager = new DataSourceTransactionManager(dataSource);
}
protected DefaultBatchConfigurer() {}
public DefaultBatchConfigurer(DataSource dataSource) {
setDataSource(dataSource);
}
@Override
public JobRepository getJobRepository() {
return jobRepository;
}
@Override
public PlatformTransactionManager getTransactionManager() {
return transactionManager;
}
@Override
public JobLauncher getJobLauncher() {
return jobLauncher;
}
@PostConstruct
public void initialize() throws Exception {
this.jobRepository = createJobRepository();

View File

@@ -42,7 +42,7 @@ import org.springframework.util.Assert;
* When createApplicationContext method is called, the child {@link ApplicationContext} will be returned. The child
* context is not re-created every time it is requested, it is lazily initialized and cached. Clients should ensure that
* it is closed when it is no longer needed. If a path is not set, the parent will always be returned.
*
*
*/
public abstract class AbstractApplicationContextFactory implements ApplicationContextFactory, ApplicationContextAware {
@@ -80,7 +80,7 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
/**
* Flag to indicate that configuration such as bean post processors and custom editors should be copied from the
* parent context. Defaults to true.
*
*
* @param copyConfiguration the flag value to set
*/
public void setCopyConfiguration(boolean copyConfiguration) {
@@ -90,7 +90,7 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
/**
* Protected access for subclasses to the flag determining whether configuration should be copied from parent
* context.
*
*
* @return the flag value
*/
protected final boolean isCopyConfiguration() {
@@ -100,8 +100,8 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
/**
* Determines which bean factory post processors (like property placeholders) should be copied from the parent
* context. Defaults to {@link PropertyPlaceholderConfigurer} and {@link CustomEditorConfigurer}.
*
* @param copyBeanFactoryPostProcessors the flag value to set
*
* @param beanFactoryPostProcessorClasses array of post processor types to be copied
*/
public void setBeanFactoryPostProcessorClasses(
@@ -117,7 +117,7 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
* {@link BeanFactoryAware} (so any post processors that have a reference to the parent bean factory are not copied
* into the child). Note that these classes do not themselves have to be {@link BeanPostProcessor} implementations
* or sub-interfaces.
*
*
* @param beanPostProcessorExcludeClasses the classes to set
*/
public void setBeanPostProcessorExcludeClasses(Class<?>[] beanPostProcessorExcludeClasses) {
@@ -131,7 +131,7 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
/**
* Protected access to the list of bean factory post processor classes that should be copied over to the context
* from the parent.
*
*
* @return the classes for post processors that were nominated for copying
*/
protected final Collection<Class<? extends BeanFactoryPostProcessor>> getBeanFactoryPostProcessorClasses() {
@@ -140,9 +140,10 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
/**
* Setter for the parent application context.
*
*
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
*/
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if (applicationContext == null) {
return;
@@ -153,9 +154,10 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
/**
* Creates an {@link ApplicationContext} from the provided path.
*
*
* @see ApplicationContextFactory#createApplicationContext()
*/
@Override
public ConfigurableApplicationContext createApplicationContext() {
if (resource == null) {
@@ -172,10 +174,10 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
/**
* Extension point for special subclasses that want to do more complex things with the context prior to refresh. The
* default implementation does nothing.
*
*
* @param parent the parent for the new application context
* @param context the new application context before it is refreshed, but after bean factory is initialized
*
*
* @see AbstractApplicationContextFactory#setBeanFactoryPostProcessorClasses(Class[])
*/
protected void prepareContext(ConfigurableApplicationContext parent, ConfigurableApplicationContext context) {
@@ -185,10 +187,10 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo
* Extension point for special subclasses that want to do more complex things with the bean factory prior to
* refresh. The default implementation copies all configuration from the parent according to the
* {@link #setCopyConfiguration(boolean) flag} set.
*
*
* @param parent the parent bean factory for the new context (will never be null)
* @param beanFactory the new bean factory before bean definitions are loaded
*
*
* @see AbstractApplicationContextFactory#setCopyConfiguration(boolean)
* @see DefaultListableBeanFactory#copyConfigurationFrom(ConfigurableBeanFactory)
*/

View File

@@ -37,10 +37,10 @@ import org.springframework.util.Assert;
* Loads and unloads {@link Job Jobs} when the application context is created and destroyed. Each resource provided is
* loaded as an application context with the current context as its parent, and then all the jobs from the child context
* are registered under their bean names. A {@link JobRegistry} is required.
*
*
* @author Lucas Ward
* @author Dave Syer
*
*
* @since 2.1
*/
public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationListener, ApplicationContextAware,
@@ -61,18 +61,19 @@ public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationLis
/**
* The enclosing application context, which can be used to check if {@link ApplicationEvent events} come from the
* expected source.
*
*
* @param applicationContext the enclosing application context if there is one
* @see ApplicationContextAware#setApplicationContext(ApplicationContext)
*/
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
/**
* Add some factories to the set that will be used to load contexts and jobs.
*
* @param applicationContextFactories the {@link ApplicationContextFactory} values to use
*
* @param applicationContextFactory the {@link ApplicationContextFactory} values to use
*/
public void addApplicationContextFactory(ApplicationContextFactory applicationContextFactory) {
if (applicationContextFactory instanceof ApplicationContextAware) {
@@ -83,7 +84,7 @@ public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationLis
/**
* Add some factories to the set that will be used to load contexts and jobs.
*
*
* @param applicationContextFactories the {@link ApplicationContextFactory} values to use
*/
public void setApplicationContextFactories(ApplicationContextFactory[] applicationContextFactories) {
@@ -94,13 +95,14 @@ public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationLis
/**
* The job loader that will be used to load and manage jobs.
*
*
* @param jobLoader the {@link JobLoader} to set
*/
public void setJobLoader(JobLoader jobLoader) {
this.jobLoader = jobLoader;
}
@Override
public int getOrder() {
return order;
}
@@ -115,8 +117,8 @@ public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationLis
}
/**
* @throws Exception
*/
@Override
public void afterPropertiesSet() {
Assert.state(jobLoader != null, "A JobLoader must be provided");
@@ -126,9 +128,10 @@ public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationLis
/**
* Creates all the application contexts required and set up job registry entries with all the instances of
* {@link Job} found therein. Also closes the contexts when the enclosing context is closed.
*
*
* @see InitializingBean#afterPropertiesSet()
*/
@Override
public final void onApplicationEvent(ApplicationEvent event) {
// TODO: With Spring 3 a SmartLifecycle is started automatically
if (event.getSource() == applicationContext) {
@@ -143,9 +146,10 @@ public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationLis
/**
* Delegates to {@link JobLoader#clear()}.
*
*
* @see Lifecycle#stop()
*/
@Override
public void stop() {
synchronized (this.lifecycleMonitor) {
jobLoader.clear();
@@ -155,9 +159,10 @@ public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationLis
/**
* Take all the contexts from the factories provided and pass them to the {@link JobLoader}.
*
*
* @see Lifecycle#start()
*/
@Override
public void start() {
synchronized (this.lifecycleMonitor) {
if (running) {
@@ -177,10 +182,11 @@ public class AutomaticJobRegistrar implements Ordered, Lifecycle, ApplicationLis
/**
* Check if this component has been started.
*
*
* @return true if started successfully and not stopped
* @see Lifecycle#isRunning()
*/
@Override
public boolean isRunning() {
synchronized (this.lifecycleMonitor) {
return running;

View File

@@ -33,9 +33,9 @@ import org.springframework.core.io.Resource;
/**
* A convenient factory for creating a set of {@link ApplicationContextFactory}
* components from a set of {@link Resource resources}.
*
*
* @author Dave Syer
*
*
*/
public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean, ApplicationContextAware {
@@ -56,7 +56,7 @@ public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean,
* whose parent is the current context. In a configuration file the
* resources can be given as a pattern (e.g.
* <code>classpath*:/config/*-context.xml</code>).
*
*
* @param resources
*/
public void setResources(Resource[] resources) {
@@ -67,7 +67,7 @@ public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean,
* Flag to indicate that configuration such as bean post processors and
* custom editors should be copied from the parent context. Defaults to
* true.
*
*
* @param copyConfiguration the flag value to set
*/
public void setCopyConfiguration(boolean copyConfiguration) {
@@ -78,8 +78,8 @@ public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean,
* Determines which bean factory post processors (like property
* placeholders) should be copied from the parent context. Defaults to
* {@link PropertyPlaceholderConfigurer} and {@link CustomEditorConfigurer}.
*
* @param copyBeanFactoryPostProcessors the flag value to set
*
* @param beanFactoryPostProcessorClasses post processor types to be copied
*/
public void setBeanFactoryPostProcessorClasses(
@@ -93,7 +93,7 @@ public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean,
* processors that have a reference to the parent bean factory are not
* copied into the child). Note that these classes do not themselves have to
* be {@link BeanPostProcessor} implementations or sub-interfaces.
*
*
* @param beanPostProcessorExcludeClasses the classes to set
*/
public void setBeanPostProcessorExcludeClasses(Class<?>[] beanPostProcessorExcludeClasses) {
@@ -103,11 +103,12 @@ public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean,
/**
* Create an {@link ApplicationContextFactory} from each resource provided
* in {@link #setResources(Resource[])}.
*
*
* @return an array of {@link ApplicationContextFactory}
* @throws Exception
* @see org.springframework.beans.factory.FactoryBean#getObject()
*/
@Override
public Object getObject() throws Exception {
if (resources == null) {
@@ -133,10 +134,11 @@ public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean,
/**
* The type of object returned by this factory - an array of
* {@link ApplicationContextFactory}.
*
*
* @return array of {@link ApplicationContextFactory}
* @see FactoryBean#getObjectType()
*/
@Override
public Class<?> getObjectType() {
return ApplicationContextFactory[].class;
}
@@ -146,6 +148,7 @@ public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean,
* @return true
* @see FactoryBean#isSingleton()
*/
@Override
public boolean isSingleton() {
return true;
}
@@ -153,11 +156,12 @@ public class ClasspathXmlApplicationContextsFactoryBean implements FactoryBean,
/**
* An application context that can be used as a parent context for all the
* factories.
*
*
* @param applicationContext the {@link ApplicationContext} to set
* @throws BeansException
* @see ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
*/
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}