public abstract class AbstractTaggingProcessor extends Object implements ItemProcessor
ItemProcessor to add a new field to documents.| Modifier and Type | Field and Description |
|---|---|
protected String |
defaultValue
Optional default value for the new field.
|
protected String |
newField
Name of the new field to add.
|
| Constructor and Description |
|---|
AbstractTaggingProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addNewField(Item item,
String values)
Tags the item adding the new field with the specified values.
|
protected abstract String |
getTagValues(Item item)
If this method returns null or an empty string the item will not be tagged.
|
Item |
process(Context context,
CachingOptions cachingOptions,
Item item)
Processes an
Item. |
void |
setDefaultValue(String defaultValue) |
void |
setNewField(String newField) |
protected String newField
protected String defaultValue
public void setNewField(String newField)
public void setDefaultValue(String defaultValue)
protected abstract String getTagValues(Item item)
item - protected void addNewField(Item item, String values)
item - values - public Item process(Context context, CachingOptions cachingOptions, Item item) throws ItemProcessingException
ItemProcessorItem.process in interface ItemProcessorcontext - the current contextcachingOptions - caching options in case you need access to itemsitem - the item to processItemProcessingException - if an error occurred while processing the itemCopyright © 2018 CrafterCMS. All rights reserved.