com.atlassian.confluence.content.render.xhtml.migration
Class DelegatingMigrationAwareFragmentTransformer

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.migration.DelegatingMigrationAwareFragmentTransformer
All Implemented Interfaces:
MigrationAware, FragmentTransformer

public class DelegatingMigrationAwareFragmentTransformer
extends java.lang.Object
implements MigrationAware, FragmentTransformer

A simple delegating implementation of MigrationAware and FragmentTransformer.

Since:
v5.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.confluence.content.render.xhtml.migration.MigrationAware
MigrationAware.MigrationPerformedPredicate
 
Constructor Summary
DelegatingMigrationAwareFragmentTransformer(FragmentTransformer fragmentTransformer, MigrationAware migrationAware)
           
 
Method Summary
 boolean handles(javax.xml.stream.events.StartElement startElementEvent, ConversionContext conversionContext)
           
 Streamable transform(javax.xml.stream.XMLEventReader reader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext)
           
 boolean wasMigrationPerformed(ConversionContext conversionContext)
          Given a ConversionContext that was previously used to perform a migration, determine if that context contains information that indicates whether a "migration" was performed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingMigrationAwareFragmentTransformer

public DelegatingMigrationAwareFragmentTransformer(FragmentTransformer fragmentTransformer,
                                                   MigrationAware migrationAware)
Method Detail

wasMigrationPerformed

public boolean wasMigrationPerformed(ConversionContext conversionContext)
Description copied from interface: MigrationAware
Given a ConversionContext that was previously used to perform a migration, determine if that context contains information that indicates whether a "migration" was performed. What constitutes a migration is implementation-dependent.

Specified by:
wasMigrationPerformed in interface MigrationAware
Parameters:
conversionContext - the context used for the migration
Returns:
true if migration was performed against the supplied context, false otherwise.

handles

public boolean handles(javax.xml.stream.events.StartElement startElementEvent,
                       ConversionContext conversionContext)
Specified by:
handles in interface FragmentTransformer

transform

public Streamable transform(javax.xml.stream.XMLEventReader reader,
                            FragmentTransformer mainFragmentTransformer,
                            ConversionContext conversionContext)
                     throws XhtmlException
Specified by:
transform in interface FragmentTransformer
Throws:
XhtmlException


Copyright © 2003-2014 Atlassian. All Rights Reserved.