public class MetaDataProcessorResolver extends Object implements ItemProcessorResolver
ItemProcessorResolver that searches the item's descriptor for a processor element that defines the name of
the processor| Modifier and Type | Field and Description |
|---|---|
protected Map<String,ItemProcessor> |
elementValueToProcessorMappings
Mappings of processor element values to processor names.
|
protected String |
processorElementXPathQuery
The XPath query for the processor element that defines the processor to use.
|
| Constructor and Description |
|---|
MetaDataProcessorResolver() |
| Modifier and Type | Method and Description |
|---|---|
ItemProcessor |
getProcessor(Item item)
Looks for the processor element (by querying it with the
processorElementXPathQuery) in the item's
descriptor. |
void |
setElementValueToProcessorMappings(Map<String,ItemProcessor> elementValueToProcessorMappings)
Sets the mappings of processor element values to processor names.
|
void |
setProcessorElementXPathQuery(String processorElementXPathQuery)
Sets the XPath query for the processor element that defines the processor to use.
|
protected String processorElementXPathQuery
protected Map<String,ItemProcessor> elementValueToProcessorMappings
public void setProcessorElementXPathQuery(String processorElementXPathQuery)
public void setElementValueToProcessorMappings(Map<String,ItemProcessor> elementValueToProcessorMappings)
public ItemProcessor getProcessor(Item item) throws XmlException
processorElementXPathQuery) in the item's
descriptor. If the element is found, the element value is mapped to a processor and that processor is
returned.getProcessor in interface ItemProcessorResolverXmlException - if the element value doesn't refer to an existing processorCopyright © 2018 CrafterCMS. All rights reserved.