Fix typos
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,11 +17,12 @@
|
||||
package org.springframework.batch.core;
|
||||
|
||||
/**
|
||||
* Enumeration representing the status of a an Execution.
|
||||
* Enumeration representing the status of an Execution.
|
||||
*
|
||||
* @author Lucas Ward
|
||||
* @author Dave Syer
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
public enum BatchStatus {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,11 +19,12 @@ import org.springframework.batch.core.scope.context.ChunkContext;
|
||||
|
||||
/**
|
||||
* Listener interface for the lifecycle of a chunk. A chunk
|
||||
* can be through of as a collection of items that will be
|
||||
* can be thought of as a collection of items that will be
|
||||
* committed together.
|
||||
*
|
||||
* @author Lucas Ward
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
public interface ChunkListener extends StepListener {
|
||||
@@ -49,7 +50,7 @@ public interface ChunkListener extends StepListener {
|
||||
* after transaction rollback. While the rollback will have occurred,
|
||||
* transactional resources might still be active and accessible. Due to
|
||||
* this, data access code within this callback will still "participate" in
|
||||
* the original transaction unless it declares that it run in its own
|
||||
* the original transaction unless it declares that it runs in its own
|
||||
* transaction. Hence: <em> Use PROPAGATION_REQUIRES_NEW for any
|
||||
* transactional operation that is called from here.</em>
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,7 @@ import org.springframework.util.Assert;
|
||||
* JobInstance can be restarted multiple times in case of execution failure and
|
||||
* it's lifecycle ends with first successful execution.
|
||||
*
|
||||
* Trying to execute an existing JobIntance that has already completed
|
||||
* Trying to execute an existing JobInstance that has already completed
|
||||
* successfully will result in error. Error will be raised also for an attempt
|
||||
* to restart a failed JobInstance if the Job is not restartable.
|
||||
*
|
||||
@@ -36,6 +36,7 @@ import org.springframework.util.Assert;
|
||||
* @author Dave Syer
|
||||
* @author Robert Kasanicky
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,6 +40,7 @@ import org.springframework.util.Assert;
|
||||
* @author Lucas Ward
|
||||
* @author Michael Minella
|
||||
* @author Glenn Renfro
|
||||
* @author Mahmoud Ben Hassine
|
||||
* @since 1.0
|
||||
* @see JobParameters
|
||||
* @see JobParameter
|
||||
@@ -201,7 +202,7 @@ public class JobParametersBuilder {
|
||||
|
||||
/**
|
||||
* Conversion method that takes the current state of this builder and
|
||||
* returns it as a JobruntimeParameters object.
|
||||
* returns it as a JobParameters object.
|
||||
*
|
||||
* @return a valid {@link JobParameters} object.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,11 +16,12 @@
|
||||
package org.springframework.batch.core.configuration;
|
||||
|
||||
/**
|
||||
* Represents an error has occured in the configuration of base batch
|
||||
* Represents an error has occurred in the configuration of base batch
|
||||
* infrastructure (creation of a {@link org.springframework.batch.core.repository.JobRepository}
|
||||
* for example.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
* @since 2.2.6
|
||||
*/
|
||||
public class BatchConfigurationException extends RuntimeException {
|
||||
|
||||
@@ -70,7 +70,7 @@ public class DefaultJobParametersValidator implements JobParametersValidator, In
|
||||
@Override
|
||||
public void afterPropertiesSet() throws IllegalStateException {
|
||||
for (String key : requiredKeys) {
|
||||
Assert.state(!optionalKeys.contains(key), "Optional keys canot be required: " + key);
|
||||
Assert.state(!optionalKeys.contains(key), "Optional keys cannot be required: " + key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ItemProcessListenerAdapter<T,S> implements ItemProcessListener<T, S
|
||||
* @param delegate to be called within the batch lifecycle
|
||||
*/
|
||||
public ItemProcessListenerAdapter(javax.batch.api.chunk.listener.ItemProcessListener delegate) {
|
||||
Assert.notNull(delegate, "An ItemProcessListener is requred");
|
||||
Assert.notNull(delegate, "An ItemProcessListener is required");
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ import org.springframework.util.Assert;
|
||||
public class JsrJobParametersConverter implements JobParametersConverter, InitializingBean {
|
||||
|
||||
public static final String JOB_RUN_ID = "jsr_batch_run_id";
|
||||
public DataFieldMaxValueIncrementer incremeter;
|
||||
public DataFieldMaxValueIncrementer incrementer;
|
||||
public String tablePrefix = AbstractJdbcBatchMetadataDao.DEFAULT_TABLE_PREFIX;
|
||||
public DataSource dataSource;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class JsrJobParametersConverter implements JobParametersConverter, Initia
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
DataFieldMaxValueIncrementerFactory factory = new DefaultDataFieldMaxValueIncrementerFactory(dataSource);
|
||||
|
||||
this.incremeter = factory.getIncrementer(DatabaseType.fromMetaData(dataSource).name(), tablePrefix + "JOB_SEQ");
|
||||
this.incrementer = factory.getIncrementer(DatabaseType.fromMetaData(dataSource).name(), tablePrefix + "JOB_SEQ");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -102,7 +102,7 @@ public class JsrJobParametersConverter implements JobParametersConverter, Initia
|
||||
}
|
||||
|
||||
if(!runIdFound) {
|
||||
builder.addLong(JOB_RUN_ID, incremeter.nextLongValue());
|
||||
builder.addLong(JOB_RUN_ID, incrementer.nextLongValue());
|
||||
}
|
||||
|
||||
return builder.toJobParameters();
|
||||
@@ -127,7 +127,7 @@ public class JsrJobParametersConverter implements JobParametersConverter, Initia
|
||||
}
|
||||
|
||||
if(!runIdFound) {
|
||||
properties.setProperty(JOB_RUN_ID, String.valueOf(incremeter.nextLongValue()));
|
||||
properties.setProperty(JOB_RUN_ID, String.valueOf(incrementer.nextLongValue()));
|
||||
}
|
||||
|
||||
return properties;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -51,6 +51,7 @@ import org.w3c.dom.traversal.NodeIterator;
|
||||
* </p>
|
||||
*
|
||||
* @author Chris Schaefer
|
||||
* @author Mahmoud Ben Hassine
|
||||
* @since 3.0
|
||||
*/
|
||||
public class JsrBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocumentReader {
|
||||
@@ -64,7 +65,7 @@ public class JsrBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocume
|
||||
private static final String JOB_PARAMETERS_KEY_NAME = "jobParameters";
|
||||
private static final String JOB_PARAMETERS_BEAN_DEFINITION_NAME = "jsr_jobParameters";
|
||||
private static final Log LOG = LogFactory.getLog(JsrBeanDefinitionDocumentReader.class);
|
||||
private static final Pattern PROPERTY_KEY_SEPERATOR = Pattern.compile("'([^']*?)'");
|
||||
private static final Pattern PROPERTY_KEY_SEPARATOR = Pattern.compile("'([^']*?)'");
|
||||
private static final Pattern OPERATOR_PATTERN = Pattern.compile("(#\\{(job(Properties|Parameters))[^}]+\\})");
|
||||
|
||||
private BeanDefinitionRegistry beanDefinitionRegistry;
|
||||
@@ -114,9 +115,9 @@ public class JsrBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocume
|
||||
Properties jobParameters = new Properties();
|
||||
|
||||
if (getBeanDefinitionRegistry().containsBeanDefinition(JOB_PARAMETERS_BEAN_DEFINITION_NAME)) {
|
||||
BeanDefinition beanDefintion = getBeanDefinitionRegistry().getBeanDefinition(JOB_PARAMETERS_BEAN_DEFINITION_NAME);
|
||||
BeanDefinition beanDefinition = getBeanDefinitionRegistry().getBeanDefinition(JOB_PARAMETERS_BEAN_DEFINITION_NAME);
|
||||
|
||||
Properties properties = (Properties) beanDefintion.getConstructorArgumentValues()
|
||||
Properties properties = (Properties) beanDefinition.getConstructorArgumentValues()
|
||||
.getGenericArgumentValue(Properties.class)
|
||||
.getValue();
|
||||
|
||||
@@ -185,7 +186,7 @@ public class JsrBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocume
|
||||
Matcher jobParameterMatcher = OPERATOR_PATTERN.matcher(value);
|
||||
|
||||
while (jobParameterMatcher.find()) {
|
||||
Matcher jobParameterKeyMatcher = PROPERTY_KEY_SEPERATOR.matcher(jobParameterMatcher.group(1));
|
||||
Matcher jobParameterKeyMatcher = PROPERTY_KEY_SEPARATOR.matcher(jobParameterMatcher.group(1));
|
||||
|
||||
if (jobParameterKeyMatcher.find()) {
|
||||
String propertyType = jobParameterMatcher.group(2);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,6 +35,7 @@ import org.w3c.dom.Element;
|
||||
* Parser for the <partition> element as defined by JSR-352.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
* @since 3.0
|
||||
*/
|
||||
public class PartitionParser {
|
||||
@@ -63,7 +64,7 @@ public class PartitionParser {
|
||||
|
||||
/**
|
||||
* @param stepName the name of the step that is being partitioned
|
||||
* @param allowStartIfComplete boolean to establish the allowStartIfComplete property for parition properties.
|
||||
* @param allowStartIfComplete boolean to establish the allowStartIfComplete property for partition properties.
|
||||
*/
|
||||
public PartitionParser(String stepName, boolean allowStartIfComplete) {
|
||||
this.name = stepName;
|
||||
@@ -82,7 +83,7 @@ public class PartitionParser {
|
||||
properties.addPropertyValue("jobRepository", new RuntimeBeanReference("jobRepository"));
|
||||
properties.addPropertyValue("allowStartIfComplete", allowStartIfComplete);
|
||||
|
||||
paserMapperElement(element, parserContext, properties);
|
||||
parseMapperElement(element, parserContext, properties);
|
||||
parsePartitionPlan(element, parserContext, stepName, properties);
|
||||
parseAnalyzerElement(element, parserContext, properties);
|
||||
parseReducerElement(element, parserContext, factoryBeanProperties);
|
||||
@@ -136,7 +137,7 @@ public class PartitionParser {
|
||||
}
|
||||
}
|
||||
|
||||
private void paserMapperElement(Element element,
|
||||
private void parseMapperElement(Element element,
|
||||
ParserContext parserContext, MutablePropertyValues properties) {
|
||||
Element mapperElement = DomUtils.getChildElementByTagName(element, MAPPER_ELEMENT);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,6 +37,7 @@ import java.util.Collection;
|
||||
* @author Michael Minella
|
||||
* @author Glenn Renfro
|
||||
* @author Chris Schaefer
|
||||
* @author Mahmoud Ben Hassine
|
||||
* @since 3.0
|
||||
*/
|
||||
public class StepParser extends AbstractSingleBeanDefinitionParser {
|
||||
@@ -67,11 +68,11 @@ public class StepParser extends AbstractSingleBeanDefinitionParser {
|
||||
}
|
||||
|
||||
String allowStartIfComplete = element.getAttribute(ALLOW_START_IF_COMPLETE_ATTRIBUTE);
|
||||
boolean allowStartIfCompletValue = false;
|
||||
boolean allowStartIfCompleteValue = false;
|
||||
if(StringUtils.hasText(allowStartIfComplete)) {
|
||||
bd.getPropertyValues().addPropertyValue("allowStartIfComplete",
|
||||
allowStartIfComplete);
|
||||
allowStartIfCompletValue = Boolean.valueOf(allowStartIfComplete);
|
||||
allowStartIfCompleteValue = Boolean.valueOf(allowStartIfComplete);
|
||||
}
|
||||
|
||||
new ListenerParser(JsrStepListenerFactoryBean.class, "listeners").parseListeners(element, parserContext, bd, stepName);
|
||||
@@ -92,7 +93,7 @@ public class StepParser extends AbstractSingleBeanDefinitionParser {
|
||||
} else if(name.equals(CHUNK_ELEMENT)) {
|
||||
new ChunkParser().parse(nestedElement, bd, parserContext, stepName);
|
||||
} else if(name.equals(PARTITION_ELEMENT)) {
|
||||
new PartitionParser(stepName, allowStartIfCompletValue).parse(nestedElement, bd, parserContext, stepName);
|
||||
new PartitionParser(stepName, allowStartIfCompleteValue).parse(nestedElement, bd, parserContext, stepName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ import org.springframework.util.Assert;
|
||||
* the PartitionCollector will be placed.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
* @since 3.0
|
||||
*/
|
||||
public class PartitionCollectorAdapter implements ChunkListener {
|
||||
@@ -69,7 +70,7 @@ public class PartitionCollectorAdapter implements ChunkListener {
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e);
|
||||
throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e);
|
||||
} finally {
|
||||
if(lock.isHeldByCurrentThread()) {
|
||||
lock.unlock();
|
||||
@@ -89,7 +90,7 @@ public class PartitionCollectorAdapter implements ChunkListener {
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e);
|
||||
throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e);
|
||||
} finally {
|
||||
if(lock.isHeldByCurrentThread()) {
|
||||
lock.unlock();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,6 +32,7 @@ import org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate;
|
||||
* of a {@link TaskletStep}.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
* @since 3.0
|
||||
*/
|
||||
public class JsrBatchletStepBuilder extends TaskletStepBuilder {
|
||||
@@ -39,7 +40,7 @@ public class JsrBatchletStepBuilder extends TaskletStepBuilder {
|
||||
private BatchPropertyContext batchPropertyContext;
|
||||
|
||||
/**
|
||||
* @param context used to resolve lazy binded properties
|
||||
* @param context used to resolve lazy bound properties
|
||||
*/
|
||||
public void setBatchPropertyContext(BatchPropertyContext context) {
|
||||
this.batchPropertyContext = context;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2014 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -56,6 +56,7 @@ import org.springframework.util.Assert;
|
||||
* @author Dave Syer
|
||||
* @author Will Schipp
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
* @since 1.0
|
||||
*
|
||||
@@ -78,7 +79,9 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean {
|
||||
* @param job the job to be run.
|
||||
* @param jobParameters the {@link JobParameters} for this particular
|
||||
* execution.
|
||||
* @return JobExecutionAlreadyRunningException if the JobInstance already
|
||||
* @return the {@link JobExecution} if it returns synchronously. If the
|
||||
* implementation is asynchronous, the status might well be unknown.
|
||||
* @throws JobExecutionAlreadyRunningException if the JobInstance already
|
||||
* exists and has an execution already running.
|
||||
* @throws JobRestartException if the execution would be a re-start, but a
|
||||
* re-start is either not allowed or not needed.
|
||||
|
||||
@@ -231,11 +231,11 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
|
||||
|
||||
// Avoid concurrent modifications...
|
||||
if (count == 0) {
|
||||
int curentVersion = getJdbcTemplate().queryForObject(getQuery(CURRENT_VERSION_JOB_EXECUTION), Integer.class,
|
||||
int currentVersion = getJdbcTemplate().queryForObject(getQuery(CURRENT_VERSION_JOB_EXECUTION), Integer.class,
|
||||
new Object[] { jobExecution.getId() });
|
||||
throw new OptimisticLockingFailureException("Attempt to update job execution id="
|
||||
+ jobExecution.getId() + " with wrong version (" + jobExecution.getVersion()
|
||||
+ "), where current version is " + curentVersion);
|
||||
+ "), where current version is " + currentVersion);
|
||||
}
|
||||
|
||||
jobExecution.incrementVersion();
|
||||
|
||||
@@ -156,7 +156,7 @@ JobInstanceDao, InitializingBean {
|
||||
if (instances.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
Assert.state(instances.size() == 1, "instance counte must be 1 but was " + instances.size());
|
||||
Assert.state(instances.size() == 1, "instance count must be 1 but was " + instances.size());
|
||||
return instances.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
|
||||
|
||||
/**
|
||||
* Save a StepExecution. A unique id will be generated by the
|
||||
* stepExecutionIncrementor, and then set in the StepExecution. All values
|
||||
* stepExecutionIncrementer, and then set in the StepExecution. All values
|
||||
* will then be stored via an INSERT statement.
|
||||
*
|
||||
* @see StepExecutionDao#saveStepExecution(StepExecution)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2014 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ import org.springframework.util.SerializationUtils;
|
||||
* @author Robert Kasanicky
|
||||
* @author Dave Syer
|
||||
* @author David Turanski
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MapExecutionContextDao implements ExecutionContextDao {
|
||||
@@ -151,7 +152,7 @@ public class MapExecutionContextDao implements ExecutionContextDao {
|
||||
|
||||
@Override
|
||||
public void saveExecutionContexts(Collection<StepExecution> stepExecutions) {
|
||||
Assert.notNull(stepExecutions,"Attempt to save a nulk collection of step executions");
|
||||
Assert.notNull(stepExecutions,"Attempt to save a null collection of step executions");
|
||||
for (StepExecution stepExecution: stepExecutions) {
|
||||
saveExecutionContext(stepExecution);
|
||||
saveExecutionContext(stepExecution.getJobExecution());
|
||||
|
||||
@@ -97,7 +97,7 @@ public class MapJobExecutionDao implements JobExecutionDao {
|
||||
|
||||
synchronized (jobExecution) {
|
||||
if (!persistedExecution.getVersion().equals(jobExecution.getVersion())) {
|
||||
throw new OptimisticLockingFailureException("Attempt to update step execution id=" + id
|
||||
throw new OptimisticLockingFailureException("Attempt to update job execution id=" + id
|
||||
+ " with wrong version (" + jobExecution.getVersion() + "), where current version is "
|
||||
+ persistedExecution.getVersion());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2017 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,9 +39,10 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Thomas Risberg
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
* @since 2.0
|
||||
* @see ExecutionContextSerializer
|
||||
* @deprecated Due to the incompattabilities between current Jettison versions and XStream
|
||||
* @deprecated Due to the incompatibilities between current Jettison versions and XStream
|
||||
* versions, this serializer is deprecated in favor of
|
||||
* {@link Jackson2ExecutionContextStringSerializer}
|
||||
*/
|
||||
|
||||
@@ -79,7 +79,7 @@ StepBuilderHelper<AbstractTaskletStepBuilder<B>> {
|
||||
* Build the step from the components collected by the fluent setters. Delegates first to {@link #enhance(Step)} and
|
||||
* then to {@link #createTasklet()} in subclasses to create the actual tasklet.
|
||||
*
|
||||
* @return a tasklet step fully configured and read to execute
|
||||
* @return a tasklet step fully configured and ready to execute
|
||||
*/
|
||||
public TaskletStep build() {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2011 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,6 +31,7 @@ import org.springframework.core.task.TaskExecutor;
|
||||
* multiple times with different input parameters (in the form of execution context). Useful for parallelization.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
@@ -133,7 +134,7 @@ public class PartitionStepBuilder extends StepBuilderHelper<PartitionStepBuilder
|
||||
|
||||
/**
|
||||
* Provide an explicit {@link StepExecutionSplitter} instead of having one build from the
|
||||
* {@link #partitioner(String, Partitioner)}. USeful if you need more control over the splitting.
|
||||
* {@link #partitioner(String, Partitioner)}. Useful if you need more control over the splitting.
|
||||
*
|
||||
* @param splitter a step execution splitter
|
||||
* @return this for fluent chaining
|
||||
|
||||
@@ -63,6 +63,7 @@ import org.springframework.util.Assert;
|
||||
* @see FaultTolerantStepBuilder for a step that handles retry and skip of failed items
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
@@ -235,7 +236,7 @@ public class SimpleStepBuilder<I, O> extends AbstractTaskletStepBuilder<SimpleSt
|
||||
|
||||
/**
|
||||
* A {@link Function} to be delegated to as an {@link ItemProcessor}. If this is set,
|
||||
* it will take precidence over any {@code ItemProcessor} configured via
|
||||
* it will take precedence over any {@code ItemProcessor} configured via
|
||||
* {@link #processor(ItemProcessor)}.
|
||||
*
|
||||
* @param function the function to delegate item processing to
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<xsd:attribute name="restartable" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Whether the job should be retartable or not in case of failure. Set this to false
|
||||
Whether the job should be restartable or not in case of failure. Set this to false
|
||||
if the Job should not be restarted.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2014 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,6 +24,7 @@ import org.springframework.util.SerializationUtils;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
public class ExitStatusTests {
|
||||
@@ -223,7 +224,7 @@ public class ExitStatusTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnkownIsRunning() throws Exception {
|
||||
public void testUnknownIsRunning() throws Exception {
|
||||
assertTrue(ExitStatus.UNKNOWN.isRunning());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2013 the original author or authors.
|
||||
* Copyright 2008-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,6 +39,7 @@ import static org.mockito.Mockito.when;
|
||||
* @author Lucas Ward
|
||||
* @author Michael Minella
|
||||
* @author Glenn Renfro
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
public class JobParametersBuilderTests {
|
||||
@@ -171,7 +172,7 @@ public class JobParametersBuilderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPropreties() {
|
||||
public void testProperties() {
|
||||
Properties props = new Properties();
|
||||
props.setProperty("SCHEDULE_DATE", "A DATE");
|
||||
props.setProperty("LONG", "1");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2011 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,6 +42,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
public class JobBuilderConfigurationTests {
|
||||
@@ -176,7 +177,7 @@ public class JobBuilderConfigurationTests {
|
||||
private SimpleBatchConfiguration jobs;
|
||||
|
||||
@Bean
|
||||
public Job testConfigererJob() throws Exception {
|
||||
public Job testConfigurerJob() throws Exception {
|
||||
SimpleJobBuilder builder = jobs.jobBuilders().get("configurer").start(step1());
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -47,6 +47,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
public class JobScopeConfigurationTests {
|
||||
@@ -78,9 +79,9 @@ public class JobScopeConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testXmlJobScopeWithInheritence() throws Exception {
|
||||
public void testXmlJobScopeWithInheritance() throws Exception {
|
||||
context = new ClassPathXmlApplicationContext(
|
||||
"org/springframework/batch/core/configuration/annotation/JobScopeConfigurationTestsInheritence-context.xml");
|
||||
"org/springframework/batch/core/configuration/annotation/JobScopeConfigurationTestsInheritance-context.xml");
|
||||
JobSynchronizationManager.register(jobExecution);
|
||||
SimpleHolder value = (SimpleHolder) context.getBean("child");
|
||||
assertEquals("JOB", value.call());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,6 +45,7 @@ import static org.junit.Assert.assertEquals;
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Michael Minella
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
public class StepScopeConfigurationTests {
|
||||
@@ -76,9 +77,9 @@ public class StepScopeConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testXmlStepScopeWithInheritence() throws Exception {
|
||||
public void testXmlStepScopeWithInheritance() throws Exception {
|
||||
context = new ClassPathXmlApplicationContext(
|
||||
"org/springframework/batch/core/configuration/annotation/StepScopeConfigurationTestsInheritence-context.xml");
|
||||
"org/springframework/batch/core/configuration/annotation/StepScopeConfigurationTestsInheritance-context.xml");
|
||||
StepSynchronizationManager.register(stepExecution);
|
||||
SimpleHolder value = (SimpleHolder) context.getBean("child");
|
||||
assertEquals("STEP", value.call());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2014 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,6 +43,7 @@ import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
public class GenericApplicationContextFactoryTests {
|
||||
@@ -147,7 +148,7 @@ public class GenericApplicationContextFactoryTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEqualsMultileConfigs() throws Exception {
|
||||
public void testEqualsMultipleConfigs() throws Exception {
|
||||
Resource resource1 = new ClassPathResource(ClassUtils.addResourcePathToPackagePath(getClass(),
|
||||
"abstract-context.xml"));
|
||||
Resource resource2 = new ClassPathResource(ClassUtils.addResourcePathToPackagePath(getClass(),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,6 +53,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Josh Long
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@@ -205,7 +206,7 @@ public class PartitionStepParserTests implements ApplicationContextAware {
|
||||
}
|
||||
}
|
||||
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
|
||||
// Step names not saved by this one (it geosn't have that tasklet)
|
||||
// Step names not saved by this one (it doesn't have that tasklet)
|
||||
assertEquals("[]", savedStepNames.toString());
|
||||
List<String> stepNames = getStepNames(jobExecution);
|
||||
assertEquals(7, stepNames.size());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,7 +58,7 @@ public class JsrJobContextFactoryBeanTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIntialCreationSingleThread() throws Exception {
|
||||
public void testInitialCreationSingleThread() throws Exception {
|
||||
factoryBean.setJobExecution(new JobExecution(5L));
|
||||
factoryBean.setBatchPropertyContext(propertyContext);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,7 +36,7 @@ public class ThreadLocalClassloaderBeanPostProcessorTestsBatchlet implements Bat
|
||||
|
||||
@Override
|
||||
public String process() throws Exception {
|
||||
Assert.isTrue("someParameter".equals(jobParam1), jobParam1 + " does not equal someParamter");
|
||||
Assert.isTrue("someParameter".equals(jobParam1), jobParam1 + " does not equal someParameter");
|
||||
Assert.isTrue("threadLocalClassloaderBeanPostProcessorTestsJob".equals(jobContext.getJobName()),
|
||||
"jobName does not equal threadLocalClassloaderBeanPostProcessorTestsJob");
|
||||
Assert.isTrue("step1".equals(stepContext.getStepName()), "stepName does not equal step1");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@ public class SimpleJvmExitCodeMapperTests extends TestCase {
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public void testGetExitCodeWithpPredefinedCodes() {
|
||||
public void testGetExitCodeWithPredefinedCodes() {
|
||||
assertEquals(
|
||||
ecm.intValue(ExitStatus.COMPLETED.getExitCode()),
|
||||
ExitCodeMapper.JVM_EXITCODE_COMPLETED);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,7 @@ import static org.junit.Assert.assertEquals;
|
||||
/**
|
||||
* @author mminella
|
||||
*/
|
||||
public class InteralBeanStepScopeIntegrationTests {
|
||||
public class InternalBeanStepScopeIntegrationTests {
|
||||
|
||||
@Test
|
||||
public void testCommitIntervalJobParameter() throws Exception {
|
||||
Reference in New Issue
Block a user