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 ofMigrationAwareandFragmentTransformer.- 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 booleanhandles(StartElement startElementEvent, ConversionContext conversionContext)Streamabletransform(XMLEventReader reader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext)booleanwasMigrationPerformed(ConversionContext conversionContext)Given aConversionContextthat 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:MigrationAwareGiven aConversionContextthat 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:
wasMigrationPerformedin 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:
handlesin interfaceFragmentTransformer
-
transform
public Streamable transform(XMLEventReader reader, FragmentTransformer mainFragmentTransformer, ConversionContext conversionContext) throws XhtmlException
- Specified by:
transformin interfaceFragmentTransformer- Throws:
XhtmlException
-
-