Class StringDuplicateAttributeConfiguration
java.lang.Object
org.ametys.cms.duplicate.contents.attr.AbstractDuplicateAttributeConfiguration<String>
org.ametys.cms.duplicate.contents.attr.impl.StringDuplicateAttributeConfiguration
- All Implemented Interfaces:
DuplicateAttributeConfiguration<String>
public class StringDuplicateAttributeConfiguration
extends AbstractDuplicateAttributeConfiguration<String>
Represents a
DuplicateAttributeConfiguration
for a String
-
Field Summary
Fields inherited from class org.ametys.cms.duplicate.contents.attr.AbstractDuplicateAttributeConfiguration
_checkNearDuplicate, _path, _type, ROLE
-
Constructor Summary
ConstructorDescriptionStringDuplicateAttributeConfiguration
(Configuration configuration, String attributeType) Create a new StringDuplicateAttributeConfiguration -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
_computeCheckNearDuplicate
(Configuration configuration) Check if this attribute should also check for near duplicatesprotected Query
getDuplicateQuery
(String value) Get the query to check if other contents have the same valueprotected Query
Get the query to check if a field is filledgetNearDuplicateQuery
(String value) Get the query to check if other contents have almost the same valueprotected boolean
Check if the value is emptyMethods inherited from class org.ametys.cms.duplicate.contents.attr.AbstractDuplicateAttributeConfiguration
checkNearDuplicate, getDuplicate, getPath, getQuery, getType, setPath, setType
-
Constructor Details
-
StringDuplicateAttributeConfiguration
public StringDuplicateAttributeConfiguration(Configuration configuration, String attributeType) throws ConfigurationException Create a new StringDuplicateAttributeConfiguration- Parameters:
configuration
- the configuration used to create the DuplicateAttributeConfigurationattributeType
- the attribute type id- Throws:
ConfigurationException
- if the configuration is not valid.
-
-
Method Details
-
getExistQuery
Description copied from class:AbstractDuplicateAttributeConfiguration
Get the query to check if a field is filled- Specified by:
getExistQuery
in classAbstractDuplicateAttributeConfiguration<String>
- Returns:
- the query
-
getDuplicateQuery
Description copied from class:AbstractDuplicateAttributeConfiguration
Get the query to check if other contents have the same value- Specified by:
getDuplicateQuery
in classAbstractDuplicateAttributeConfiguration<String>
- Parameters:
value
- the value to check- Returns:
- the query
-
getNearDuplicateQuery
Description copied from class:AbstractDuplicateAttributeConfiguration
Get the query to check if other contents have almost the same value- Overrides:
getNearDuplicateQuery
in classAbstractDuplicateAttributeConfiguration<String>
- Parameters:
value
- the value to check- Returns:
- the query
-
_computeCheckNearDuplicate
Description copied from class:AbstractDuplicateAttributeConfiguration
Check if this attribute should also check for near duplicates- Overrides:
_computeCheckNearDuplicate
in classAbstractDuplicateAttributeConfiguration<String>
- Parameters:
configuration
- the configuration used to create the DuplicateAttributeConfiguration- Returns:
- true if this attribute should also check for near duplicates
-
isEmpty
Description copied from class:AbstractDuplicateAttributeConfiguration
Check if the value is empty- Overrides:
isEmpty
in classAbstractDuplicateAttributeConfiguration<String>
- Parameters:
value
- the value- Returns:
- true if the value is empty
-