org.xwiki.rendering.internal.configuration
Class DefaultRenderingConfiguration

java.lang.Object
  extended by org.xwiki.rendering.internal.configuration.DefaultRenderingConfiguration
All Implemented Interfaces:
org.xwiki.component.phase.Initializable, RenderingConfiguration

@Component
@Singleton
public class DefaultRenderingConfiguration
extends java.lang.Object
implements RenderingConfiguration, org.xwiki.component.phase.Initializable

Basic default implementation to be used when using the XWiki Rendering system standalone.

Since:
2.0M1
Version:
$Id$

Constructor Summary
DefaultRenderingConfiguration()
           
 
Method Summary
 void addInterWikiDefinition(java.lang.String interWikiAlias, java.lang.String interWikiURL)
           
 java.util.Properties getInterWikiDefinitions()
          
 java.lang.String getLinkLabelFormat()
          A link label format is the format used to decide how to display links that have no label.
 java.util.List<Transformation> getTransformations()
          
 void initialize()
          
 void setLinkLabelFormat(java.lang.String linkLabelFormat)
           
 void setTransformations(java.util.List<Transformation> transformations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRenderingConfiguration

public DefaultRenderingConfiguration()
Method Detail

initialize

public void initialize()
                throws org.xwiki.component.phase.InitializationException

Specified by:
initialize in interface org.xwiki.component.phase.Initializable
Throws:
org.xwiki.component.phase.InitializationException
See Also:
Initializable.initialize()

getLinkLabelFormat

public java.lang.String getLinkLabelFormat()
A link label format is the format used to decide how to display links that have no label. By default the page name is displayed. However it's possible to customize it using the following tokens: Note that if the page title is empty or not defined then it defaults to %p. This is also the case if the title cannot be retrieved for the document. The default is "%p". Some examples: "%s.%p", "%w:%s.%p".

Specified by:
getLinkLabelFormat in interface RenderingConfiguration
Returns:
the format to use to display link labels when the user hasn't specified a label
See Also:
RenderingConfiguration.getLinkLabelFormat()

setLinkLabelFormat

public void setLinkLabelFormat(java.lang.String linkLabelFormat)
Parameters:
linkLabelFormat - the format used to decide how to display links that have no label

getInterWikiDefinitions

public java.util.Properties getInterWikiDefinitions()

Specified by:
getInterWikiDefinitions in interface RenderingConfiguration
Returns:
the list of InterWiki definitions. Each InterWiki definition is made of an alias and a base URL.
See Also:
RenderingConfiguration.getInterWikiDefinitions()

addInterWikiDefinition

public void addInterWikiDefinition(java.lang.String interWikiAlias,
                                   java.lang.String interWikiURL)
Parameters:
interWikiAlias - see InterWikiResourceReference
interWikiURL - see InterWikiResourceReference

setTransformations

public void setTransformations(java.util.List<Transformation> transformations)
Parameters:
transformations - the explicit list of transformations to execute (overrides the default list)

getTransformations

public java.util.List<Transformation> getTransformations()

Specified by:
getTransformations in interface RenderingConfiguration
Returns:
the list of transformations to execute when rendering document content, ordered by transformation priority (highest priority first)
See Also:
RenderingConfiguration.getTransformations()


Copyright © 2004-2011 XWiki. All Rights Reserved.