Class CmsShowVersionButtons
- java.lang.Object
-
- org.opencms.ui.dialogs.history.diff.CmsShowVersionButtons
-
- All Implemented Interfaces:
I_CmsDiffProvider
public class CmsShowVersionButtons extends java.lang.Object implements I_CmsDiffProvider
Provides buttons for showing the two versions being compared.
-
-
Constructor Summary
Constructors Constructor Description CmsShowVersionButtons()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.vaadin.ui.Button
createButton(CmsObject cms, CmsHistoryResourceBean version)
Creates a 'show version' button.com.google.common.base.Optional<com.vaadin.ui.Component>
diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2)
Optionally returns a comparison component to display for the given resource versions.
-
-
-
Constructor Detail
-
CmsShowVersionButtons
public CmsShowVersionButtons()
-
-
Method Detail
-
createButton
public com.vaadin.ui.Button createButton(CmsObject cms, CmsHistoryResourceBean version)
Creates a 'show version' button.- Parameters:
cms
- the CMS context to useversion
- the version- Returns:
- the new button
-
diff
public com.google.common.base.Optional<com.vaadin.ui.Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2)
Description copied from interface:I_CmsDiffProvider
Optionally returns a comparison component to display for the given resource versions.If no value is returned, then no widget is displayed.
- Specified by:
diff
in interfaceI_CmsDiffProvider
- Parameters:
cms
- the CMS contextv1
- bean representing the first versionv2
- bean representing the second version- Returns:
- the optional component to display
- See Also:
I_CmsDiffProvider.diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
-
-