KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > pageflow > config > PageFlowExceptionConfig


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.config;
19
20 import org.apache.struts.config.ExceptionConfig;
21 import org.apache.beehive.netui.pageflow.internal.PageFlowExceptionHandler;
22
23
24 /**
25  * Class to handle our extensions to the Struts <exception> element.
26  */

27 public class PageFlowExceptionConfig extends ExceptionConfig
28 {
29     private boolean _isHandlerMethod;
30     private String JavaDoc _defaultMessage;
31     private boolean _isPathContextRelative;
32     private boolean _readonly;
33     
34     private static final String JavaDoc DEFAULT_HANDLER_CLASS = PageFlowExceptionHandler.class.getName();
35     
36
37     public PageFlowExceptionConfig()
38     {
39         // Our default handler is PageFlowExceptionHandler
40
super.setHandler( DEFAULT_HANDLER_CLASS );
41     }
42     
43     public boolean isHandlerMethod()
44     {
45         return _isHandlerMethod;
46     }
47
48     public void setIsHandlerMethod( boolean handlerMethod )
49     {
50         _isHandlerMethod = handlerMethod;
51     }
52
53     public String JavaDoc getDefaultMessage()
54     {
55         return _defaultMessage;
56     }
57
58     public void setDefaultMessage( String JavaDoc defaultMessage )
59     {
60         _defaultMessage = defaultMessage;
61     }
62
63     public boolean isPathContextRelative()
64     {
65         return _isPathContextRelative;
66     }
67
68     public void setIsPathContextRelative( boolean pathContextRelative )
69     {
70         _isPathContextRelative = pathContextRelative;
71     }
72
73     public boolean isReadonly()
74     {
75         return _readonly;
76     }
77
78     public void setReadonly( boolean readonly )
79     {
80         _readonly = readonly;
81     }
82 }
83
Popular Tags