org.apache.wicket.settings.def
Class MarkupSettings

java.lang.Object
  extended by org.apache.wicket.settings.def.MarkupSettings
All Implemented Interfaces:
IMarkupSettings

public class MarkupSettings
extends java.lang.Object
implements IMarkupSettings

Author:
Jonathan Locke, Chris Turner, Eelco Hillenius, Juergen Donnerstag, Johan Compagner, Igor Vaynberg (ivaynberg), Martijn Dashorst, James Carman

Constructor Summary
MarkupSettings()
          Construct
 
Method Summary
 boolean getAutomaticLinking()
          If true, automatic link resolution is enabled.
 boolean getCompressWhitespace()
           
 java.lang.String getDefaultAfterDisabledLink()
           
 java.lang.String getDefaultBeforeDisabledLink()
           
 java.lang.String getDefaultMarkupEncoding()
           
 MarkupFactory getMarkupFactory()
          Get the markup factory
 boolean getStripComments()
           
 boolean getStripWicketTags()
          Gets whether to remove wicket tags from the output.
 boolean getThrowExceptionOnMissingXmlDeclaration()
           
 void setAutomaticLinking(boolean automaticLinking)
          Application default for automatic link resolution.
 void setCompressWhitespace(boolean compressWhitespace)
          Turns on whitespace compression.
 void setDefaultAfterDisabledLink(java.lang.String defaultAfterDisabledLink)
           
 void setDefaultBeforeDisabledLink(java.lang.String defaultBeforeDisabledLink)
           
 void setDefaultMarkupEncoding(java.lang.String encoding)
          Set default encoding for markup files.
 void setMarkupFactory(MarkupFactory factory)
          Set a new markup factory
 void setStripComments(boolean stripComments)
          Enables stripping of markup comments denoted in markup by HTML comment tagging.
 void setStripWicketTags(boolean stripWicketTags)
          Sets whether to remove wicket tags from the output.
 void setThrowExceptionOnMissingXmlDeclaration(boolean throwException)
          If true, an exception is thrown if the markup file does not contain a xml declaration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkupSettings

public MarkupSettings()
Construct

Method Detail

getAutomaticLinking

public boolean getAutomaticLinking()
Description copied from interface: IMarkupSettings
If true, automatic link resolution is enabled. Disabled by default.

Specified by:
getAutomaticLinking in interface IMarkupSettings
Returns:
Returns the automaticLinking.
See Also:
IMarkupSettings.getAutomaticLinking()

getCompressWhitespace

public boolean getCompressWhitespace()
Specified by:
getCompressWhitespace in interface IMarkupSettings
Returns:
Returns the compressWhitespace.
See Also:
IMarkupSettings.getCompressWhitespace()

getDefaultAfterDisabledLink

public java.lang.String getDefaultAfterDisabledLink()
Specified by:
getDefaultAfterDisabledLink in interface IMarkupSettings
Returns:
Returns the defaultAfterDisabledLink.
See Also:
IMarkupSettings.getDefaultAfterDisabledLink()

getDefaultBeforeDisabledLink

public java.lang.String getDefaultBeforeDisabledLink()
Specified by:
getDefaultBeforeDisabledLink in interface IMarkupSettings
Returns:
Returns the defaultBeforeDisabledLink.
See Also:
IMarkupSettings.getDefaultBeforeDisabledLink()

getDefaultMarkupEncoding

public java.lang.String getDefaultMarkupEncoding()
Specified by:
getDefaultMarkupEncoding in interface IMarkupSettings
Returns:
Returns default encoding of markup files. If null, the operating system provided encoding will be used.
See Also:
IMarkupSettings.getDefaultMarkupEncoding()

getMarkupFactory

public MarkupFactory getMarkupFactory()
Description copied from interface: IMarkupSettings
Get the markup factory

Specified by:
getMarkupFactory in interface IMarkupSettings
Returns:
A new instance of MarkupFactory.
See Also:
IMarkupSettings.getMarkupFactory()

getStripComments

public boolean getStripComments()
Specified by:
getStripComments in interface IMarkupSettings
Returns:
Returns the stripComments.
See Also:
IMarkupSettings.getStripComments()

getStripWicketTags

public boolean getStripWicketTags()
Description copied from interface: IMarkupSettings
Gets whether to remove wicket tags from the output.

