Class DelegatingMigrationAwareFragmentTransformer
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.migration.DelegatingMigrationAwareFragmentTransformer
-
- All Implemented Interfaces:
MigrationAware
,FragmentTransformer
public class DelegatingMigrationAwareFragmentTransformer extends Object implements MigrationAware, FragmentTransformer
A simple delegating implementation ofMigrationAware
andFragmentTransformer
.- Since:
- 5.3
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.confluence.content.render.xhtml.migration.MigrationAware
MigrationAware.MigrationPerformedPredicate
-
-
Constructor Summary
Constructors Constructor Description DelegatingMigrationAwareFragmentTransformer(FragmentTransformer fragmentTransformer, MigrationAware migrationAware)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
handles(StartElement startElementEvent, ConversionContext conversionContext)
Streamable
transform(XMLEventReader reader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext)
boolean
wasMigrationPerformed(ConversionContext conversionContext)
Given aConversionContext
that was previously used to perform a migration, determine if that context contains information that indicates whether a "migration" was performed.
-
-
-
Constructor Detail
-
DelegatingMigrationAwareFragmentTransformer
public DelegatingMigrationAwareFragmentTransformer(FragmentTransformer fragmentTransformer, MigrationAware migrationAware)
-
-
Method Detail
-
wasMigrationPerformed
public boolean wasMigrationPerformed(ConversionContext conversionContext)
Description copied from interface:MigrationAware
Given aConversionContext
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 interfaceMigrationAware
- Parameters:
conversionContext
- the context used for the migration- Returns:
- true if migration was performed against the supplied context, false otherwise.
-
handles
public boolean handles(StartElement startElementEvent, ConversionContext conversionContext)
- Specified by:
handles
in interfaceFragmentTransformer
-
transform
public Streamable transform(XMLEventReader reader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext) throws XhtmlException
- Specified by:
transform
in interfaceFragmentTransformer
- Throws:
XhtmlException
-
-