• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

AtlasCamp 2010: Macro Migration Guide for Confluence 4.0 - Ryan Thomas

on

  • 2,223 views

 

Statistics

Views

Total Views
2,223
Views on SlideShare
1,891
Embed Views
332

Actions

Likes
0
Downloads
10
Comments
0

5 Embeds 332

http://www.atlassian.com 302
https://www.atlassian.com 19
http://magnolia-staging.private.atlassian.com 9
http://qa-wac.atlassian.com 1
https://wacdev.internal.atlassian.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    AtlasCamp 2010: Macro Migration Guide for Confluence 4.0 - Ryan Thomas AtlasCamp 2010: Macro Migration Guide for Confluence 4.0 - Ryan Thomas Presentation Transcript

    • Confluence 4.0, Macros and Migration Ryan Thomas ryan.thomas@atlassian.com 1 Tuesday, November 2, 2010
    • Overview • Confluence 4.0 • XHTML Storage Format • New API • Migration • Macro Migration 2 Tuesday, November 2, 2010
    • Introducing Confluence 4.0 3 Tuesday, November 2, 2010
    • New RTE Interface 4 Tuesday, November 2, 2010
    • Macro Placeholders 5 Tuesday, November 2, 2010
    • Many WYSIWYG Improvements 6 Tuesday, November 2, 2010
    • [*] [space] Inline Wiki Markup Completion 7 Tuesday, November 2, 2010
    • Confluence 4.0 • No more wiki-markup! • Better keyboard shortcut support. • Legacy ‘insert wiki-markup’ support. • We have many wiki-markup fanatics at Atlassian - we have to satisfy them all. 8 Tuesday, November 2, 2010
    • New Storage Format • No more wiki-markup! • Content stored as XHTML with custom namespaces. • We provide an API to interact with the Storage Format 9 Tuesday, November 2, 2010
    • Headings Wiki Markup h3. Creating a new macro in Confluence 4.0 XHTML <h3>Creating a new macro in Confluence 4.0</h3> 10 Tuesday, November 2, 2010
    • Links Wiki Markup [Link To Home Page|Home] XHTML <ac:link> <ri:page ri:space-key="ds" ri:content-title="Home" /> <ac:link-body>Link To Home Page</ac:link-body> </ac:link> 11 Tuesday, November 2, 2010
    • Macros Wiki Markup {code:java|title=Migrator Interface} public interface Migrator { String migrate(String wiki, RenderContext renderContext, List<RuntimeException> exceptions); } {code} XHTML <ac:macro name="code"> <ac:parameter name="title">Migrator Interface</ac:parameter> <ac:default-parameter>java</ac:default-parameter> <ac:body><![CDATA[ public interface Migrator { String migrate(String wiki, RenderContext renderContext, List<RuntimeException> exceptions); }]]> </ac:body> </ac:macro> 12 Tuesday, November 2, 2010
    • Formatting Macros Wiki Markup {color:red}This is some text that should appear in red{color} XHTML <span style="color: red;">This is some text that should appear in red</span> 13 Tuesday, November 2, 2010
    • Disabled Macros Wiki Markup {diabledMacro:param1|param2=value2} And I have a body {disabledMacro} XHTML <ac:macro name="unmigrated-wiki-markup"> <ac:body><![CDATA[ {disabledMacro:param1|param2=value2} And I have a body {disabledMacro} ]]></ac:body> </ac:macro> 14 Tuesday, November 2, 2010
    • API • The BodyContent class now has a BodyType member. • Current types are: Wiki, Mail and XHTML • Initial values are populated as an upgrade task. • Why? Selective and on-the-fly migration of unmigrated and previous content versions. 15 Tuesday, November 2, 2010
    • API • ContentEntityObject.getContent()has been removed. • This is to intentionally break plugins that use this, in 4.0. • XHTML Storage Format will be returned with ContentEntityObject.getBodyAsString() 16 Tuesday, November 2, 2010
    • API • New bean XhtmlContent for performing common operations on the Storage Format. • Allows you to migrate wiki-markup to Storage Format. • Ideally you will not need to touch XHTML when performing operations with this API. 17 Tuesday, November 2, 2010
    • Migration • If an instance is upgraded, we need to migrate the content to the XHTML Storage Format. • The latest version of content will be migrated and saved as a new version. • We do this by using a custom renderer that renders wiki-markup to XHTML. 18 Tuesday, November 2, 2010
    • Migration • Anything that cannot be migrated gets wrapped in a new macro: unmigrated-wiki- markup <ac:macro name="unmigrated-wiki-markup"> <ac:body><![CDATA[ {bad-wiki[markup| ]]></ac:body> </ac:macro> 19 Tuesday, November 2, 2010
    • Macro Migration • Macros also need to be migrated! • Macros don’t have to be 4.0 macros to be migrated (for now). • Custom migration implementations are available to plugins. 20 Tuesday, November 2, 2010
    • Macro Migration Preferred Method Use Custom Yes Migrator Yes Start XHTML? Custom? No No Automatic Migration Yes Automatic bodyless? Migration No Wrap with unmigrated-wiki- markup macro To be deprecated 21 Tuesday, November 2, 2010
    • Macro Migration • Automatic migration will select one of the built in migrators depending on the body type: •PlainTextMacroMigrator •RichTextMacroMigrator • Custom migration can be used by implementing the MacroMigrator interface. 22 Tuesday, November 2, 2010
    • Example / Demo • Upgrading my macros from 3.x to 4.0, and fixing some things in migration. •{mycheese} •{mycolour} red:Some red text {mycolour} 23 Tuesday, November 2, 2010
    • Summary • Confluence 4.0 is going to ROCK! • XHTML Storage Format • New API • Migration • Macro Migration 24 Tuesday, November 2, 2010
    • Confluence 4.0 Alpha http://atlss.in/confdev4 • This is an ALPHA release for AtlasCampers! • Provided to assist with plugin migration. • Feedback - especially on migration and interacting with the storage format - encouraged! • Please, PLEASE do not install this on a production instance... • There is NO upgrade path from this alpha! 25 Tuesday, November 2, 2010
    • Confluence 4.0 Alpha <confluence.version>4.0-alpha2</confluence.version> <dependency> <groupId>com.atlassian.confluence</groupId> <artifactId>confluence</artifactId> <version>4.0-alpha2</version> </dependency> 26 Tuesday, November 2, 2010
    • Questions? Questions / Problems / Feedback confluence4@atlassian.com OR Ryan Thomas ryan.thomas@atlassian.com 27 Tuesday, November 2, 2010