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.execution.repository;
17:
18: /**
19: * Base class for exceptions that indicate a flow execution could not be
20: * accessed within a repository.
21: *
22: * @author Keith Donald
23: * @author Erwin Vervaet
24: */
25: public abstract class FlowExecutionAccessException extends
26: FlowExecutionRepositoryException {
27:
28: /**
29: * The key of the execution that could not be accessed.
30: */
31: private FlowExecutionKey flowExecutionKey;
32:
33: /**
34: * Creates a new flow execution access exception.
35: * @param flowExecutionKey the key of the execution that could not be
36: * accessed
37: * @param message a descriptive message
38: */
39: public FlowExecutionAccessException(
40: FlowExecutionKey flowExecutionKey, String message) {
41: this (flowExecutionKey, message, null);
42: }
43:
44: /**
45: * Creates a new flow execution access exception.
46: * @param flowExecutionKey the key of the execution that could not be
47: * accessed
48: * @param message a descriptive message
49: * @param cause the root cause of the access failure
50: */
51: public FlowExecutionAccessException(
52: FlowExecutionKey flowExecutionKey, String message,
53: Exception cause) {
54: super (message, cause);
55: this .flowExecutionKey = flowExecutionKey;
56: }
57:
58: /**
59: * Returns key of the flow execution that could not be accessed.
60: */
61: public FlowExecutionKey getFlowExecutionKey() {
62: return flowExecutionKey;
63: }
64: }
|