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; 018 019import java.io.UnsupportedEncodingException; 020 021import org.apache.wicket.jmx.wrapper.MarkupSettings; 022 023/** 024 * Markup settings. 025 * 026 * @author eelcohillenius 027 */ 028public interface MarkupSettingsMBean 029{ 030 /** 031 * If true, automatic link resolution is enabled. Disabled by default. 032 * 033 * @see org.apache.wicket.markup.resolver.AutoLinkResolver 034 * @see org.apache.wicket.markup.parser.filter.WicketLinkTagHandler 035 * @return Returns the automaticLinking. 036 */ 037 boolean getAutomaticLinking(); 038 039 /** 040 * @return Returns the compressWhitespace. 041 * @see MarkupSettings#setCompressWhitespace(boolean) 042 */ 043 boolean getCompressWhitespace(); 044 045 /** 046 * @since 1.1 047 * @return Returns default encoding of markup files. If null, the operating system provided 048 * encoding will be used. 049 */ 050 String getDefaultMarkupEncoding(); 051 052 /** 053 * @return Returns the stripComments. 054 * @see MarkupSettings#setStripComments(boolean) 055 */ 056 boolean getStripComments(); 057 058 /** 059 * Gets whether to remove wicket tags from the output. 060 * 061 * @return whether to remove wicket tags from the output 062 */ 063 boolean getStripWicketTags(); 064 065 /** 066 * Application default for automatic link resolution. Please 067 * 068 * @see org.apache.wicket.markup.resolver.AutoLinkResolver and 069 * @see org.apache.wicket.markup.parser.filter.WicketLinkTagHandler for more details. 070 * 071 * @param automaticLinking 072 * The automaticLinking to set. 073 */ 074 void setAutomaticLinking(boolean automaticLinking); 075 076 /** 077 * Turns on whitespace compression. Multiple occurrences of space/tab characters will be 078 * compressed to a single space. Multiple line breaks newline/carriage-return will also be 079 * compressed to a single newline. 080 * <p> 081 * Compression is currently not HTML aware and so it may be possible for whitespace compression 082 * to break pages. For this reason, whitespace compression is off by default and you should test 083 * your application throroughly after turning whitespace compression on. 084 * <p> 085 * Spaces are removed from markup at markup load time and there should be no effect on page 086 * rendering speed. In fact, your pages should render faster with whitespace compression 087 * enabled. 088 * 089 * @param compressWhitespace 090 * The compressWhitespace to set. 091 */ 092 void setCompressWhitespace(final boolean compressWhitespace); 093 094 /** 095 * Set default encoding for markup files. If null, the encoding provided by the operating system 096 * will be used. 097 * 098 * @param encoding 099 * @throws UnsupportedEncodingException 100 * if encoding is not supported 101 */ 102 void setDefaultMarkupEncoding(final String encoding) throws UnsupportedEncodingException; 103 104 /** 105 * Enables stripping of markup comments denoted in markup by HTML comment tagging. 106 * 107 * @param stripComments 108 * True to strip markup comments from rendered pages 109 */ 110 void setStripComments(boolean stripComments); 111 112 /** 113 * Sets whether to remove wicket tags from the output. 114 * 115 * @param stripWicketTags 116 * whether to remove wicket tags from the output 117 */ 118 void setStripWicketTags(boolean stripWicketTags); 119}