public class ValueBinder extends Object implements org.smooks.api.resource.visitor.sax.ng.BeforeVisitor, org.smooks.api.resource.visitor.sax.ng.AfterVisitor, org.smooks.api.resource.visitor.sax.ng.ChildrenVisitor, org.smooks.api.delivery.ordering.Producer
Value
Object.
<order xmlns="http://x"> <header> <y:date xmlns:y="http://y">Wed Nov 15 13:45:28 EST 2006</y:date> <customer number="123123">Joe</customer> <privatePerson></privatePerson> </header> <order-items> <!-- .... --> </order-items> </order>
<?xml version="1.0"?> <smooks-resource-list xmlns="https://www.smooks.org/xsd/smooks-1.2.xsd" xmlns:jb="https://www.smooks.org/xsd/smooks/javabean-1.6.xsd"> <jb:value beanId="customerName" data="customer" default="unknown" /> <jb:value beanId="customerNumber" data="customer/@number" decoder="Integer" /> </smooks-resource-list>
Modifier and Type | Field and Description |
---|---|
protected org.smooks.api.ApplicationContext |
applicationContext |
protected org.smooks.api.bean.repository.BeanId |
beanId |
protected String |
beanIdName |
protected Optional<String> |
defaultValue |
protected boolean |
isAttribute |
protected static org.slf4j.Logger |
LOGGER |
protected String |
typeAlias |
protected org.smooks.api.converter.TypeConverter<? super String,?> |
typeConverter |
protected Optional<String> |
valueAttributeName |
Constructor and Description |
---|
ValueBinder() |
ValueBinder(String beanId) |
Modifier and Type | Method and Description |
---|---|
protected void |
bindValue(String dataString,
org.smooks.api.ExecutionContext executionContext,
org.smooks.api.delivery.fragment.Fragment<?> source) |
protected Object |
decodeDataString(String dataString,
org.smooks.api.ExecutionContext executionContext) |
String |
getBeanIdName() |
String |
getDefaultValue() |
Set<?> |
getProducts() |
String |
getTypeAlias() |
org.smooks.api.converter.TypeConverter<? super String,?> |
getTypeConverter() |
protected org.smooks.api.converter.TypeConverter<? super String,?> |
getTypeConverter(org.smooks.api.ExecutionContext executionContext) |
String |
getValueAttributeName() |
void |
postConstruct()
Set the resource configuration on the bean populator.
|
void |
setBeanIdName(String beanIdName) |
void |
setDefaultValue(String defaultValue) |
void |
setTypeAlias(String typeAlias) |
void |
setTypeConverter(org.smooks.api.converter.TypeConverter<? super String,?> typeConverter) |
void |
setValueAttributeName(String valueAttributeName) |
void |
visitAfter(Element element,
org.smooks.api.ExecutionContext executionContext) |
void |
visitBefore(Element element,
org.smooks.api.ExecutionContext executionContext) |
void |
visitChildElement(Element childElement,
org.smooks.api.ExecutionContext executionContext) |
void |
visitChildText(CharacterData characterData,
org.smooks.api.ExecutionContext executionContext) |
protected static final org.slf4j.Logger LOGGER
@Inject @Named(value="beanId") protected String beanIdName
@Inject @Named(value="type") protected String typeAlias
protected org.smooks.api.bean.repository.BeanId beanId
@Inject protected org.smooks.api.ApplicationContext applicationContext
protected boolean isAttribute
protected org.smooks.api.converter.TypeConverter<? super String,?> typeConverter
public ValueBinder()
public ValueBinder(String beanId)
beanId
- public String getBeanIdName()
public void setBeanIdName(String beanIdName)
beanIdName
- the beanIdName to setpublic String getValueAttributeName()
public void setValueAttributeName(String valueAttributeName)
valueAttributeName
- the valueAttributeName to setpublic String getDefaultValue()
public void setDefaultValue(String defaultValue)
defaultValue
- the defaultValue to setpublic String getTypeAlias()
public void setTypeAlias(String typeAlias)
typeAlias
- the typeAlias to setpublic org.smooks.api.converter.TypeConverter<? super String,?> getTypeConverter()
public void setTypeConverter(org.smooks.api.converter.TypeConverter<? super String,?> typeConverter)
typeConverter
- the decoder to set@PostConstruct public void postConstruct() throws org.smooks.api.SmooksConfigException
org.smooks.api.SmooksConfigException
- Incorrectly configured resource.public void visitBefore(Element element, org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.SmooksException
visitBefore
in interface org.smooks.api.resource.visitor.sax.ng.BeforeVisitor
org.smooks.api.SmooksException
public void visitAfter(Element element, org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.SmooksException
visitAfter
in interface org.smooks.api.resource.visitor.sax.ng.AfterVisitor
org.smooks.api.SmooksException
protected void bindValue(String dataString, org.smooks.api.ExecutionContext executionContext, org.smooks.api.delivery.fragment.Fragment<?> source)
public Set<?> getProducts()
getProducts
in interface org.smooks.api.delivery.ordering.Producer
protected Object decodeDataString(String dataString, org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.converter.TypeConverterException
org.smooks.api.converter.TypeConverterException
protected org.smooks.api.converter.TypeConverter<? super String,?> getTypeConverter(org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.converter.TypeConverterException
org.smooks.api.converter.TypeConverterException
public void visitChildText(CharacterData characterData, org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.SmooksException
visitChildText
in interface org.smooks.api.resource.visitor.sax.ng.ChildrenVisitor
org.smooks.api.SmooksException
public void visitChildElement(Element childElement, org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.SmooksException
visitChildElement
in interface org.smooks.api.resource.visitor.sax.ng.ChildrenVisitor
org.smooks.api.SmooksException
Copyright © 2024. All rights reserved.