EMMA Coverage Report (generated Thu May 22 12:08:10 CDT 2014)
[all classes][org.springframework.batch.core.job.flow.support.state]

COVERAGE SUMMARY FOR SOURCE FILE [DecisionState.java]

nameclass, %method, %block, %line, %
DecisionState.java100% (1/1)100% (3/3)100% (17/17)100% (5/5)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DecisionState100% (1/1)100% (3/3)100% (17/17)100% (5/5)
DecisionState (JobExecutionDecider, String): void 100% (1/1)100% (7/7)100% (3/3)
handle (FlowExecutor): FlowExecutionStatus 100% (1/1)100% (8/8)100% (1/1)
isEndState (): boolean 100% (1/1)100% (2/2)100% (1/1)

1/*
2 * Copyright 2006-2013 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 */
16 
17package org.springframework.batch.core.job.flow.support.state;
18 
19import org.springframework.batch.core.job.flow.FlowExecutionStatus;
20import org.springframework.batch.core.job.flow.FlowExecutor;
21import org.springframework.batch.core.job.flow.JobExecutionDecider;
22 
23/**
24 * State that requires a decider to make the status decision.
25 *
26 * @author Dave Syer
27 * @since 2.0
28 */
29public class DecisionState extends AbstractState {
30 
31        private final JobExecutionDecider decider;
32 
33        /**
34         * @param name
35         */
36        public DecisionState(JobExecutionDecider decider, String name) {
37                super(name);
38                this.decider = decider;
39        }
40 
41        @Override
42        public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {
43                return decider.decide(executor.getJobExecution(), executor.getStepExecution());
44        }
45 
46        /* (non-Javadoc)
47         * @see org.springframework.batch.core.job.flow.State#isEndState()
48         */
49        @Override
50        public boolean isEndState() {
51                return false;
52        }
53 
54}

[all classes][org.springframework.batch.core.job.flow.support.state]
EMMA 2.0.5312 (C) Vladimir Roubtsov