001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.wicket.jmx.wrapper; 018 019import org.apache.wicket.Application; 020import org.apache.wicket.jmx.DebugSettingsMBean; 021 022/** 023 * Exposes Application related functionality for JMX. 024 * 025 * @author eelcohillenius 026 */ 027public class DebugSettings implements DebugSettingsMBean 028{ 029 private final Application application; 030 031 /** 032 * Create. 033 * 034 * @param application 035 */ 036 public DebugSettings(final Application application) 037 { 038 this.application = application; 039 } 040 041 /** 042 * @see org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck() 043 */ 044 @Override 045 public boolean getComponentUseCheck() 046 { 047 return application.getDebugSettings().getComponentUseCheck(); 048 } 049 050 /** 051 * @see org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled() 052 */ 053 @Override 054 public boolean isAjaxDebugModeEnabled() 055 { 056 return application.getDebugSettings().isAjaxDebugModeEnabled(); 057 } 058 059 @Override 060 public void setAjaxDebugModeEnabled(final boolean enable) 061 { 062 application.getDebugSettings().setAjaxDebugModeEnabled(enable); 063 } 064 065 @Override 066 public void setComponentUseCheck(final boolean check) 067 { 068 application.getDebugSettings().setComponentUseCheck(check); 069 } 070 071 @Override 072 public void setComponentPathAttributeName(final String name) 073 { 074 application.getDebugSettings().setComponentPathAttributeName(name); 075 } 076 077 @Override 078 public String getComponentPathAttributeName() 079 { 080 return application.getDebugSettings().getComponentPathAttributeName(); 081 } 082 083 @Override 084 public void setOutputMarkupContainerClassName(final boolean enable) 085 { 086 application.getDebugSettings().setOutputMarkupContainerClassName(enable); 087 } 088 089 @Override 090 public boolean isOutputMarkupContainerClassName() 091 { 092 return application.getDebugSettings().isOutputMarkupContainerClassName(); 093 } 094 095 @Override 096 public boolean isLinePreciseReportingOnAddComponentEnabled() 097 { 098 return application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled(); 099 } 100 101 @Override 102 public void setLinePreciseReportingOnAddComponentEnabled(final boolean enable) 103 { 104 application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable); 105 } 106 107 @Override 108 public boolean isLinePreciseReportingOnNewComponentEnabled() 109 { 110 return application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled(); 111 } 112 113 @Override 114 public void setLinePreciseReportingOnNewComponentEnabled(final boolean enable) 115 { 116 application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable); 117 } 118 119 @Override 120 public void setDevelopmentUtilitiesEnabled(final boolean enable) 121 { 122 application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable); 123 } 124 125 @Override 126 public boolean isDevelopmentUtilitiesEnabled() 127 { 128 return application.getDebugSettings().isDevelopmentUtilitiesEnabled(); 129 } 130}