KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > webflow > engine > NoMatchingTransitionException


1 /*
2  * Copyright 2002-2006 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 package org.springframework.webflow.engine;
17
18 import org.springframework.webflow.execution.Event;
19 import org.springframework.webflow.execution.FlowExecutionException;
20
21 /**
22  * Thrown when no transition can be matched given the occurence of an event in
23  * the context of a flow execution request.
24  * <p>
25  * Typically this happens because there is no "handler" transition for the last
26  * event that occured.
27  *
28  * @author Keith Donald
29  * @author Erwin Vervaet
30  */

31 public class NoMatchingTransitionException extends FlowExecutionException {
32
33     /**
34      * The event that occured that could not be matched to a Transition.
35      */

36     private Event event;
37
38     /**
39      * Create a new no matching transition exception.
40      * @param flowId the current flow
41      * @param stateId the state that could not be transitioned out of
42      * @param event the event that occured that could not be matched to a
43      * transition
44      * @param message the message
45      */

46     public NoMatchingTransitionException(String JavaDoc flowId, String JavaDoc stateId, Event event, String JavaDoc message) {
47         super(flowId, stateId, message);
48         this.event = event;
49     }
50
51     /**
52      * Create a new no matching transition exception.
53      * @param flowId the current flow
54      * @param stateId the state that could not be transitioned out of
55      * @param event the event that occured that could not be matched to a
56      * transition
57      * @param message the message
58      * @param cause the underlying cause
59      */

60     public NoMatchingTransitionException(String JavaDoc flowId, String JavaDoc stateId, Event event, String JavaDoc message, Throwable JavaDoc cause) {
61         super(flowId, stateId, message, cause);
62         this.event = event;
63     }
64
65     /**
66      * Returns the event for the current request that did not trigger any
67      * supported transition.
68      */

69     public Event getEvent() {
70         return event;
71     }
72 }
Popular Tags