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.config;
20:
21: import org.apache.struts.config.ExceptionConfig;
22: import org.apache.beehive.netui.pageflow.internal.PageFlowExceptionHandler;
23:
24: /**
25: * Class to handle our extensions to the Struts <exception> element.
26: */
27: public class PageFlowExceptionConfig extends ExceptionConfig {
28: private boolean _isHandlerMethod;
29: private String _defaultMessage;
30: private boolean _isPathContextRelative;
31: private boolean _readonly;
32:
33: private static final String DEFAULT_HANDLER_CLASS = PageFlowExceptionHandler.class
34: .getName();
35:
36: public PageFlowExceptionConfig() {
37: // Our default handler is PageFlowExceptionHandler
38: super .setHandler(DEFAULT_HANDLER_CLASS);
39: }
40:
41: public boolean isHandlerMethod() {
42: return _isHandlerMethod;
43: }
44:
45: public void setIsHandlerMethod(boolean handlerMethod) {
46: _isHandlerMethod = handlerMethod;
47: }
48:
49: public String getDefaultMessage() {
50: return _defaultMessage;
51: }
52:
53: public void setDefaultMessage(String defaultMessage) {
54: _defaultMessage = defaultMessage;
55: }
56:
57: public boolean isPathContextRelative() {
58: return _isPathContextRelative;
59: }
60:
61: public void setIsPathContextRelative(boolean pathContextRelative) {
62: _isPathContextRelative = pathContextRelative;
63: }
64:
65: public boolean isReadonly() {
66: return _readonly;
67: }
68:
69: public void setReadonly(boolean readonly) {
70: _readonly = readonly;
71: }
72:
73: /**
74: * Get a prefix directory path that all Forward local paths should be relative to. By default this is
75: * <code>null</code>, which means that there is no forced prefix path.
76: */
77: public String getLocalPathsRelativeTo() {
78: return null;
79: }
80: }
|