01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19: package org.apache.beehive.netui.pageflow;
20:
21: /**
22: * Base type for errors related to output forms on Forwards.
23: *
24: * @see Forward#addOutputForm
25: */
26: public abstract class IllegalOutputFormException extends
27: PageFlowException {
28: private String _forwardName;
29: private String _outputFormType;
30:
31: /**
32: * @param forwardName the name of the relevant {@link Forward}.
33: * @param actionName the name of the current action being run.
34: * @param flowController the current {@link FlowController} instance.
35: * @param outputFormType the type name of the relevant output form.
36: */
37: public IllegalOutputFormException(String forwardName,
38: String actionName, FlowController flowController,
39: String outputFormType) {
40: super (actionName, flowController);
41: _forwardName = forwardName;
42: _outputFormType = outputFormType;
43: }
44:
45: /**
46: * Get the name of the relevant {@link Forward}.
47: *
48: * @return a String that is the name of the relevant {@link Forward}.
49: */
50: public String getForwardName() {
51: return _forwardName;
52: }
53:
54: /**
55: * Set the name of the relevant {@link Forward}.
56: *
57: * @param forwardName a String that is the name of the relevant {@link Forward}.
58: */
59: public void setForwardName(String forwardName) {
60: _forwardName = forwardName;
61: }
62:
63: /**
64: * Get the type name of the relevant output form.
65: *
66: * @return a String that is the type name of the relevant output form.
67: */
68: public String getOutputFormType() {
69: return _outputFormType;
70: }
71:
72: /**
73: * Set the type name of the relevant output form.
74: *
75: * @param outputFormType a String that is the type name of the relevant output form.
76: */
77: public void setOutputFormType(String outputFormType) {
78: _outputFormType = outputFormType;
79: }
80:
81: /**
82: * Tell whether the root cause may be session expiration in cases where the requested session ID is different than
83: * the actual session ID. In this case, the answer is <code>false</code>.
84: */
85: public boolean causeMayBeSessionExpiration() {
86: return false;
87: }
88: }
|