Compare page versions via Confluence java class

Holger Schimanski
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2018

Does anyone know, what Java class is used in Confluence Server to create the layout when comparing to different versions of a page?

I am thinking about some ideas to improve this layout by a custom plugin. 

 

Best regards
Holger

1 answer

0 votes
Tobias Anstett _K15t_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2018

Hi Holger,

The diff uses the diffpagesbyversion.action which is implemented by com.atlassian.confluence.pages.actions.DiffPagesByVersionAction

This class is mapped in xwork.xml

<action name="diffpagesbyversion" class="com.atlassian.confluence.pages.actions.DiffPagesByVersionAction">
<result name="error" type="velocity">/pages/viewpreviousversions.vm</result>
<result name="input" type="velocity">/pages/viewpreviousversions.vm</result>
<result name="success" type="velocity">/pages/diffpages.vm</result>
</action>

You can overload the action to use different velocity files to output your content.

Under the hood Confluence is using DaisyDiff. 

Hope this helps you to get started.

Best, Tobias

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events