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
Fields Modifier and Type Field Description static Pattern
LINK_CAMELCASE_PATTERN
Identical to the non-public com.atlassian.renderer.v2.components.CamelCaseLinkRendererComponent field.
-
Constructor Summary
Constructors Constructor Description XhtmlCamelCaseLinkMigrationRendererComponent(ConfluenceRendererConfiguration rendererConfiguration, Marshaller<Link> linkMarshaller, LinkResolver linkResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendSubstitution(StringBuffer stringBuffer, com.atlassian.renderer.RenderContext context, Matcher matcher)
String
render(String wiki, com.atlassian.renderer.RenderContext renderContext)
boolean
shouldRender(com.atlassian.renderer.v2.RenderMode renderMode)
-
-
-
Field Detail
-
LINK_CAMELCASE_PATTERN
public static final Pattern LINK_CAMELCASE_PATTERN
Identical to the non-public com.atlassian.renderer.v2.components.CamelCaseLinkRendererComponent field.
-
-
Constructor Detail
-
XhtmlCamelCaseLinkMigrationRendererComponent
public XhtmlCamelCaseLinkMigrationRendererComponent(ConfluenceRendererConfiguration rendererConfiguration, Marshaller<Link> linkMarshaller, LinkResolver linkResolver)
-
-
Method Detail
-
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
public String render(String wiki, com.atlassian.renderer.RenderContext renderContext)
- 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
-
-