KickJava   Java API By Example, From Geeks To Geeks.

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


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 the
23  * <code>navigateTo={@link org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo#previousAction previousAction}</code>
24  * attribute is used on a {@link org.apache.beehive.netui.pageflow.annotations.Jpf.Forward &#64;Jpf.Forward}, a
25  * {@link org.apache.beehive.netui.pageflow.annotations.Jpf.SimpleAction &#64;Jpf.SimpleAction}, or a
26  * {@link org.apache.beehive.netui.pageflow.annotations.Jpf.ConditionalForward &#64;Jpf.ConditionalForward},
27  * but the previous action was the same as the current action (an infinite loop).
28  */

29 public class InfiniteReturnToActionException extends PageFlowException
30 {
31     public InfiniteReturnToActionException( String JavaDoc actionName, FlowController fc )
32     {
33         super( actionName, fc );
34     }
35
36     protected Object JavaDoc[] getMessageArgs()
37     {
38         return new Object JavaDoc[]{ getActionName(), getFlowControllerURI() };
39     }
40
41     protected String JavaDoc[] getMessageParts()
42     {
43         return new String JavaDoc[]
44         {
45             "Infinite loop of returnTo=\"action\" for action ",
46             " in Page Flow ",
47             "."
48         };
49     }
50
51     /**
52      * Tell whether the root cause may be session expiration in cases where the requested session ID is different than
53      * the actual session ID. In this case, the answer is <code>false</code>.
54      */

55     public boolean causeMayBeSessionExpiration()
56     {
57         return false;
58     }
59 }
60
Popular Tags