KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > pageflow > MissingActionOutputException


1 /*
2  * Copyright 2004 The Apache Software Foundation.
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  * $Header:$
17  */

18 package org.apache.beehive.netui.pageflow;
19
20
21 /**
22  * Exception that occurs when a required action output is missing from a {@link Forward}.
23  */

24 public class MissingActionOutputException
25         extends PageFlowException
26 {
27     private String JavaDoc _actionOutputName;
28     private String JavaDoc _forwardName;
29
30     public MissingActionOutputException( String JavaDoc actionName, FlowController flowController, String JavaDoc actionOutputName,
31                                          String JavaDoc forwardName )
32     {
33         super( actionName, flowController );
34         _actionOutputName = actionOutputName;
35         _forwardName = forwardName;
36     }
37
38     protected Object JavaDoc[] getMessageArgs()
39     {
40         return new Object JavaDoc[]{ _actionOutputName, _forwardName, getActionName(), getFlowControllerURI() };
41     }
42
43     protected String JavaDoc[] getMessageParts()
44     {
45         return new String JavaDoc[]{ "The required action output \"", "\" was not present on forward \"",
46                              "\" (action ", " in Page Flow ", ")." };
47     }
48
49     public String JavaDoc getActionOutputName()
50     {
51         return _actionOutputName;
52     }
53
54     public String JavaDoc getForwardName()
55     {
56         return _forwardName;
57     }
58
59     /**
60      * Tell whether the root cause may be session expiration in cases where the requested session ID is different than
61      * the actual session ID. In this case, the answer is <code>false</code>.
62      */

63     public boolean causeMayBeSessionExpiration()
64     {
65         return false;
66     }
67 }
68
Popular Tags