EMMA Coverage Report (generated Fri Jan 30 13:20:29 EST 2009)
[all classes][org.springframework.batch.core.step.item]

COVERAGE SUMMARY FOR SOURCE FILE [RepeatOperationsStepFactoryBean.java]

nameclass, %method, %block, %line, %
RepeatOperationsStepFactoryBean.java100% (1/1)75%  (3/4)89%  (34/38)83%  (10/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RepeatOperationsStepFactoryBean100% (1/1)75%  (3/4)89%  (34/38)83%  (10/12)
setChunkOperations (RepeatOperations): void 0%   (0/1)0%   (0/4)0%   (0/2)
RepeatOperationsStepFactoryBean (): void 100% (1/1)100% (13/13)100% (3/3)
applyConfiguration (ItemOrientedStep): void 100% (1/1)100% (17/17)100% (5/5)
setStepOperations (RepeatOperations): void 100% (1/1)100% (4/4)100% (2/2)

1/*
2 * Copyright 2006-2007 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.springframework.batch.core.step.item;
17 
18import org.springframework.batch.core.Step;
19import org.springframework.batch.repeat.RepeatOperations;
20import org.springframework.batch.repeat.support.RepeatTemplate;
21 
22/**
23 * Factory bean for {@link Step} implementations allowing registration of
24 * listeners and also direct injection of the {@link RepeatOperations} needed at
25 * step and chunk level.
26 * 
27 * @author Dave Syer
28 * 
29 */
30public class RepeatOperationsStepFactoryBean extends AbstractStepFactoryBean {
31 
32        private RepeatOperations chunkOperations = new RepeatTemplate();
33 
34        private RepeatOperations stepOperations = new RepeatTemplate();
35 
36        /**
37         * The {@link RepeatOperations} to use for the outer loop of the batch
38         * processing. Should be set up by the caller through a factory. Defaults to
39         * a plain {@link RepeatTemplate}.
40         * 
41         * @param stepOperations a {@link RepeatOperations} instance.
42         */
43        public void setStepOperations(RepeatOperations stepOperations) {
44                this.stepOperations = stepOperations;
45        }
46 
47        /**
48         * The {@link RepeatOperations} to use for the inner loop of the batch
49         * processing. should be set up by the caller through a factory. defaults to
50         * a plain {@link RepeatTemplate}.
51         * 
52         * @param chunkOperations a {@link RepeatOperations} instance.
53         */
54        public void setChunkOperations(RepeatOperations chunkOperations) {
55                this.chunkOperations = chunkOperations;
56        }
57 
58        /**
59         * @param step
60         * 
61         */
62        protected void applyConfiguration(ItemOrientedStep step) {
63 
64                super.applyConfiguration(step);
65 
66                RepeatOperations chunkOperations = BatchListenerFactoryHelper.addChunkListeners(this.chunkOperations, getListeners());
67                
68                step.setChunkOperations(chunkOperations);
69                step.setStepOperations(stepOperations);
70 
71        }
72 
73}

[all classes][org.springframework.batch.core.step.item]
EMMA 2.0.5312 (C) Vladimir Roubtsov