org.xwiki.rendering.internal.renderer.xwiki21.XWikiSyntaxChainingRenderer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xwiki-rendering-syntax-xwiki21 Show documentation
Show all versions of xwiki-rendering-syntax-xwiki21 Show documentation
XWiki Rendering - Syntax - XWiki 2.1
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.xwiki.rendering.internal.renderer.xwiki21;
import org.xwiki.rendering.internal.renderer.xwiki20.XWikiSyntaxListenerChain;
import org.xwiki.rendering.internal.renderer.xwiki21.reference.XWikiSyntaxResourceRenderer;
import org.xwiki.rendering.listener.chaining.ListenerChain;
import org.xwiki.rendering.listener.chaining.StackableChainingListener;
import org.xwiki.rendering.renderer.reference.ResourceReferenceSerializer;
/**
* Convert listener events to XWiki Syntax 2.1 output.
*
* @version $Id: c22c50a8a186c9aa14fb1ae0e0ba471877e6ac7c $
* @since 2.5M2
*/
public class XWikiSyntaxChainingRenderer
extends org.xwiki.rendering.internal.renderer.xwiki20.XWikiSyntaxChainingRenderer
{
/**
* @param listenerChain the rendering listener chain
* @param linkReferenceSerializer the serializer to use to serialize link references
* @param imageReferenceSerializer the serializer to use to serialize image references
* @since 2.5RC1
*/
public XWikiSyntaxChainingRenderer(ListenerChain listenerChain,
ResourceReferenceSerializer linkReferenceSerializer, ResourceReferenceSerializer imageReferenceSerializer)
{
super(listenerChain, linkReferenceSerializer, imageReferenceSerializer);
}
/**
* {@inheritDoc}
*
* @since 2.5RC1
*/
@Override
protected XWikiSyntaxResourceRenderer createXWikiSyntaxLinkRenderer(ListenerChain listenerChain,
ResourceReferenceSerializer linkReferenceSerializer)
{
return new XWikiSyntaxResourceRenderer((XWikiSyntaxListenerChain) listenerChain, linkReferenceSerializer);
}
/**
* {@inheritDoc}
*
* @since 2.5RC1
*/
@Override
protected XWikiSyntaxResourceRenderer createXWikiSyntaxImageRenderer(ListenerChain listenerChain,
ResourceReferenceSerializer imageReferenceSerializer)
{
return new XWikiSyntaxResourceRenderer((XWikiSyntaxListenerChain) listenerChain, imageReferenceSerializer);
}
/**
* {@inheritDoc}
*
* @since 6.4.8
* @since 7.4.1
*/
@Override
public StackableChainingListener createChainingListenerInstance()
{
XWikiSyntaxChainingRenderer renderer = new XWikiSyntaxChainingRenderer(getListenerChain(),
this.linkReferenceSerializer, this.imageReferenceSerializer);
renderer.setPrinter(getPrinter());
return renderer;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy