Class TaggingByFieldValueProcessor
java.lang.Object
org.craftercms.core.processors.impl.AbstractTaggingProcessor
org.craftercms.core.processors.impl.TaggingByFieldValueProcessor
- All Implemented Interfaces:
ItemProcessor
ItemProcessor that adds a new tag or field to items that have a certain tag/field and value.- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe name of the existing field to query.Map of values, the keys can be regular expressions.Fields inherited from class org.craftercms.core.processors.impl.AbstractTaggingProcessor
defaultValue, newField -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected StringgetTagValues(Item item) If this method returns null or an empty string the item will not be tagged.inthashCode()voidsetDefaultValue(String defaultValue) voidsetSourceField(String sourceField) voidsetValueMapping(Map<String, String> valueMapping) toString()Methods inherited from class org.craftercms.core.processors.impl.AbstractTaggingProcessor
addNewField, process, setNewFieldMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.craftercms.core.processors.ItemProcessor
isExclusive
-
Field Details
-
sourceField
The name of the existing field to query. -
valueMapping
Map of values, the keys can be regular expressions.
-
-
Constructor Details
-
TaggingByFieldValueProcessor
public TaggingByFieldValueProcessor()
-
-
Method Details
-
setSourceField
-
setDefaultValue
- Overrides:
setDefaultValuein classAbstractTaggingProcessor
-
setValueMapping
-
getTagValues
Description copied from class:AbstractTaggingProcessorIf this method returns null or an empty string the item will not be tagged.- Specified by:
getTagValuesin classAbstractTaggingProcessor- Returns:
- values to use for tagging the item
-
equals
-
hashCode
public int hashCode() -
toString
-