public class SelectorPropertyResolver extends Object implements DOMVisitBefore
Some binding selectors can be of the form "order/customer/@customerNumber", where the last token in the selector represents an attribute on the customer element (for example). This extension visitor translates this type of selector into "order/customer" plus a new property on the BeanInstancePopulator config named "valueAttributeName" containing a value of "customerNumber".
Constructor and Description |
---|
SelectorPropertyResolver() |
Modifier and Type | Method and Description |
---|---|
static String |
getSelectorProperty(String[] selectorTokens) |
static void |
resolveSelectorTokens(SmooksResourceConfiguration populatorConfig) |
void |
visitBefore(Element element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitBefore
visitBefore
in interface DOMVisitBefore
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.public static void resolveSelectorTokens(SmooksResourceConfiguration populatorConfig)
Copyright © 2020. All rights reserved.