Specified by:
getStripWicketTags in interface IMarkupSettings
Returns:
whether to remove wicket tags from the output
See Also:
IMarkupSettings.getStripWicketTags()

getThrowExceptionOnMissingXmlDeclaration

public boolean getThrowExceptionOnMissingXmlDeclaration()
Specified by:
getThrowExceptionOnMissingXmlDeclaration in interface IMarkupSettings
Returns:
if true, an exception is thrown if the markup file does not contain a xml declaration
See Also:
IMarkupSettings.getThrowExceptionOnMissingXmlDeclaration()

setAutomaticLinking

public void setAutomaticLinking(boolean automaticLinking)
Description copied from interface: IMarkupSettings
Application default for automatic link resolution.

Specified by:
setAutomaticLinking in interface IMarkupSettings
Parameters:
automaticLinking - The automaticLinking to set.
See Also:
IMarkupSettings.setAutomaticLinking(boolean)

setCompressWhitespace

public void setCompressWhitespace(boolean compressWhitespace)
Description copied from interface: IMarkupSettings
Turns on whitespace compression. Multiple occurrences of space/tab characters will be compressed to a single space. Multiple line breaks newline/carriage-return will also be compressed to a single newline.

Compression is currently not HTML aware and so it may be possible for whitespace compression to break pages. For this reason, whitespace compression is off by default and you should test your application thoroughly after turning whitespace compression on.

Spaces are removed from markup at markup load time and there should be no effect on page rendering speed. In fact, your pages should render faster with whitespace compression enabled.

Specified by:
setCompressWhitespace in interface IMarkupSettings
Parameters:
compressWhitespace - The compressWhitespace to set.
See Also:
IMarkupSettings.setCompressWhitespace(boolean)

setDefaultAfterDisabledLink

public void setDefaultAfterDisabledLink(java.lang.String defaultAfterDisabledLink)
Specified by:
setDefaultAfterDisabledLink in interface IMarkupSettings
Parameters:
defaultAfterDisabledLink - The defaultAfterDisabledLink to set.
See Also:
IMarkupSettings.setDefaultAfterDisabledLink(java.lang.String)

setDefaultBeforeDisabledLink

public void setDefaultBeforeDisabledLink(java.lang.String defaultBeforeDisabledLink)
Specified by:
setDefaultBeforeDisabledLink in interface IMarkupSettings
Parameters:
defaultBeforeDisabledLink - The defaultBeforeDisabledLink to set.
See Also:
IMarkupSettings.setDefaultBeforeDisabledLink(java.lang.String)

setDefaultMarkupEncoding

public void setDefaultMarkupEncoding(java.lang.String encoding)
Description copied from interface: IMarkupSettings
Set default encoding for markup files. If null, the encoding provided by the operating system will be used.

Specified by:
setDefaultMarkupEncoding in interface IMarkupSettings
See Also:
IMarkupSettings.setDefaultMarkupEncoding(java.lang.String)

setMarkupFactory

public void setMarkupFactory(MarkupFactory factory)
Description copied from interface: IMarkupSettings
Set a new markup factory

Specified by:
setMarkupFactory in interface IMarkupSettings
See Also:
IMarkupSettings.setMarkupFactory(org.apache.wicket.markup.MarkupFactory)

setStripComments

public void setStripComments(boolean stripComments)
Description copied from interface: IMarkupSettings
Enables stripping of markup comments denoted in markup by HTML comment tagging.

Specified by:
setStripComments in interface IMarkupSettings
Parameters:
stripComments - True to strip markup comments from rendered pages
See Also:
IMarkupSettings.setStripComments(boolean)

setStripWicketTags

public void setStripWicketTags(boolean stripWicketTags)
Description copied from interface: IMarkupSettings
Sets whether to remove wicket tags from the output.

Specified by:
setStripWicketTags in interface IMarkupSettings
Parameters:
stripWicketTags - whether to remove wicket tags from the output
See Also:
IMarkupSettings.setStripWicketTags(boolean)

setThrowExceptionOnMissingXmlDeclaration

public void setThrowExceptionOnMissingXmlDeclaration(boolean throwException)
Description copied from interface: IMarkupSettings
If true, an exception is thrown if the markup file does not contain a xml declaration

Specified by:
setThrowExceptionOnMissingXmlDeclaration in interface IMarkupSettings
See Also:
IMarkupSettings.setThrowExceptionOnMissingXmlDeclaration(boolean)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.