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
ConstructorsConstructorDescriptionStringDuplicateAttributeConfiguration(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 QuerygetDuplicateQuery(String value) Get the query to check if other contents have the same valueprotected QueryGet the query to check if a field is filledgetNearDuplicateQuery(String value) Get the query to check if other contents have almost the same valueprotected booleanCheck 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:AbstractDuplicateAttributeConfigurationGet the query to check if a field is filled- Specified by:
getExistQueryin classAbstractDuplicateAttributeConfiguration<String>- Returns:
- the query
-
getDuplicateQuery
Description copied from class:AbstractDuplicateAttributeConfigurationGet the query to check if other contents have the same value- Specified by:
getDuplicateQueryin classAbstractDuplicateAttributeConfiguration<String>- Parameters:
value- the value to check- Returns:
- the query
-
getNearDuplicateQuery
Description copied from class:AbstractDuplicateAttributeConfigurationGet the query to check if other contents have almost the same value- Overrides:
getNearDuplicateQueryin classAbstractDuplicateAttributeConfiguration<String>- Parameters:
value- the value to check- Returns:
- the query
-
_computeCheckNearDuplicate
Description copied from class:AbstractDuplicateAttributeConfigurationCheck if this attribute should also check for near duplicates- Overrides:
_computeCheckNearDuplicatein 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:AbstractDuplicateAttributeConfigurationCheck if the value is empty- Overrides:
isEmptyin classAbstractDuplicateAttributeConfiguration<String>- Parameters:
value- the value- Returns:
- true if the value is empty
-