public class CmsResourceComparison
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
TYPE_ADDED
Constant indicating that an item (e.g. element or property) has been added.
|
static java.lang.String |
TYPE_CHANGED
Constant indicating that an item has been changed.
|
static java.lang.String |
TYPE_REMOVED
Constant indicating that an item has been removed.
|
static java.lang.String |
TYPE_UNCHANGED
Constant indicating that an item has not been changed.
|
限定符 | 构造器和说明 |
---|---|
protected |
CmsResourceComparison()
Constructs a new resource comparison object.
|
限定符和类型 | 方法和说明 |
---|---|
static java.util.List |
compareAttributes(CmsObject cms,
CmsResource resource1,
CmsResource resource2)
Helper method that collects all meta attributes of the two file versions and
finds out, which of the attributes were added, removed, modified or remain unchanged.
|
static java.util.List |
compareProperties(CmsObject cms,
CmsResource resource1,
java.lang.String version1,
CmsResource resource2,
java.lang.String version2)
Helper method that finds out, which of the properties were added, removed, modified or remain unchanged.
|
public static final java.lang.String TYPE_ADDED
public static final java.lang.String TYPE_CHANGED
public static final java.lang.String TYPE_REMOVED
public static final java.lang.String TYPE_UNCHANGED
protected CmsResourceComparison()
public static java.util.List compareAttributes(CmsObject cms, CmsResource resource1, CmsResource resource2)
cms
- the CmsObject to useresource1
- the first resource to read the properties fromresource2
- the second resource to read the properties frompublic static java.util.List compareProperties(CmsObject cms, CmsResource resource1, java.lang.String version1, CmsResource resource2, java.lang.String version2) throws CmsException
cms
- the CmsObject to useresource1
- the first resource to read the properties fromversion1
- the version of the first resourceresource2
- the second resource to read the properties fromversion2
- the version of the second resourceCmsException
- if something goes wrong