01: /*
02: * ==============================================================================
03: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
04: * use this file except in compliance with the License. You may obtain a copy of
05: * the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12: * License for the specific language governing permissions and limitations under
13: * the License.
14: */
15: package wicket.jmx;
16:
17: import wicket.util.lang.Classes;
18:
19: /**
20: * Exposes Application related functionality for JMX.
21: *
22: * @author eelcohillenius
23: */
24: public class ApplicationSettings implements ApplicationSettingsMBean {
25: private final wicket.Application application;
26:
27: /**
28: * Create.
29: *
30: * @param application
31: */
32: public ApplicationSettings(wicket.Application application) {
33: this .application = application;
34: }
35:
36: /**
37: * @see wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
38: */
39: public String getAccessDeniedPage() {
40: return Classes.name(application.getApplicationSettings()
41: .getAccessDeniedPage());
42: }
43:
44: /**
45: * @see wicket.jmx.ApplicationSettingsMBean#getClassResolver()
46: */
47: public String getClassResolver() {
48: return Stringz.className(application.getApplicationSettings()
49: .getClassResolver());
50: }
51:
52: /**
53: * @see wicket.jmx.ApplicationSettingsMBean#getContextPath()
54: */
55: public String getContextPath() {
56: return application.getApplicationSettings().getContextPath();
57: }
58:
59: /**
60: * @see wicket.jmx.ApplicationSettingsMBean#getConverterFactory()
61: */
62: public String getConverterFactory() {
63: return Stringz.className(application.getApplicationSettings()
64: .getConverterFactory());
65: }
66:
67: /**
68: * @see wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
69: */
70: public String getInternalErrorPage() {
71: return Classes.name(application.getApplicationSettings()
72: .getInternalErrorPage());
73: }
74:
75: /**
76: * @see wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
77: */
78: public String getPageExpiredErrorPage() {
79: return Classes.name(application.getApplicationSettings()
80: .getPageExpiredErrorPage());
81: }
82:
83: /**
84: * @see wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
85: */
86: @SuppressWarnings("deprecation")
87: public String getUnexpectedExceptionDisplay() {
88: return application.getExceptionSettings()
89: .getUnexpectedExceptionDisplay().toString();
90: }
91: }
|