Package org.ametys.cms.content.compare
Class ContentComparator.ComparisonContext
java.lang.Object
org.ametys.cms.content.compare.ContentComparator.ComparisonContext
- Enclosing class:
ContentComparator
Comparison context
-
Method Summary
Modifier and TypeMethodDescriptionGet the view item accessor to compare, can be nullCreate an instance of comparison contextbooleanGet the strict compare status,trueby default.withStrictCompare(boolean strictCompare) Set tofalseto accept contents with different content typeswithViewItemAccessor(ViewItemAccessor viewItemAccessor) Set theViewItemAccessorused for the comparison
-
Method Details
-
newInstance
Create an instance of comparison context- Returns:
- the comparison context
-
withStrictCompare
Set tofalseto accept contents with different content types- Parameters:
strictCompare-trueto reject contents with different content types- Returns:
- itself
-
withViewItemAccessor
Set theViewItemAccessorused for the comparison- Parameters:
viewItemAccessor- the view item accessor- Returns:
- itself
-
strictCompare
Get the strict compare status,trueby default.- Returns:
trueto make a strict comparison
-
getViewItemAccessor
Get the view item accessor to compare, can be null- Returns:
- the view item accessor
-