public abstract class A_CmsAttributeDiff extends java.lang.Object implements I_CmsDiffProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
A_CmsAttributeDiff.IsAttributeDifference
Predicate used to check if an attribute comparison bean actually represents a difference.
|
| Constructor and Description |
|---|
A_CmsAttributeDiff() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static java.util.List<CmsAttributeComparison> |
filterDifferent(java.util.List<CmsAttributeComparison> comps)
Only selects the attributes comparisons that actually represent differences.
|
abstract java.lang.String |
getCaption()
Gets the caption.
|
abstract java.util.List<CmsAttributeComparison> |
getDifferences(CmsObject cms,
CmsHistoryResourceBean v1,
CmsHistoryResourceBean v2)
Gets the attribute comparison beans representing the differences.
|
static java.lang.String |
getVersionString(CmsHistoryResourceBean bean)
Builds a version string which can be used by CmsResourceComparison from a history resource bean.
|
static CmsResource |
readResource(CmsObject cms,
CmsHistoryResourceBean bean)
Reads a historical resource for a history resource bean.
|
public A_CmsAttributeDiff()
public static java.util.List<CmsAttributeComparison> filterDifferent(java.util.List<CmsAttributeComparison> comps)
comps - the attribute comparisonspublic static java.lang.String getVersionString(CmsHistoryResourceBean bean)
This is not really a user-readable string, it is meant for internal usage.
bean - the history resource beanpublic static CmsResource readResource(CmsObject cms, CmsHistoryResourceBean bean) throws CmsException
cms - the CMS contextbean - the history resource beanCmsException - if something goes wrongpublic com.google.common.base.Optional<com.vaadin.ui.Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException
I_CmsDiffProviderIf no value is returned, then no widget is displayed.
diff in interface I_CmsDiffProvidercms - the CMS contextv1 - bean representing the first versionv2 - bean representing the second versionCmsException - if something goes wrongI_CmsDiffProvider.diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)public abstract java.lang.String getCaption()
public abstract java.util.List<CmsAttributeComparison> getDifferences(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException
cms - the CMS contextv1 - history bean representing the first versionv2 - history bean representing the second versionCmsException - if something goes wrong