Package org.ametys.cms.content.compare
Class ContentComparator
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.content.compare.ContentComparator
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
Object used to compare two contents
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompare 2 contents, for all their common attributes (contents with different contentTypes are rejected)Compare 2 contents, for all their common attributesCompare 2 contents, filtering with a view (contents with different contentTypes are rejected)Compare 2 contents, filtering with a viewvoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role
-
-
Constructor Details
-
ContentComparator
public ContentComparator()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
compare
public ContentComparatorResult compare(Content content1, Content content2) throws AmetysRepositoryException, IOException Compare 2 contents, for all their common attributes (contents with different contentTypes are rejected)- Parameters:
content1- 1st contentcontent2- new content- Returns:
ContentComparatorResult- Throws:
AmetysRepositoryException- repository exceptionIOException- IO exception
-
compare
public ContentComparatorResult compare(Content content1, Content content2, boolean strictCompare) throws AmetysRepositoryException, IOException Compare 2 contents, for all their common attributes- Parameters:
content1- 1st contentcontent2- new contentstrictCompare- true to reject contents with different content types- Returns:
ContentComparatorResult- Throws:
AmetysRepositoryException- repository exceptionIOException- IO exception
-
compare
public ContentComparatorResult compare(Content content1, Content content2, String viewName) throws AmetysRepositoryException, IOException Compare 2 contents, filtering with a view (contents with different contentTypes are rejected)- Parameters:
content1- 1st contentcontent2- new contentviewName- name of the view- Returns:
ContentComparatorResult- Throws:
AmetysRepositoryException- repository exceptionIOException- IO exception
-
compare
public ContentComparatorResult compare(Content content1, Content content2, String viewName, boolean strictCompare) throws AmetysRepositoryException, IOException Compare 2 contents, filtering with a view- Parameters:
content1- 1st contentcontent2- new contentviewName- name of the viewstrictCompare- true to reject contents with different content types- Returns:
ContentComparatorResult- Throws:
AmetysRepositoryException- repository exceptionIOException- IO exception
-