Class XhtmlCamelCaseLinkMigrationRendererComponent
java.lang.Object
com.atlassian.renderer.v2.components.AbstractRendererComponent
com.atlassian.renderer.v2.components.AbstractRegexRendererComponent
com.atlassian.confluence.content.render.xhtml.migration.XhtmlCamelCaseLinkMigrationRendererComponent
- All Implemented Interfaces:
com.atlassian.renderer.v2.components.RendererComponent
public class XhtmlCamelCaseLinkMigrationRendererComponent
extends com.atlassian.renderer.v2.components.AbstractRegexRendererComponent
implements com.atlassian.renderer.v2.components.RendererComponent
Handles conversion of camelCase links to XHTML links during migration. We can't use the regular
CamelCaseLinkRendererComponent as migration runs without a user in the existing context so space permissions break
the links. Apart from that, the old renderer doesn't properly render links and results in links that do not
auto-update when the linked page is created or deleted.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Pattern
Identical to the non-public com.atlassian.renderer.v2.components.CamelCaseLinkRendererComponent field. -
Constructor Summary
ConstructorDescriptionXhtmlCamelCaseLinkMigrationRendererComponent
(ConfluenceRendererConfiguration rendererConfiguration, Marshaller<Link> linkMarshaller, LinkResolver linkResolver) -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendSubstitution
(StringBuffer stringBuffer, com.atlassian.renderer.RenderContext context, Matcher matcher) boolean
shouldRender
(com.atlassian.renderer.v2.RenderMode renderMode) Methods inherited from class com.atlassian.renderer.v2.components.AbstractRegexRendererComponent
regexRender
-
Field Details
-
LINK_CAMELCASE_PATTERN
Identical to the non-public com.atlassian.renderer.v2.components.CamelCaseLinkRendererComponent field.
-
-
Constructor Details
-
XhtmlCamelCaseLinkMigrationRendererComponent
public XhtmlCamelCaseLinkMigrationRendererComponent(ConfluenceRendererConfiguration rendererConfiguration, Marshaller<Link> linkMarshaller, LinkResolver linkResolver)
-
-
Method Details
-
shouldRender
public boolean shouldRender(com.atlassian.renderer.v2.RenderMode renderMode) - Specified by:
shouldRender
in interfacecom.atlassian.renderer.v2.components.RendererComponent
- Specified by:
shouldRender
in classcom.atlassian.renderer.v2.components.AbstractRegexRendererComponent
-
render
- Specified by:
render
in interfacecom.atlassian.renderer.v2.components.RendererComponent
- Specified by:
render
in classcom.atlassian.renderer.v2.components.AbstractRegexRendererComponent
-
appendSubstitution
public void appendSubstitution(StringBuffer stringBuffer, com.atlassian.renderer.RenderContext context, Matcher matcher) - Specified by:
appendSubstitution
in classcom.atlassian.renderer.v2.components.AbstractRegexRendererComponent
-