Package org.ametys.cms.content.compare
Class ContentComparatorResult
java.lang.Object
org.ametys.cms.content.compare.ContentComparatorResult
Result of a comparison between 2 contents
-
Constructor Summary
ConstructorDescriptionContentComparatorResult
(Content content1, Content content2) Create a new result from 2 contentsContentComparatorResult
(Content content1, Content content2, String viewName, View view) Create a new result from 2 contents and the name of a metadataSet -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addChange
(ContentComparatorChange change) add a change to the listboolean
are the contents equals ?If contents are not equals, a list ofContentComparatorChange
is generatedget the 1st content of the comparisonget the 1st content of the comparisongetView()
get theView
(generated from the view name, of from all attributes)get the name of theView
protected void
declare that the 2 contents are not equalstoString()
-
Constructor Details
-
ContentComparatorResult
Create a new result from 2 contents- Parameters:
content1
- 1st contentcontent2
- 2nd content
-
ContentComparatorResult
Create a new result from 2 contents and the name of a metadataSet
-
-
Method Details
-
areEquals
are the contents equals ?- Returns:
- true if equals
-
getChanges
If contents are not equals, a list ofContentComparatorChange
is generated- Returns:
- list of
ContentComparatorChange
-
getContent1
get the 1st content of the comparison- Returns:
- 1st content
-
getContent2
get the 1st content of the comparison- Returns:
- 2nd content
-
getViewName
get the name of theView
- Returns:
- View's name (can be null)
-
getView
get theView
(generated from the view name, of from all attributes)- Returns:
View
-
addChange
add a change to the list- Parameters:
change
- a new change
-
setNotEquals
declare that the 2 contents are not equals -
toString
-