public class BeanInstancePopulator 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, org.smooks.api.delivery.ordering.Consumer
Modifier and Type | Field and Description |
---|---|
protected org.smooks.api.ApplicationContext |
applicationContext |
protected org.smooks.api.bean.repository.BeanId |
beanId |
protected String |
beanIdName |
protected org.smooks.api.bean.context.BeanIdStore |
beanIdStore |
protected BeanRuntimeInfo |
beanRuntimeInfo |
protected boolean |
checkedForSetterMethod |
protected org.smooks.api.resource.config.ResourceConfig |
config |
protected Optional<String> |
defaultVal |
protected Optional<String> |
expression |
protected static String |
EXPRESSION_VALUE_VARIABLE_NAME |
protected org.smooks.engine.expression.MVELExpressionEvaluator |
expressionEvaluator |
protected boolean |
expressionHasDataVariable |
protected String |
id |
protected boolean |
isAttribute |
protected boolean |
isBeanWiring |
protected ListToArrayChangeObserver |
listToArrayChangeObserver |
protected static org.slf4j.Logger |
LOGGER |
protected String |
mapKeyAttribute |
static String |
NOTIFY_POPULATE |
protected Boolean |
notifyPopulate |
protected Optional<String> |
property |
protected Method |
propertySetterMethod |
protected Optional<String> |
setterMethod |
protected Optional<String> |
typeAlias |
protected org.smooks.api.converter.TypeConverterFactory<?,?> |
typeConverterFactory |
static String |
VALUE_ATTRIBUTE_NAME |
static String |
VALUE_ATTRIBUTE_PREFIX |
protected Optional<String> |
valueAttributeName |
protected String |
valueAttributeNS |
protected Optional<String> |
valueAttributePrefix |
protected Optional<Class<? extends Annotation>> |
wireBeanAnnotation |
protected org.smooks.api.bean.repository.BeanId |
wireBeanId |
protected Optional<String> |
wireBeanIdName |
protected Optional<Class<?>> |
wireBeanType |
protected BeanWiringObserver |
wireByBeanIdObserver |
protected BeanRuntimeInfo |
wiredBeanRuntimeInfo |
Constructor and Description |
---|
BeanInstancePopulator() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
beanExists(org.smooks.api.ExecutionContext executionContext) |
protected void |
bindBeanValue(org.smooks.api.ExecutionContext executionContext,
org.smooks.api.delivery.fragment.Fragment source) |
protected void |
bindExpressionValue(String mapPropertyName,
String dataString,
org.smooks.api.ExecutionContext executionContext,
org.smooks.api.delivery.fragment.Fragment source) |
protected void |
bindSaxDataValue(Element element,
org.smooks.api.ExecutionContext executionContext) |
protected void |
buildId() |
boolean |
consumes(Object object) |
protected void |
createPropertySetterMethod(Object bean,
Class<?> parameter) |
protected Method |
createPropertySetterMethod(Object bean,
String setterName,
Class<?> setterParamType)
Create the bean setter method instance for this visitor.
|
protected void |
decodeAndSetPropertyValue(String mapPropertyName,
Object dataObject,
org.smooks.api.ExecutionContext executionContext,
org.smooks.api.delivery.fragment.Fragment source) |
protected Object |
decodeDataString(String dataString,
org.smooks.api.ExecutionContext executionContext) |
protected String |
getAttributeValue(Element element,
String attributeName,
String namespaceURI) |
String |
getBeanId() |
org.smooks.api.resource.config.ResourceConfig |
getConfig() |
protected String |
getId() |
Set<?> |
getProducts() |
String |
getProperty() |
org.smooks.api.converter.TypeConverterFactory<?,?> |
getTypeConverterFactory() |
org.smooks.api.converter.TypeConverterFactory<?,?> |
getTypeConverterFactory(org.smooks.api.delivery.ContentDeliveryConfig contentDeliveryConfig) |
protected org.smooks.api.converter.TypeConverterFactory<?,?> |
getTypeConverterFactory(org.smooks.api.ExecutionContext executionContext) |
String |
getWireBeanId() |
protected BeanRuntimeInfo |
getWiredBeanRuntimeInfo() |
boolean |
isBeanWiring() |
void |
populateAndSetPropertyValue(Object bean,
org.smooks.api.bean.context.BeanContext beanContext,
org.smooks.api.bean.repository.BeanId targetBeanId,
org.smooks.api.ExecutionContext executionContext,
org.smooks.api.delivery.fragment.Fragment source) |
void |
postConstruct()
Set the resource configuration on the bean populator.
|
protected Class<?> |
resolveBindTypeReflectively() |
protected org.smooks.api.converter.TypeConverterFactory<? super String,?> |
resolveDecoderReflectively() |
void |
setBeanId(String beanId) |
void |
setDefaultVal(String defaultVal) |
void |
setExpression(org.smooks.engine.expression.MVELExpressionEvaluator expression) |
void |
setProperty(String property) |
void |
setPropertyValue(String mapPropertyName,
Object dataObject,
org.smooks.api.ExecutionContext executionContext,
org.smooks.api.delivery.fragment.Fragment source) |
void |
setSetterMethod(String setterMethod) |
void |
setTypeAlias(String typeAlias) |
void |
setTypeConverterFactory(org.smooks.api.converter.TypeConverterFactory<?,?> typeConverterFactory) |
void |
setValueAttributeName(String valueAttributeName) |
void |
setValueAttributePrefix(String valueAttributePrefix) |
void |
setWireBeanId(String wireBeanId) |
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
protected static final String EXPRESSION_VALUE_VARIABLE_NAME
public static final String VALUE_ATTRIBUTE_NAME
public static final String VALUE_ATTRIBUTE_PREFIX
public static final String NOTIFY_POPULATE
protected String id
@Inject @Named(value="beanId") protected String beanIdName
@Inject protected Optional<Class<? extends Annotation>> wireBeanAnnotation
protected org.smooks.engine.expression.MVELExpressionEvaluator expressionEvaluator
protected boolean expressionHasDataVariable
protected String valueAttributeNS
@Inject @Named(value="org.smooks.cartridges.javabean.notify.populate") protected Boolean notifyPopulate
@Inject protected org.smooks.api.resource.config.ResourceConfig config
@Inject protected org.smooks.api.ApplicationContext applicationContext
protected org.smooks.api.bean.context.BeanIdStore beanIdStore
protected org.smooks.api.bean.repository.BeanId beanId
protected org.smooks.api.bean.repository.BeanId wireBeanId
protected BeanRuntimeInfo beanRuntimeInfo
protected BeanRuntimeInfo wiredBeanRuntimeInfo
protected Method propertySetterMethod
protected boolean checkedForSetterMethod
protected boolean isAttribute
protected org.smooks.api.converter.TypeConverterFactory<?,?> typeConverterFactory
protected String mapKeyAttribute
protected boolean isBeanWiring
protected BeanWiringObserver wireByBeanIdObserver
protected ListToArrayChangeObserver listToArrayChangeObserver
public org.smooks.api.resource.config.ResourceConfig getConfig()
public void setBeanId(String beanId)
public String getBeanId()
public void setWireBeanId(String wireBeanId)
public String getWireBeanId()
public void setExpression(org.smooks.engine.expression.MVELExpressionEvaluator expression)
public void setProperty(String property)
public String getProperty()
public void setSetterMethod(String setterMethod)
public void setValueAttributeName(String valueAttributeName)
public void setValueAttributePrefix(String valueAttributePrefix)
public void setTypeAlias(String typeAlias)
public void setTypeConverterFactory(org.smooks.api.converter.TypeConverterFactory<?,?> typeConverterFactory)
public org.smooks.api.converter.TypeConverterFactory<?,?> getTypeConverterFactory()
public void setDefaultVal(String defaultVal)
public boolean isBeanWiring()
@PostConstruct public void postConstruct() throws org.smooks.api.SmooksConfigException
org.smooks.api.SmooksConfigException
- Incorrectly configured resource.protected void buildId()
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 boolean beanExists(org.smooks.api.ExecutionContext executionContext)
protected void bindSaxDataValue(Element element, org.smooks.api.ExecutionContext executionContext)
protected String getAttributeValue(Element element, String attributeName, String namespaceURI)
protected void bindBeanValue(org.smooks.api.ExecutionContext executionContext, org.smooks.api.delivery.fragment.Fragment source)
public void populateAndSetPropertyValue(Object bean, org.smooks.api.bean.context.BeanContext beanContext, org.smooks.api.bean.repository.BeanId targetBeanId, org.smooks.api.ExecutionContext executionContext, org.smooks.api.delivery.fragment.Fragment source)
protected void bindExpressionValue(String mapPropertyName, String dataString, org.smooks.api.ExecutionContext executionContext, org.smooks.api.delivery.fragment.Fragment source)
protected void decodeAndSetPropertyValue(String mapPropertyName, Object dataObject, org.smooks.api.ExecutionContext executionContext, org.smooks.api.delivery.fragment.Fragment source)
public void setPropertyValue(String mapPropertyName, Object dataObject, org.smooks.api.ExecutionContext executionContext, org.smooks.api.delivery.fragment.Fragment source)
protected void createPropertySetterMethod(Object bean, Class<?> parameter)
protected Method createPropertySetterMethod(Object bean, String setterName, Class<?> setterParamType)
setterName
- The setter method name.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.TypeConverterFactory<?,?> getTypeConverterFactory(org.smooks.api.ExecutionContext executionContext) throws org.smooks.api.converter.TypeConverterException
org.smooks.api.converter.TypeConverterException
public org.smooks.api.converter.TypeConverterFactory<?,?> getTypeConverterFactory(org.smooks.api.delivery.ContentDeliveryConfig contentDeliveryConfig)
protected org.smooks.api.converter.TypeConverterFactory<? super String,?> resolveDecoderReflectively() throws org.smooks.api.converter.TypeConverterException
org.smooks.api.converter.TypeConverterException
protected Class<?> resolveBindTypeReflectively() throws org.smooks.api.converter.TypeConverterException
org.smooks.api.converter.TypeConverterException
protected BeanRuntimeInfo getWiredBeanRuntimeInfo()
protected String getId()
public Set<?> getProducts()
getProducts
in interface org.smooks.api.delivery.ordering.Producer
public boolean consumes(Object object)
consumes
in interface org.smooks.api.delivery.ordering.Consumer
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.