KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > webflow > definition > registry > NoSuchFlowDefinitionException


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.definition.registry;
17
18 import org.springframework.core.style.StylerUtils;
19 import org.springframework.webflow.core.FlowException;
20
21 /**
22  * Thrown when no flow definition was found during a lookup operation by a flow
23  * locator.
24  *
25  * @author Keith Donald
26  * @author Erwin Vervaet
27  */

28 public class NoSuchFlowDefinitionException extends FlowException {
29
30     /**
31      * The id of the flow definition that could not be located.
32      */

33     private String JavaDoc flowId;
34
35     /**
36      * Creates an exception indicating a flow definition could not be found.
37      * @param flowId the flow id
38      * @param availableFlowIds all flow ids available to the locator generating
39      * this exception
40      */

41     public NoSuchFlowDefinitionException(String JavaDoc flowId, String JavaDoc[] availableFlowIds) {
42         super("No such flow definition with id '" + flowId + "' found; the flows available are: "
43                 + StylerUtils.style(availableFlowIds));
44         this.flowId = flowId;
45     }
46
47     /**
48      * Returns the id of the flow definition that could not be found.
49      */

50     public String JavaDoc getFlowId() {
51         return flowId;
52     }
53 }
Popular Tags