01: /*
02: * Copyright 2004-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.definition.registry;
17:
18: import org.springframework.webflow.core.FlowException;
19:
20: /**
21: * Thrown when a flow definition was found during a lookup operation
22: * but could not be constructed.
23: *
24: * @author Keith Donald
25: * @author Erwin Vervaet
26: */
27: public abstract class FlowDefinitionConstructionException extends
28: FlowException {
29:
30: /**
31: * The id of the flow that could not be constructed.
32: */
33: private String flowId;
34:
35: /**
36: * Creates an exception indicating a flow definition could not be constructed.
37: * @param flowId the flow id
38: * @param cause underlying cause of the exception
39: */
40: public FlowDefinitionConstructionException(String flowId,
41: Throwable cause) {
42: super ("An exception occured constructing the flow with id '"
43: + flowId + "'", cause);
44: this .flowId = flowId;
45: }
46:
47: /**
48: * Returns the id of the flow definition that could not be constructed.
49: * @return the flow id
50: */
51: public String getFlowId() {
52: return flowId;
53: }
54: }
|